Skip to content

Commit b0e9fe1

Browse files
Florian Westphaldavem330
authored andcommitted
rtnetlink: fix rtnl_link msghandler rcu annotations
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: addf9b9 ("net: rtnetlink: use rcu to free rtnl message handlers") Reported-by: kbuild test robot <[email protected]> Signed-off-by: Florian Westphal <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 7cda4ce commit b0e9fe1

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

net/core/rtnetlink.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ bool lockdep_rtnl_is_held(void)
129129
EXPORT_SYMBOL(lockdep_rtnl_is_held);
130130
#endif /* #ifdef CONFIG_PROVE_LOCKING */
131131

132-
static struct rtnl_link __rcu **rtnl_msg_handlers[RTNL_FAMILY_MAX + 1];
132+
static struct rtnl_link *__rcu *rtnl_msg_handlers[RTNL_FAMILY_MAX + 1];
133133

134134
static inline int rtm_msgindex(int msgtype)
135135
{
@@ -164,7 +164,8 @@ static int rtnl_register_internal(struct module *owner,
164164
rtnl_doit_func doit, rtnl_dumpit_func dumpit,
165165
unsigned int flags)
166166
{
167-
struct rtnl_link **tab, *link, *old;
167+
struct rtnl_link *link, *old;
168+
struct rtnl_link __rcu **tab;
168169
int msgindex;
169170
int ret = -ENOBUFS;
170171

0 commit comments

Comments
 (0)