All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Mel Gorman <mgorman@techsingularity.net>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Chris Mason <clm@fb.com>, Darren Hart <dvhart@linux.intel.com>,
	linux-kernel@vger.kernel.org, Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH v3] futex: Remove requirement for lock_page in
Date: Wed, 20 Jan 2016 12:20:59 -0800	[thread overview]
Message-ID: <20160120202059.GH27825@linux-uzut.site> (raw)
In-Reply-To: <alpine.DEB.2.11.1601202058520.3575@nanos>

On Wed, 20 Jan 2016, Thomas Gleixner wrote:

>On Wed, 20 Jan 2016, Davidlohr Bueso wrote:
>> On Tue, 19 Jan 2016, Bueso wrote:
>> > +
>> > +		/* Should be impossible but lets be paranoid for now */
>> > +		BUG_ON(inode->i_mapping != mapping);
>>
>> Hmm, do we want to transform this into an if and do rcu unlock and then just
>> call BUG()? I't doesn't matter at this point _anyway_, but it would be the
>> right
>> thing to do, no?
>
>The better solution is to err out gracefully.
>
>    	   if (WARN_ON_ONCE(inode->i_mapping != mapping) {
>	      	   err = -EFAULT;
>		   rcu_read_unlock();
>		   goto out;
>    	   }
>
>Hmm?

Ok, Linus would probably like that as well. If we're going this way,
we also need to release inode reference, before the rcu unlock.

Thanks,
Davidlohr

      reply	other threads:[~2016-01-20 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20  0:30 [PATCH v3] futex: Remove requirement for lock_page in Davidlohr Bueso
2016-01-20 14:03 ` Mel Gorman
2016-01-20 19:55 ` Davidlohr Bueso
2016-01-20 20:01   ` Thomas Gleixner
2016-01-20 20:20     ` Davidlohr Bueso [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=20160120202059.GH27825@linux-uzut.site \
    --to=dave@stgolabs.net \
    --cc=bigeasy@linutronix.de \
    --cc=clm@fb.com \
    --cc=dbueso@suse.de \
    --cc=dvhart@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mgorman@techsingularity.net \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=tglx@linutronix.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 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.