* [PATCH] ipv6: mcast: make annotations for ip6_mc_msfget() consistent
@ 2020-10-28 11:53 Lukas Bulwahn
2020-10-30 20:59 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Lukas Bulwahn @ 2020-10-28 11:53 UTC (permalink / raw)
To: Alexey Kuznetsov, Hideaki YOSHIFUJI, David S . Miller,
Jakub Kicinski, netdev
Cc: Al Viro, linux-kernel, kernel-janitors, linux-safety, Lukas Bulwahn
Commit 931ca7ab7fe8 ("ip*_mc_gsfget(): lift copyout of struct group_filter
into callers") adjusted the type annotations for ip6_mc_msfget() at its
declaration, but missed the type annotations at its definition.
Hence, sparse complains on ./net/ipv6/mcast.c:
mcast.c:550:5: error: symbol 'ip6_mc_msfget' redeclared with different type \
(incompatible argument 3 (different address spaces))
Make ip6_mc_msfget() annotations consistent, which also resolves this
warning from sparse:
mcast.c:607:34: warning: incorrect type in argument 1 (different address spaces)
mcast.c:607:34: expected void [noderef] __user *to
mcast.c:607:34: got struct __kernel_sockaddr_storage *p
No functional change. No change in object code.
Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
---
applies cleanly on current master and next-20201028
David, Jakub, please pick this minor non-urgent clean-up patch.
net/ipv6/mcast.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c
index 8cd2782a31e4..6c8604390266 100644
--- a/net/ipv6/mcast.c
+++ b/net/ipv6/mcast.c
@@ -548,7 +548,7 @@ int ip6_mc_msfilter(struct sock *sk, struct group_filter *gsf,
}
int ip6_mc_msfget(struct sock *sk, struct group_filter *gsf,
- struct sockaddr_storage *p)
+ struct sockaddr_storage __user *p)
{
int err, i, count, copycount;
const struct in6_addr *group;
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] ipv6: mcast: make annotations for ip6_mc_msfget() consistent
2020-10-28 11:53 [PATCH] ipv6: mcast: make annotations for ip6_mc_msfget() consistent Lukas Bulwahn
@ 2020-10-30 20:59 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2020-10-30 20:59 UTC (permalink / raw)
To: Lukas Bulwahn
Cc: Alexey Kuznetsov, Hideaki YOSHIFUJI, David S . Miller, netdev,
Al Viro, linux-kernel, kernel-janitors, linux-safety
On Wed, 28 Oct 2020 12:53:49 +0100 Lukas Bulwahn wrote:
> Commit 931ca7ab7fe8 ("ip*_mc_gsfget(): lift copyout of struct group_filter
> into callers") adjusted the type annotations for ip6_mc_msfget() at its
> declaration, but missed the type annotations at its definition.
>
> Hence, sparse complains on ./net/ipv6/mcast.c:
>
> mcast.c:550:5: error: symbol 'ip6_mc_msfget' redeclared with different type \
> (incompatible argument 3 (different address spaces))
>
> Make ip6_mc_msfget() annotations consistent, which also resolves this
> warning from sparse:
>
> mcast.c:607:34: warning: incorrect type in argument 1 (different address spaces)
> mcast.c:607:34: expected void [noderef] __user *to
> mcast.c:607:34: got struct __kernel_sockaddr_storage *p
>
> No functional change. No change in object code.
>
> Signed-off-by: Lukas Bulwahn <lukas.bulwahn@gmail.com>
Applied, thank you!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-10-30 20:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-28 11:53 [PATCH] ipv6: mcast: make annotations for ip6_mc_msfget() consistent Lukas Bulwahn
2020-10-30 20:59 ` Jakub Kicinski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).