linux-stable-rt/net
Wei Yongjun 1b08534e56 net: Fix module refcount leak in kernel_accept()
The kernel_accept() does not hold the module refcount of newsock->ops->owner,
so we need __module_get(newsock->ops->owner) code after call kernel_accept()
by hand.
In sunrpc, the module refcount is missing to hold. So this cause kernel panic.

Used following script to reproduct:

while [ 1 ];
do
    mount -t nfs4 192.168.0.19:/ /mnt
    touch /mnt/file
    umount /mnt
    lsmod | grep ipv6
done

This patch fixed the problem by add __module_get(newsock->ops->owner) to
kernel_accept(). So we do not need to used __module_get(newsock->ops->owner)
in every place when used kernel_accept().

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-12-18 19:35:10 -08:00
..
9p 9p: restrict RDMA usage 2008-11-12 23:33:57 -08:00
802
8021q
appletalk
atm ATM: CVE-2008-5079: duplicate listen() on socket corrupts the vcc table 2008-12-04 14:58:13 -08:00
ax25
bluetooth net: Fix module refcount leak in kernel_accept() 2008-12-18 19:35:10 -08:00
bridge bridge: netfilter: fix update_pmtu crash with GRE 2008-11-24 16:06:50 -08:00
can can: omit received RTR frames for single ID filter lists 2008-12-04 15:01:08 -08:00
core netpoll: fix race on poll_list resulting in garbage entry 2008-12-09 23:22:26 -08:00
dccp
decnet
dsa
econet
ethernet
ieee80211
ipv4 netfilter: update rwlock initialization for nat_table 2008-12-15 00:19:14 -08:00
ipv6 ipv6: silence log messages for locally generated multicast 2008-12-09 15:48:32 -08:00
ipx
irda
iucv
key
lapb
llc
mac80211 mac80211: use unaligned safe memcmp() in-place of compare_ether_addr() 2008-12-05 09:18:35 -05:00
netfilter tproxy: fixe a possible read from an invalid location in the socket match 2008-12-07 23:53:46 -08:00
netlabel netlabel: Compiler warning and NULL pointer dereference fix 2008-12-11 21:31:50 -08:00
netlink
netrom
packet
phonet Phonet: keep TX queue disabled when the device is off 2008-12-15 00:53:57 -08:00
rfkill
rose rose: zero length frame filtering in af_rose.c 2008-11-25 00:56:20 -08:00
rxrpc
sched SCHED: netem: Correct documentation comment in code. 2008-12-15 00:39:17 -08:00
sctp
sunrpc Merge branch 'for-2.6.28' of git://linux-nfs.org/~bfields/linux 2008-12-03 16:40:37 -08:00
tipc
unix net: Fix soft lockups/OOM issues w/ unix garbage collector 2008-11-26 15:32:27 -08:00
wanrouter
wireless net/wireless/reg.c: fix bad WARN_ON in if statement 2008-11-25 16:13:09 -05:00
x25
xfrm xfrm: Fix kernel panic when flush and dump SPD entries 2008-12-03 00:27:18 -08:00
Kconfig
Makefile
TUNABLE
compat.c reintroduce accept4 2008-11-19 18:49:57 -08:00
nonet.c
socket.c net: Fix module refcount leak in kernel_accept() 2008-12-18 19:35:10 -08:00
sysctl_net.c