piaojun
c290fba8c4
net/9p/client.c: put refcount of trans_mod in error case in parse_opts()
...
In my testing, the second mount will fail after umounting successfully.
The reason is that we put refcount of trans_mod in the correct case
rather than the error case in parse_opts() at last. That will cause the
refcount decrease to -1, and when we try to get trans_mod again in
try_module_get(), we could only increase refcount to 0 which will cause
failure as follows:
parse_opts
v9fs_get_trans_by_name
try_module_get : return NULL to caller which cause error
So we should put refcount of trans_mod in error case.
Link: http://lkml.kernel.org/r/5B3F39A0.2030509@huawei.com
Fixes: 9421c3e641 ("net/9p/client.c: fix potential refcnt problem of trans module")
Signed-off-by: Jun Piao <piaojun@huawei.com>
Reviewed-by: Yiwen Jiang <jiangyiwen@huawei.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Dominique Martinet <dominique.martinet@cea.fr>
Tested-by: Dominique Martinet <dominique.martinet@cea.fr>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Cc: Ron Minnich <rminnich@sandia.gov>
Cc: Latchesar Ionkov <lucho@ionkov.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-07-14 11:11:09 -07:00
..
6lowpan
9p
net/9p/client.c: put refcount of trans_mod in error case in parse_opts()
2018-07-14 11:11:09 -07:00
802
8021q
net: fix use-after-free in GRO with ESP
2018-07-02 20:34:04 +09:00
appletalk
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
atm
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
ax25
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
batman-adv
bluetooth
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
bpf
bpfilter
bpfilter: include bpfilter_umh in assembly instead of using objcopy
2018-06-28 21:39:16 +09:00
bridge
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-06-16 07:39:34 +09:00
caif
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
can
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
ceph
The main piece is a set of libceph changes that revamps how OSD
2018-06-15 07:24:58 +09:00
core
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-07-02 11:18:28 -07:00
dcb
treewide: kmalloc() -> kmalloc_array()
2018-06-12 16:19:22 -07:00
dccp
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
decnet
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
dns_resolver
dsa
net: dsa: add error handling for pskb_trim_rcsum
2018-06-11 14:19:38 -07:00
ethernet
hsr
ieee802154
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
ife
ipv4
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-07-02 11:18:28 -07:00
ipv6
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
2018-07-02 11:18:28 -07:00
iucv
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
kcm
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
key
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
l2tp
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
l3mdev
lapb
llc
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
mac80211
mac80211: disable BHs/preemption in ieee80211_tx_control_port()
2018-06-29 09:39:08 +02:00
mac802154
mpls
ncsi
net/ncsi: Use netdev_dbg for debug messages
2018-06-20 07:26:58 +09:00
netfilter
netfilter: nf_conncount: fix garbage collection confirm race
2018-06-26 18:28:57 +02:00
netlabel
netlink
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
netrom
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
nfc
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
nsh
openvswitch
treewide: kzalloc() -> kcalloc()
2018-06-12 16:19:22 -07:00
packet
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
phonet
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
psample
qrtr
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
rds
rds: clean up loopback rds_connections on netns deletion
2018-06-27 10:11:03 +09:00
rfkill
rose
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
rxrpc
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
sched
net_sched: remove a bogus warning in hfsc
2018-06-23 10:58:46 +09:00
sctp
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
smc
net/smc: fix up merge error with poll changes
2018-07-03 09:53:43 -07:00
strparser
strparser: Remove early eaten to fix full tcp receive buffer stall
2018-06-28 21:37:26 +09:00
sunrpc
NFS client bugfixes for Linux 4.18
2018-06-22 06:21:34 +09:00
switchdev
tipc
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
tls
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
unix
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
vmw_vsock
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
wimax
wireless
nl80211: check nla_parse_nested() return values
2018-06-29 09:44:51 +02:00
x25
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
xdp
Revert changes to convert to ->poll_mask() and aio IOCB_CMD_POLL
2018-06-28 10:40:47 -07:00
xfrm
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
2018-06-06 18:39:49 -07:00
compat.c
Kconfig
Makefile
bpfilter: check compiler capability in Kconfig
2018-06-28 13:36:39 +09:00
socket.c
net: handle NULL ->poll gracefully
2018-06-29 06:51:51 -07:00
sysctl_net.c