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@xxxxxxxxxxxxxxx> know about it. >From 3e423945ea94412283eaba8bfbe9d6e0a80b434f Mon Sep 17 00:00:00 2001 From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 3 Sep 2016 11:02:50 -0700 Subject: devpts: return NULL pts 'priv' entry for non-devpts nodes From: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxx> Cc: Eric W Biederman" <ebiederm@xxxxxxxxxxxx> Signed-off-by: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- 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@xxxxxxxxxxxxxxxxxxxx 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 -- To unsubscribe from this list: send the line "unsubscribe stable" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html