From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:45387 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933644AbcIVNes (ORCPT ); Thu, 22 Sep 2016 09:34:48 -0400 Subject: Patch "devpts: return NULL pts 'priv' entry for non-devpts nodes" has been added to the 4.7-stable tree To: torvalds@linux-foundation.org, dvyukov@google.com, ebiederm@xmission.com, gregkh@linuxfoundation.org Cc: , From: Date: Thu, 22 Sep 2016 15:34:20 +0200 Message-ID: <1474551260122225@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: 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 know about it. >>From 3e423945ea94412283eaba8bfbe9d6e0a80b434f Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Sat, 3 Sep 2016 11:02:50 -0700 Subject: devpts: return NULL pts 'priv' entry for non-devpts nodes From: Linus Torvalds 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 Cc: Eric W Biederman" Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- 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