* [PATCH net-next] rtnetlink: fix rtnl_link msghandler rcu annotations
@ 2017-12-04 21:42 Florian Westphal
2017-12-05 16:15 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Florian Westphal @ 2017-12-04 21:42 UTC (permalink / raw)
To: netdev; +Cc: Florian Westphal
Incorrect/missing annotations caused a few sparse warnings:
rtnetlink.c:155:15: incompatible types .. (different address spaces)
rtnetlink.c:157:23: incompatible types .. (different address spaces)
rtnetlink.c:185:15: incompatible types .. (different address spaces)
rtnetlink.c:285:15: incompatible types .. (different address spaces)
rtnetlink.c:317:9: incompatible types .. (different address spaces)
rtnetlink.c:3054:23: incompatible types .. (different address spaces)
no change in generated code.
Fixes: addf9b90de22f7 ("net: rtnetlink: use rcu to free rtnl message handlers")
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
---
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 642b3afb12b9..a4faefd65006 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -129,7 +129,7 @@ bool lockdep_rtnl_is_held(void)
EXPORT_SYMBOL(lockdep_rtnl_is_held);
#endif /* #ifdef CONFIG_PROVE_LOCKING */
-static struct rtnl_link __rcu **rtnl_msg_handlers[RTNL_FAMILY_MAX + 1];
+static struct rtnl_link *__rcu *rtnl_msg_handlers[RTNL_FAMILY_MAX + 1];
static inline int rtm_msgindex(int msgtype)
{
@@ -164,7 +164,8 @@ static int rtnl_register_internal(struct module *owner,
rtnl_doit_func doit, rtnl_dumpit_func dumpit,
unsigned int flags)
{
- struct rtnl_link **tab, *link, *old;
+ struct rtnl_link *link, *old;
+ struct rtnl_link __rcu **tab;
int msgindex;
int ret = -ENOBUFS;
--
2.13.6
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH net-next] rtnetlink: fix rtnl_link msghandler rcu annotations
2017-12-04 21:42 [PATCH net-next] rtnetlink: fix rtnl_link msghandler rcu annotations Florian Westphal
@ 2017-12-05 16:15 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2017-12-05 16:15 UTC (permalink / raw)
To: fw; +Cc: netdev
From: Florian Westphal <fw@strlen.de>
Date: Mon, 4 Dec 2017 22:42:30 +0100
> Incorrect/missing annotations caused a few sparse warnings:
>
> rtnetlink.c:155:15: incompatible types .. (different address spaces)
> rtnetlink.c:157:23: incompatible types .. (different address spaces)
> rtnetlink.c:185:15: incompatible types .. (different address spaces)
> rtnetlink.c:285:15: incompatible types .. (different address spaces)
> rtnetlink.c:317:9: incompatible types .. (different address spaces)
> rtnetlink.c:3054:23: incompatible types .. (different address spaces)
>
> no change in generated code.
>
> Fixes: addf9b90de22f7 ("net: rtnetlink: use rcu to free rtnl message handlers")
> Reported-by: kbuild test robot <fengguang.wu@intel.com>
> Signed-off-by: Florian Westphal <fw@strlen.de>
Applied, thanks for fixing this so quickly.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-12-05 16:15 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-04 21:42 [PATCH net-next] rtnetlink: fix rtnl_link msghandler rcu annotations Florian Westphal
2017-12-05 16:15 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox