From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-kernel@lists.codethink.co.uk
Cc: Ben Dooks <ben.dooks@codethink.co.uk>, linux-kernel@vger.kernel.org
Subject: [PATCH] kernel/signal.c: spare fix on copy_siginfo_from_user_any()
Date: Tue, 15 Oct 2019 10:28:27 +0100 [thread overview]
Message-ID: <20191015092827.21527-1-ben.dooks@codethink.co.uk> (raw)
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
Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
Cc: linux-kernel@vger.kernel.org
---
kernel/signal.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/signal.c b/kernel/signal.c
index c4da1ef56fdf..94985c756693 100644
--- a/kernel/signal.c
+++ b/kernel/signal.c
@@ -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
/*
--
2.23.0
reply other threads:[~2019-10-15 9:28 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191015092827.21527-1-ben.dooks@codethink.co.uk \
--to=ben.dooks@codethink.co.uk \
--cc=linux-kernel@lists.codethink.co.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®