All of lore.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Tejun Heo <tj@kernel.org>
Cc: Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] kernfs: Fix kernfs_name_compare
Date: Mon, 5 Jan 2015 08:14:07 -0800	[thread overview]
Message-ID: <20150105161407.GA24376@kroah.com> (raw)
In-Reply-To: <20150105141347.GH15833@htj.dyndns.org>

On Mon, Jan 05, 2015 at 09:13:47AM -0500, Tejun Heo wrote:
> On Fri, Dec 05, 2014 at 11:41:33PM +0100, Rasmus Villemoes wrote:
> > Returning a difference from a comparison functions is usually wrong
> > (see acbbe6fbb240 "kcmp: fix standard comparison bug" for the long
> > story). Here there is the additional twist that if the void pointers
> > ns and kn->ns happen to differ by a multiple of 2^32,
> > kernfs_name_compare returns 0, falsely reporting a match to the
> > caller.
> > 
> > Technically 'hash - kn->hash' is ok since the hashes are restricted to
> > 31 bits, but it's better to avoid that subtlety.
> > 
> > Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
> 
> Acked-by: Tejun Heo <tj@kernel.org>
> 
> And this is a -stable material.  Greg, can you please pick this one
> up?

Will do, thanks.

greg k-h

      reply	other threads:[~2015-01-05 16:14 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-04 16:19 [PATCH] kernfs: Fix kernfs_name_compare Rasmus Villemoes
2014-12-04 16:53 ` Tejun Heo
2014-12-05 22:41 ` [PATCH v2] " Rasmus Villemoes
2015-01-05 14:13   ` Tejun Heo
2015-01-05 16:14     ` Greg Kroah-Hartman [this message]

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=20150105161407.GA24376@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.