summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-07-29 21:17:39 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-29 21:17:39 +0200
commitbf8848918d751c1fb86f6514a75bf8d406f1c3c3 (patch)
tree8311cbd3ea3a5f2559a92daff71ca6b078f7ffdf /fs/lockd
parentlockd: shift grabbing a reference to nlm_host into nlm_alloc_call() (diff)
downloadlinux-bf8848918d751c1fb86f6514a75bf8d406f1c3c3.tar.xz
linux-bf8848918d751c1fb86f6514a75bf8d406f1c3c3.zip
lockd: handle lockowner allocation failure in nlmclnt_proc()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/clntproc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/lockd/clntproc.c b/fs/lockd/clntproc.c
index 27c74f32671b..05d29124c6ab 100644
--- a/fs/lockd/clntproc.c
+++ b/fs/lockd/clntproc.c
@@ -161,6 +161,11 @@ int nlmclnt_proc(struct nlm_host *host, int cmd, struct file_lock *fl)
return -ENOMEM;
nlmclnt_locks_init_private(fl, host);
+ if (!fl->fl_u.nfs_fl.owner) {
+ /* lockowner allocation has failed */
+ nlmclnt_release_call(call);
+ return -ENOMEM;
+ }
/* Set up the argument struct */
nlmclnt_setlockargs(call, fl);