Skip to contentSkip to conversation

kernel/signal.c: spare fix on copy_siginfo_from_user_any()

PATCH New Ben Dooks 1 participant 1 message Oct 15, 2019

lore
Share & tools
lore

Ben Dooks

author
#0 lore raw

PATCH 1/1 kernel/signal.c: spare fix on copy_siginfo_from_user_any()

The copy_siginfo_from_user_any() should have __user attribute on the siginfo_t *info pointer. Fix the following sparse warnings by adding __user.

kernel/signal.c:3676:46: warning: incorrect type in argument 2 (different address spaces)
kernel/signal.c:3676:46: expected struct siginfo const [noderef] [usertype] <asn:1> *from
kernel/signal.c:3676:46: got struct siginfo [usertype] *info
kernel/signal.c:3736:58: warning: incorrect type in argument 2 (different address spaces)
kernel/signal.c:3736:58: expected struct siginfo [usertype] *info
kernel/signal.c:3736:58: got struct siginfo [noderef] [usertype] <asn:1> *info

---
Cc: [email protected]

---
 kernel/signal.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/signal.c +2 -1
index c4da1ef56fdf..94985c756693 100644
@@ -3661,7 +3661,8 @@ static bool access_pidfd_pidns(struct pid *pid)
 	return true;
 }
 
-static int copy_siginfo_from_user_any(kernel_siginfo_t *kinfo, siginfo_t *info)
+static int copy_siginfo_from_user_any(kernel_siginfo_t *kinfo,
+				      siginfo_t __user *info)
 {
 #ifdef CONFIG_COMPAT
 	/*
Signature · 1 line
2.23.0