Re: CFT update day 2

From: Hans Petter Selasky <hps_at_selasky.org>
Date: Mon, 23 May 2016 11:05:20 +0200
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
Received on Mon May 23 2016 - 07:02:00 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:05 UTC