linux-uconsole/include
Stanislav Kinsbursky 344f3a6bce nfsd: check passed socket's net matches NFSd superblock's one
commit 3064639423 upstream.

There could be a case, when NFSd file system is mounted in network, different
to socket's one, like below:

"ip netns exec" creates new network and mount namespace, which duplicates NFSd
mount point, created in init_net context. And thus NFS server stop in nested
network context leads to RPCBIND client destruction in init_net.
Then, on NFSd start in nested network context, rpc.nfsd process creates socket
in nested net and passes it into "write_ports", which leads to RPCBIND sockets
creation in init_net context because of the same reason (NFSd monut point was
created in init_net context). An attempt to register passed socket in nested
net leads to panic, because no RPCBIND client present in nexted network
namespace.

This patch add check that passed socket's net matches NFSd superblock's one.
And returns -EINVAL error to user psace otherwise.

v2: Put socket on exit.

Reported-by: Weng Meiling <wengmeiling.weng@huawei.com>
Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-06 07:55:29 -07:00
..
acpi ACPI / hotplug: Fix conflicted PCI bridge notify handlers 2013-12-04 10:57:04 -08:00
asm-generic mm: fix TLB flush race between migration, and change_protection_range 2014-01-09 12:24:23 -08:00
clocksource clocksource: arch_timer: use virtual counters 2014-01-09 12:24:26 -08:00
crypto crypto: scatterwalk - Use sg_chain_ptr on chain entries 2013-12-11 22:36:29 -08:00
drm drm/radeon: 0x9649 is SUMO2 not SUMO 2014-01-09 12:24:22 -08:00
dt-bindings
keys
linux nfsd: check passed socket's net matches NFSd superblock's one 2014-05-06 07:55:29 -07:00
math-emu
media media: v4l2: added missing mutex.h include to v4l2-ctrls.h 2013-09-26 17:18:26 -07:00
memory
misc
net tcp: tcp_release_cb() should release socket ownership 2014-04-14 06:42:16 -07:00
pcmcia
ras
rdma
rxrpc
scsi ore: Fix wrong math in allocation of per device BIO 2014-02-13 13:48:00 -08:00
sound ALSA: memalloc.h - fix wrong truncation of dma_addr_t 2013-12-20 07:45:06 -08:00
target iscsi/iser-target: Fix isert_conn->state hung shutdown issues 2014-03-23 21:38:21 -07:00
trace tracing: Fix array size mismatch in format string 2014-03-31 09:58:12 -07:00
uapi ALSA: compress: Fix 64bit ABI incompatibility 2013-12-20 07:45:06 -08:00
video Merge branch 'fbdev-3.10-fixes' of git://gitorious.org/linux-omap-dss2/linux into linux-fbdev/for-3.10-fixes 2013-05-29 17:00:34 +08:00
xen xenbus: delay xenbus frontend resume if xenstored is not running 2013-05-29 09:04:19 -04:00
Kbuild UAPI: remove empty Kbuild files 2013-04-30 17:04:09 -07:00