From: Mathias Krause Date: Mon, 7 Nov 2016 22:22:19 +0000 (+0100) Subject: rtnl: reset calcit fptr in rtnl_unregister() X-Git-Tag: v3.16.40~89 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=f60c9f651a505df9d132e2ac61af229506eac2d5;p=thirdparty%2Fkernel%2Fstable.git rtnl: reset calcit fptr in rtnl_unregister() commit f567e950bf51290755a2539ff2aaef4c26f735d3 upstream. 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 Cc: Greg Rose Signed-off-by: Mathias Krause Signed-off-by: David S. Miller Signed-off-by: Ben Hutchings --- diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index e4666af74141c..7544529999751 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -250,6 +250,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; }