• Jim Houston's avatar
    [PATCH] idr_remove safety checking · 1d2921ea
    Jim Houston authored
    idr_remove() should fail gracefully and warn if the id being removed is not
    valid.
    
    The attached patch should do the job without additional overhead.
    
    With the existing code, removing an id which was not allocated could remove
    a valid id which shares the same lowest layer of the radix tree.
    
    I ran a kernel with this patch but have not done any tests to force
    a failure.
    Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    1d2921ea
idr.c 9.35 KB