aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-bfin.c
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-06-13 14:45:12 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2007-07-11 19:09:02 -0400
commit7aae6dd80e265aa9402ed507caaff4a5dba55069 (patch)
treeb6b2e4d4942fd199768f6df6b0694a886e8c4375 /drivers/rtc/rtc-bfin.c
parentdc0afa8388972a9ed7c2203cc46d8df1a4713f65 (diff)
idr: fix obscure bug in allocation path
In sub_alloc(), when bitmap search fails, it goes up one level to continue search. This is done by updating the id cursor and searching the upper level again. If the cursor was at the end of the upper level, we need to go further than that. This wasn't implemented and when that happens the part of the cursor which indexes into the upper level wraps and sub_alloc() ends up searching the wrong bitmap. It allocates id which doesn't match the actual slot. This patch fixes this by restarting from the top if the search needs to go higher than one level. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/rtc/rtc-bfin.c')
0 files changed, 0 insertions, 0 deletions