From owner-freebsd-current@freebsd.org Mon May 23 09:02:00 2016 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57436B468B3; Mon, 23 May 2016 09:02:00 +0000 (UTC) (envelope-from hps@selasky.org) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2348219F9; Mon, 23 May 2016 09:01:59 +0000 (UTC) (envelope-from hps@selasky.org) Received: from laptop015.home.selasky.org (unknown [62.141.129.119]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 031911FE024; Mon, 23 May 2016 11:01:57 +0200 (CEST) Subject: Re: CFT update day 2 To: Matthew Macy , "freebsd-x11@freebsd.org" , "freebsd-current@freebsd.org" References: <154dcac7f27.f5da66a0148247.6294302194451585046@nextbsd.org> From: Hans Petter Selasky Message-ID: Date: Mon, 23 May 2016 11:05:20 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.0 MIME-Version: 1.0 In-Reply-To: <154dcac7f27.f5da66a0148247.6294302194451585046@nextbsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 May 2016 09:02:00 -0000 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