From: Gao feng Date: Thu, 4 Oct 2012 20:15:48 +0000 (+0000) Subject: netlink: add reference of module in netlink_dump_start X-Git-Tag: v3.7-rc1~66^2~53 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6dc878a8ca39e93f70c42f3dd7260bde10c1e0f1;p=pandora-kernel.git netlink: add reference of module in netlink_dump_start I get a panic when I use ss -a and rmmod inet_diag at the same time. It's because netlink_dump uses inet_diag_dump which belongs to module inet_diag. I search the codes and find many modules have the same problem. We need to add a reference to the module which the cb->dump belongs to. Thanks for all help from Stephen,Jan,Eric,Steffen and Pablo. Change From v3: change netlink_dump_start to inline,suggestion from Pablo and Eric. Change From v2: delete netlink_dump_done,and call module_put in netlink_dump and netlink_sock_destruct. Signed-off-by: Gao feng Signed-off-by: David S. Miller --- Reading git-diff-tree failed