Re: idr_get_new_above() limitation?

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Hoang-Nam Nguyen <hnguyen@...>
Cc: <linux-kernel@...>, <linuxppc-dev@...>, <openib-general@...>, Stefan Roscher <ossrosch@...>, <raisch@...>, Andrew Morton <akpm@...>
Date: Monday, July 2, 2007 - 8:31 pm

On Mon, 2007-07-02 at 19:19 +0200, Hoang-Nam Nguyen wrote:


Hi Nam,

Yes this is a bug.  Thanks for the great test module.

The problem is in idr_get_new_above_int() in the loop which
adds new layers to the top of the radix tree.  It is failing
the "layers < (MAX_LEVEL - 1)" test.  It doesn't allocate the
new layer but still calls sub_alloc() which relies on having
the new layer properly constructed.  I believe that it is
allocating the slot which corresponds to id = 0.

I believe this is an off by one error in calculating the
MAX_LEVEL value.  I will do a more careful review and post 
a fix in the next day or so.  I have been in Ottawa for OLS.
I'm flying home tomorrow.

Jim Houston - Concurrent Computer Corp.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
idr_get_new_above() limitation?, Hoang-Nam Nguyen, (Mon Jul 2, 1:19 pm)
Re: idr_get_new_above() limitation?, Jim Houston, (Mon Jul 2, 8:31 pm)
Re: idr_get_new_above() limitation?, Hoang-Nam Nguyen, (Wed Jul 4, 10:11 am)
[PATCH] fix idr_get_new_above id alias bugs, Jim Houston, (Tue Jul 10, 4:05 pm)
Re: [PATCH] fix idr_get_new_above id alias bugs, Andrew Morton, (Thu Jul 12, 5:35 pm)
Re: [PATCH] fix idr_get_new_above id alias bugs, Tejun Heo, (Thu Jul 12, 11:46 pm)
Re: [PATCH] fix idr_get_new_above id alias bugs, Chuck Ebbert, (Thu Jul 12, 5:56 pm)
Re: [PATCH] fix idr_get_new_above id alias bugs, Hoang-Nam Nguyen, (Wed Jul 11, 3:27 pm)
Re: idr_get_new_above() limitation?, Andrew Morton, (Mon Jul 2, 6:56 pm)