From: Tejun Heo <tj@kernel.org>
To: Peter Hurley <peter@hurleysoftware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] idr: Don't WARN in idr_find
Date: Mon, 25 Feb 2013 17:40:27 -0800 [thread overview]
Message-ID: <20130226014027.GH2679@htj.dyndns.org> (raw)
In-Reply-To: <1361842632-29689-1-git-send-email-peter@hurleysoftware.com>
On Mon, Feb 25, 2013 at 08:37:12PM -0500, Peter Hurley wrote:
> Since idr is used for syscall apis (to associate 'handles' with
> internal structures), don't WARN with invalid input.
>
> For example, POSIX timers are identified by timer_t id. These
> ids are idr values. If userspace passes a representable timer_t id
> value (eg, id < 0) but which was not previous allocated (since the
> current idr api does not return negative idr values), then the
> syscall properly returns an error; a WARN is unnecessary and
> undesirable.
WARN_ON() on negative was intentional. Because the previous
implmentation silently dropped the msb, we at least wanna know who has
been passing in negative indices. Patch for the lock_timer is already
in -mm.
Thanks.
--
tejun
next prev parent reply other threads:[~2013-02-26 1:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-26 1:37 Peter Hurley
2013-02-26 1:40 ` Tejun Heo [this message]
2013-02-26 1:46 ` Peter Hurley
2013-02-26 1:48 ` Tejun Heo
2013-02-26 2:07 ` 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=20130226014027.GH2679@htj.dyndns.org \
--to=tj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@hurleysoftware.com \
/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®