CFT update day 2

Hans Petter Selasky hps at selasky.org
Mon May 23 09:02:00 UTC 2016


On 05/23/16 10:12, Matthew Macy wrote:
> - Will Andrews identified a conditionally uninitialized return in
>   idr_find that could lead to a panic in some cases.

FYI

If you integrate linux_idr.c from FreeBSD-11-current, this problem and a 
few others should already be solved:

For example there:

	while ((il = idr_find_layer_locked(idr, i)) != NULL) {

The following loop is buggy:
		for (;i  <  (i & ~IDR_MASK) + IDR_SIZE; i++) {
			if (il->ary[i & IDR_MASK]) {
				*nextidp = i;

And equivalent to a "while (true)", which I believe this is not the 
intention.

--HPS


More information about the freebsd-x11 mailing list