Re: WARNING: at lib/idr.c:678 idr_find_slowpath+0x97/0xc0()

From: Peter Hurley
Date: Fri Mar 01 2013 - 17:10:57 EST


On Fri, 2013-03-01 at 13:56 -0800, Tejun Heo wrote:
> On Fri, Mar 1, 2013 at 1:54 PM, Peter Hurley <peter@xxxxxxxxxxxxxxxxxx> wrote:
> >> The WARN_ON() is just for cases where someone might be doing something
> >> crazy with the previous behavior of ignoring high bit. Maybe I was
> >> being overly paranoid and we should just drop it from idr_find().
> >
> > Can we revert the __lock_timer patch as well then?
>
> I don't know. Andrew was worried about the type of timer id. For
> inotify, it's okay as the type is always int but it's not a bad idea
> to have some form of sanitizing if the type might deviate.

It's the other way around that would be the problem, if idr returned a
type that wasn't representable by timer_t.

IMO, idr should be the sanitizing; either the value is valid and found
or not. But that's just my opinion :)

Regards,
Peter Hurley

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/