* [PATCH] rtnl: reset calcit fptr in rtnl_unregister()
@ 2016-11-07 22:22 Mathias Krause
2016-11-10 1:18 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Mathias Krause @ 2016-11-07 22:22 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev, Mathias Krause, Jeff Kirsher, Greg Rose
To avoid having dangling function pointers left behind, reset calcit in
rtnl_unregister(), too.
This is no issue so far, as only the rtnl core registers a netlink
handler with a calcit hook which won't be unregistered, but may become
one if new code makes use of the calcit hook.
Fixes: c7ac8679bec9 ("rtnetlink: Compute and store minimum ifinfo...")
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Mathias Krause <minipli@googlemail.com>
---
net/core/rtnetlink.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index 189cc78c77eb..d4c601604bf7 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -275,6 +275,7 @@ int rtnl_unregister(int protocol, int msgtype)
rtnl_msg_handlers[protocol][msgindex].doit = NULL;
rtnl_msg_handlers[protocol][msgindex].dumpit = NULL;
+ rtnl_msg_handlers[protocol][msgindex].calcit = NULL;
return 0;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] rtnl: reset calcit fptr in rtnl_unregister()
2016-11-07 22:22 [PATCH] rtnl: reset calcit fptr in rtnl_unregister() Mathias Krause
@ 2016-11-10 1:18 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2016-11-10 1:18 UTC (permalink / raw)
To: minipli; +Cc: netdev, jeffrey.t.kirsher, gregory.v.rose
From: Mathias Krause <minipli@googlemail.com>
Date: Mon, 7 Nov 2016 23:22:19 +0100
> To avoid having dangling function pointers left behind, reset calcit in
> rtnl_unregister(), too.
>
> This is no issue so far, as only the rtnl core registers a netlink
> handler with a calcit hook which won't be unregistered, but may become
> one if new code makes use of the calcit hook.
>
> Fixes: c7ac8679bec9 ("rtnetlink: Compute and store minimum ifinfo...")
> Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> Cc: Greg Rose <gregory.v.rose@intel.com>
> Signed-off-by: Mathias Krause <minipli@googlemail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-10 1:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-11-07 22:22 [PATCH] rtnl: reset calcit fptr in rtnl_unregister() Mathias Krause
2016-11-10 1:18 ` David Miller
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).