diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-24 14:19:45 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-06-24 14:19:45 -0700 |
commit | fbb58011fdd9ca2e2f0e329d11085ddf46830c5a (patch) | |
tree | d7676fe1dccba822166a83ac9f693491ecbe6190 /kernel | |
parent | 26e122e97a3d0390ebec389347f64f3730fdf48f (diff) | |
parent | 86f56395feb2b106b125c47e72192e37da5dd088 (diff) | |
download | lwn-fbb58011fdd9ca2e2f0e329d11085ddf46830c5a.tar.gz lwn-fbb58011fdd9ca2e2f0e329d11085ddf46830c5a.zip |
Merge tag 'for-linus-2020-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux
Pull thread fix from Christian Brauner:
"This fixes a regression introduced with 303cc571d107 ("nsproxy: attach
to namespaces via pidfds").
The LTP testsuite reported a regression where users would now see
EBADF returned instead of EINVAL when an fd was passed that referred
to an open file but the file was not a namespace file.
Fix this by continuing to report EINVAL and add a regression test"
* tag 'for-linus-2020-06-24' of git://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux:
tests: test for setns() EINVAL regression
nsproxy: restore EINVAL for non-namespace file descriptor
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/nsproxy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/nsproxy.c b/kernel/nsproxy.c index b03df67621d0..cd356630a311 100644 --- a/kernel/nsproxy.c +++ b/kernel/nsproxy.c @@ -531,7 +531,7 @@ SYSCALL_DEFINE2(setns, int, fd, int, flags) } else if (!IS_ERR(pidfd_pid(file))) { err = check_setns_flags(flags); } else { - err = -EBADF; + err = -EINVAL; } if (err) goto out; |