OpenCloudOS-Kernel/fs/lockd
Trond Myklebust 9a1b6bf818 LOCKD: Don't call utsname()->nodename from nlmclnt_setlockargs
Firstly, nlmclnt_setlockargs can be called from a reclaimer thread, in
which case we're in entirely the wrong namespace.

Secondly, commit 8aac62706a (move
exit_task_namespaces() outside of exit_notify()) now means that
exit_task_work() is called after exit_task_namespaces(), which
triggers an Oops when we're freeing up the locks.

Fix this by ensuring that we initialise the nlm_host's rpc_client at mount
time, so that the cl_nodename field is initialised to the value of
utsname()->nodename that the net namespace uses. Then replace the
lockd callers of utsname()->nodename.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: Toralf Förster <toralf.foerster@gmx.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Nix <nix@esperi.org.uk>
Cc: Jeff Layton <jlayton@redhat.com>
Cc: stable@vger.kernel.org # 3.10.x
2013-08-05 15:03:46 -04:00
..
Makefile lockd: Introduce new-style XDR functions for NLMv4 2010-12-16 12:37:23 -05:00
clnt4xdr.c lockd: Remove unnecessary BUG_ON()s in the xdr client code 2012-11-04 14:43:39 -05:00
clntlock.c LOCKD: Don't call utsname()->nodename from nlmclnt_setlockargs 2013-08-05 15:03:46 -04:00
clntproc.c LOCKD: Don't call utsname()->nodename from nlmclnt_setlockargs 2013-08-05 15:03:46 -04:00
clntxdr.c lockd: Remove unnecessary BUG_ON()s in the xdr client code 2012-11-04 14:43:39 -05:00
grace.c LockD: pass actual network namespace to grace period management functions 2012-07-27 16:49:22 -04:00
host.c Merge branch 'for-3.9' of git://linux-nfs.org/~bfields/linux 2013-02-28 18:02:55 -08:00
mon.c sunrpc: move address copy/cmp/convert routines and prototypes from clnt.h to addr.h 2013-02-05 09:41:14 -05:00
netns.h lockd: per-net NSM client creation and destruction helpers introduced 2012-10-01 15:27:34 -07:00
svc.c drivers: avoid parsing names as kthread_run() format strings 2013-07-03 16:07:41 -07:00
svc4proc.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2012-08-01 10:26:23 -07:00
svclock.c Merge branch 'for-3.11' of git://linux-nfs.org/~bfields/linux 2013-07-17 13:43:55 -07:00
svcproc.c NLM: nlm_lookup_file() may return NLMv4-specific error codes 2012-10-17 10:14:14 -04:00
svcshare.c lockd: fix sparse warning in svcshare.c 2008-04-23 16:13:39 -04:00
svcsubs.c locks: protect most of the file_lock handling with i_lock 2013-06-29 12:57:42 +04:00
xdr.c lockd: Move nlmdbg_cookie2a() to svclock.c 2010-12-16 12:37:24 -05:00
xdr4.c lockd: Introduce new-style XDR functions for NLMv4 2010-12-16 12:37:23 -05:00