From: Tejun Heo <tj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: markus@trippelsdorf.de, linux-kernel@vger.kernel.org
Subject: Re: WARNING: at lib/idr.c:678 idr_find_slowpath+0x97/0xc0()
Date: Fri, 1 Mar 2013 13:35:11 -0800 [thread overview]
Message-ID: <20130301213511.GF2481@mtj.dyndns.org> (raw)
In-Reply-To: <20130301133159.0711f81a.akpm@linux-foundation.org>
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
next prev parent reply other threads:[~2013-03-01 21:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-28 9:08 markus
2013-03-01 21:31 ` Andrew Morton
2013-03-01 21:35 ` Tejun Heo [this message]
2013-03-01 21:45 ` [PATCH] idr: remove WARN_ON_ONCE() on negative IDs Tejun Heo
2013-03-01 21:54 ` WARNING: at lib/idr.c:678 idr_find_slowpath+0x97/0xc0() Peter Hurley
2013-03-01 21:56 ` Tejun Heo
2013-03-01 22:10 ` Peter Hurley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130301213511.GF2481@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=markus@trippelsdorf.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®