Re: fix sasyncd(8) race condition causing a segfault when getting data from the kernel

2012-09-04 Thread Christiano F. Haesbaert
I've reviewed this diff with Patrick and I believe it is correct, can someone else have a look ? On Tue, Sep 04, 2012 at 04:46:08PM +0200, Patrick Wildt wrote: > When sasyncd(8) dumps data from the kernel, it does a sysctl() for the size to > alloc, > and a second for the actual data. In between,

fix sasyncd(8) race condition causing a segfault when getting data from the kernel

2012-09-04 Thread Patrick Wildt
When sasyncd(8) dumps data from the kernel, it does a sysctl() for the size to alloc, and a second for the actual data. In between, new data can be added/deleted. Therefore the kernel might return less data, than actually told. The case that you get less/more data isn't handled properly. In case o