public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Tejun Heo <tj@kernel.org>
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 20:46:11 -0500	[thread overview]
Message-ID: <1361843171.8053.1.camel@thor.lan> (raw)
In-Reply-To: <20130226014027.GH2679@htj.dyndns.org>

On Mon, 2013-02-25 at 17:40 -0800, Tejun Heo wrote:
> 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. Can you share the patch title? It's not in next-20130225.

Peter


  reply	other threads:[~2013-02-26  1:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-26  1:37 [PATCH] idr: Don't WARN in idr_find Peter Hurley
2013-02-26  1:40 ` Tejun Heo
2013-02-26  1:46   ` Peter Hurley [this message]
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=1361843171.8053.1.camel@thor.lan \
    --to=peter@hurleysoftware.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    /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