]> git.baikalelectronics.ru Git - kernel.git/commit
devpts: return NULL pts 'priv' entry for non-devpts nodes
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 3 Sep 2016 18:02:50 +0000 (11:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 3 Sep 2016 18:02:50 +0000 (11:02 -0700)
commit516d18a7ed54b9e5ca88c67391826f869abb375a
tree996bdceda74012fd350d7fe78662c8f5e12c8688
parent0df408e92c2fd4714d3517e40f2388ac1deb8203
devpts: return NULL pts 'priv' entry for non-devpts nodes

In commit 6b1a03eab323 ("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: stable@vger.kernel.org # 4.6+
Cc: Eric W Biederman" <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/devpts/inode.c