lkml.org 
[lkml]   [2013]   [Mar]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: WARNING: at lib/idr.c:678 idr_find_slowpath+0x97/0xc0()
Hello, Andrew.

On Fri, Mar 01, 2013 at 01:31:59PM -0800, Andrew Morton wrote:
> okluar passed a negative `wd' into inotify_rm_watch()?
>
> I wonder why it did that. I doubt if inotify_add_watch() ever returns
> negative descriptors, in which case I expect that okular's call to
> inotify_add_watch() returned -1 and an errno and okular forgot to check
> it, and later passed that -1 back into inotify_rm_watch().
>
> Anyway, I guess we need to make inotify_add_watch() refuse to return
> negative descriptors (presumably this is already the case due to idr
> internals) and make inotify_rm_watch() trap negative values of `wd' up
> front.
>
> I wonder how many other such gremlins the IDR checking has added.

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().

Thanks.

--
tejun


\
 
 \ /
  Last update: 2013-03-01 23:21    [W:0.058 / U:0.452 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site