• Trond Myklebust's avatar
    LOCKD: Don't call utsname()->nodename from nlmclnt_setlockargs · 9a1b6bf8
    Trond Myklebust authored
    Firstly, nlmclnt_setlockargs can be called from a reclaimer thread, in
    which case we're in entirely the wrong namespace.
    
    Secondly, commit 8aac6270 (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: 's avatarTrond 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
    9a1b6bf8
Name
Last commit
Last update
..
Makefile Loading commit data...
clnt4xdr.c Loading commit data...
clntlock.c Loading commit data...
clntproc.c Loading commit data...
clntxdr.c Loading commit data...
grace.c Loading commit data...
host.c Loading commit data...
mon.c Loading commit data...
netns.h Loading commit data...
svc.c Loading commit data...
svc4proc.c Loading commit data...
svclock.c Loading commit data...
svcproc.c Loading commit data...
svcshare.c Loading commit data...
svcsubs.c Loading commit data...
xdr.c Loading commit data...
xdr4.c Loading commit data...