mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Fix bug in idr_pre_get where it doesn't handle 'need' correctly.
Obtained from: Chelsio Communications' internal repository.
This commit is contained in:
parent
681c32931f
commit
9d3c01e391
1 changed files with 1 additions and 1 deletions
|
|
@ -223,7 +223,7 @@ idr_pre_get(struct idr *idr, gfp_t gfp_mask)
|
|||
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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue