]> Git Repo - linux.git/commitdiff
rtnl: reset calcit fptr in rtnl_unregister()
authorMathias Krause <[email protected]>
Mon, 7 Nov 2016 22:22:19 +0000 (23:22 +0100)
committerDavid S. Miller <[email protected]>
Thu, 10 Nov 2016 01:18:19 +0000 (20:18 -0500)
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 <[email protected]>
Cc: Greg Rose <[email protected]>
Signed-off-by: Mathias Krause <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
net/core/rtnetlink.c

index fb7348f135014fcea21b621ab30e1ad02b62448d..db313ec7af32926c96272435176ab88d75236e81 100644 (file)
@@ -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;
 }
This page took 0.060098 seconds and 4 git commands to generate.