summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2020-08-07 23:16:22 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2020-08-07 23:16:22 +0300
commit1fa2c0a0c814fbae0eb3e79a510765225570d043 (patch)
treebf2a1f029d74c62187eb622d631318ce7db1b9ad
parentf6235eb189706bf38c82b5fa5f2db0d21bc1dcef (diff)
parent16b89f695313d91c99bdaf6898f28a51d0af1b17 (diff)
downloadlinux-1fa2c0a0c814fbae0eb3e79a510765225570d043.tar.xz
Merge tag 'seccomp-v5.9-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux
Pull seccomp fix from Kees Cook: "This fixes my typo in the SCM_RIGHTS refactoring that broke compat handling. Thanks to Thadeu Lima de Souza Cascardo for tracking it down, and to Christian Zigotzky and Alex Xu for their reports" * tag 'seccomp-v5.9-rc1-fix1' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux: net/scm: Fix typo in SCM_RIGHTS compat refactoring
-rw-r--r--net/compat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/compat.c b/net/compat.c
index 703acb51c698..95ce707a30a3 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -294,7 +294,7 @@ void scm_detach_fds_compat(struct msghdr *msg, struct scm_cookie *scm)
(struct compat_cmsghdr __user *)msg->msg_control;
unsigned int o_flags = (msg->msg_flags & MSG_CMSG_CLOEXEC) ? O_CLOEXEC : 0;
int fdmax = min_t(int, scm_max_fds_compat(msg), scm->fp->count);
- int __user *cmsg_data = CMSG_USER_DATA(cm);
+ int __user *cmsg_data = CMSG_COMPAT_DATA(cm);
int err = 0, i;
for (i = 0; i < fdmax; i++) {