Skip to contentSkip to conversation

ipv6: mcast: make annotations ip6_mc_msfget() consistent

PATCH New Lukas Bulwahn 1 participant 1 message Oct 19, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ipv6: mcast: make annotations ip6_mc_msfget() consistent

Commit 931ca7ab7fe8 ("ip*_mc_gsfget(): lift copyout of struct group_filter into callers") adjusted the type annotations of 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.

---
linux-safety developers, please review, test and confirm. Thanks.

 net/ipv6/mcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/ipv6/mcast.c +1 -1
index 8cd2782a31e4..6c8604390266 100644
@@ -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;
Signature · 1 line
2.17.1