git: DragonFly_RELEASE_3_6 idr: Fix an infinite loop issue
Francois Tigeot
ftigeot at crater.dragonflybsd.org
Thu Dec 5 07:16:01 PST 2013
commit adeb26dc7533ec231d3af71c3aa551c8d3d94390
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date: Thu Dec 5 10:25:23 2013 +0100
idr: Fix an infinite loop issue
* idr routines were doing an infinite loop when the array was full but element
#0 was still free
* Because allocations start at 1, the low bound was not being taken account of
in idr_find_free(), causing an infinite loop
* idr_get_new_above() couldn't allocate an id >= 1 and idr_pre_get() thought it
didn't have to expand because id #0 was available
Summary of changes:
sys/libkern/linux_idr.c | 308 +++++++++++++++++++++++++++++++-----------------
sys/sys/idr.h | 3 +-
2 files changed, 201 insertions(+), 110 deletions(-)
http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/adeb26dc7533ec231d3af71c3aa551c8d3d94390
--
DragonFly BSD source repository
More information about the Commits
mailing list