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); _______________________________________________ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"