Date: Mon, 2 Feb 2015 23:41:44 +0000 (UTC) From: Navdeep Parhar <np@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r278117 - head/sys/ofed/include/linux Message-ID: <201502022341.t12NfiBW063912@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: np Date: Mon Feb 2 23:41:43 2015 New Revision: 278117 URL: https://svnweb.freebsd.org/changeset/base/278117 Log: Fix bug in idr_pre_get where it doesn't handle 'need' correctly. Obtained from: Chelsio Communications' internal repository. Modified: head/sys/ofed/include/linux/linux_idr.c Modified: head/sys/ofed/include/linux/linux_idr.c ============================================================================== --- head/sys/ofed/include/linux/linux_idr.c Mon Feb 2 21:09:26 2015 (r278116) +++ head/sys/ofed/include/linux/linux_idr.c Mon Feb 2 23:41:43 2015 (r278117) @@ -223,7 +223,7 @@ idr_pre_get(struct idr *idr, gfp_t gfp_m for (il = idr->free; il != NULL; il = il->ary[0]) need--; mtx_unlock(&idr->lock); - if (need == 0) + if (need <= 0) break; for (head = NULL; need; need--) { iln = malloc(sizeof(*il), M_IDR, M_ZERO | gfp_mask);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201502022341.t12NfiBW063912>