• Tejun Heo's avatar
    idr: remove WARN_ON_ONCE() on negative IDs · 2e1c9b28
    Tejun Heo authored
    idr_find(), idr_remove() and idr_replace() used to silently ignore the
    sign bit and perform lookup with the rest of the bits.  The weird behavior
    has been changed such that negative IDs are treated as invalid.  As the
    behavior change was subtle, WARN_ON_ONCE() was added in the hope of
    determining who's calling idr functions with negative IDs so that they can
    be examined for problems.
    
    Up until now, all two reported cases are ID number coming directly from
    userland and getting fed into idr_find() and the warnings seem to cause
    more problems than being helpful.  Drop the WARN_ON_ONCE()s.
    Signed-off-by: default avatarTejun Heo <tj@kernel.org>
    Reported-by: <markus@trippelsdorf.de>
    Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    2e1c9b28
idr.c 28.6 KB