genl: Hold reference on correct module while netlink-dump.
authorPravin B Shelar <pshelar@nicira.com>
Fri, 23 Aug 2013 19:45:04 +0000 (12:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 14 Sep 2013 13:54:55 +0000 (06:54 -0700)
commita8077ef001460c41bc0509b096d3d342002c4d9b
treef1d251921694454c55a89e7302d6807b8a95d104
parente307a8acf8c075261f8110b7088f20d2f7206f56
genl: Hold reference on correct module while netlink-dump.

[ Upstream commit 33c6b1f6b154894321f5734e50c66621e9134e7e ]

netlink dump operations take module as parameter to hold
reference for entire netlink dump duration.
Currently it holds ref only on genl module which is not correct
when we use ops registered to genl from another module.
Following patch adds module pointer to genl_ops so that netlink
can hold ref count on it.

Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
CC: Jesse Gross <jesse@nicira.com>
CC: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/net/genetlink.h
net/netlink/genetlink.c