Skip to content

Commit 16b89f6

Browse files
committed
net/scm: Fix typo in SCM_RIGHTS compat refactoring
When refactoring the SCM_RIGHTS code, I accidentally mis-merged my native/compat diffs, which entirely broke using SCM_RIGHTS in compat mode. Use the correct helper. Reported-by: Christian Zigotzky <[email protected]> Link: https://lists.ozlabs.org/pipermail/linuxppc-dev/2020-August/216156.html Reported-by: "Alex Xu (Hello71)" <[email protected]> Link: https://lore.kernel.org/lkml/1596812929.lz7fuo8r2w.none@localhost/ Suggested-by: Thadeu Lima de Souza Cascardo <[email protected]> Fixes: c0029de ("net/scm: Regularize compat handling of scm_detach_fds()") Tested-by: Alex Xu (Hello71) <[email protected]> Acked-by: Thadeu Lima de Souza Cascardo <[email protected]> Signed-off-by: Kees Cook <[email protected]>
1 parent 25d8d4e commit 16b89f6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/compat.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ void scm_detach_fds_compat(struct msghdr *msg, struct scm_cookie *scm)
294294
(struct compat_cmsghdr __user *)msg->msg_control;
295295
unsigned int o_flags = (msg->msg_flags & MSG_CMSG_CLOEXEC) ? O_CLOEXEC : 0;
296296
int fdmax = min_t(int, scm_max_fds_compat(msg), scm->fp->count);
297-
int __user *cmsg_data = CMSG_USER_DATA(cm);
297+
int __user *cmsg_data = CMSG_COMPAT_DATA(cm);
298298
int err = 0, i;
299299

300300
for (i = 0; i < fdmax; i++) {

0 commit comments

Comments
 (0)