All of lore.kernel.org
 help / color / mirror / Atom feed
From: <gregkh@linuxfoundation.org>
To: torvalds@linux-foundation.org, dvyukov@google.com,
	ebiederm@xmission.com, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "devpts: return NULL pts 'priv' entry for non-devpts nodes" has been added to the 4.7-stable tree
Date: Thu, 22 Sep 2016 15:34:20 +0200	[thread overview]
Message-ID: <1474551260122225@kroah.com> (raw)


This is a note to let you know that I've just added the patch titled

    devpts: return NULL pts 'priv' entry for non-devpts nodes

to the 4.7-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     devpts-return-null-pts-priv-entry-for-non-devpts-nodes.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From 3e423945ea94412283eaba8bfbe9d6e0a80b434f Mon Sep 17 00:00:00 2001
From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Sat, 3 Sep 2016 11:02:50 -0700
Subject: devpts: return NULL pts 'priv' entry for non-devpts nodes

From: Linus Torvalds <torvalds@linux-foundation.org>

commit 3e423945ea94412283eaba8bfbe9d6e0a80b434f upstream.

In commit 8ead9dd54716 ("devpts: more pty driver interface cleanups") I
made devpts_get_priv() just return the dentry->fs_data directly.  And
because I thought it wouldn't happen, I added a warning if you ever saw
a pts node that wasn't on devpts.

And no, that warning never triggered under any actual real use, but you
can trigger it by creating nonsensical pts nodes by hand.

So just revert the warning, and make devpts_get_priv() return NULL for
that case like it used to.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Cc: Eric W Biederman" <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 fs/devpts/inode.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -584,7 +584,8 @@ struct dentry *devpts_pty_new(struct pts
  */
 void *devpts_get_priv(struct dentry *dentry)
 {
-	WARN_ON_ONCE(dentry->d_sb->s_magic != DEVPTS_SUPER_MAGIC);
+	if (dentry->d_sb->s_magic != DEVPTS_SUPER_MAGIC)
+		return NULL;
 	return dentry->d_fsdata;
 }
 


Patches currently in stable-queue which might be from torvalds@linux-foundation.org are

queue-4.7/perf-x86-intel-pt-fix-an-off-by-one-in-address-filter-configuration.patch
queue-4.7/perf-x86-intel-fix-pebsv3-record-drain.patch
queue-4.7/rapidio-tsi721-fix-incorrect-detection-of-address-translation-condition.patch
queue-4.7/x86-paravirt-do-not-trace-_paravirt_ident_-functions.patch
queue-4.7/revert-af_unix-fix-splice-bind-deadlock.patch
queue-4.7/mm-oom-prevent-premature-oom-killer-invocation-for-high-order-request.patch
queue-4.7/mm-mempolicy-task-mempolicy-must-be-null-before-dropping-final-reference.patch
queue-4.7/perf-x86-intel-pt-do-validate-the-size-of-a-kernel-address-filter.patch
queue-4.7/af_unix-split-u-readlock-into-two-iolock-and-bindlock.patch
queue-4.7/kexec-fix-double-free-when-failing-to-relocate-the-purgatory.patch
queue-4.7/sched-core-fix-a-race-between-try_to_wake_up-and-a-woken-up-task.patch
queue-4.7/perf-x86-intel-pt-fix-kernel-address-filter-s-offset-validation.patch
queue-4.7/devpts-return-null-pts-priv-entry-for-non-devpts-nodes.patch
queue-4.7/perf-x86-amd-make-hw_cache_references-and-hw_cache_misses-measure-l2.patch

                 reply	other threads:[~2016-09-22 13:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1474551260122225@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=dvyukov@google.com \
    --cc=ebiederm@xmission.com \
    --cc=stable-commits@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linux-foundation.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.