summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2012-07-29 23:17:39 +0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-07-29 23:17:39 +0400
commitbf8848918d751c1fb86f6514a75bf8d406f1c3c3 (patch)
tree8311cbd3ea3a5f2559a92daff71ca6b078f7ffdf /fs
parent446945ab9a82515af4b099107eda27050e077c58 (diff)
downloadlinux-bf8848918d751c1fb86f6514a75bf8d406f1c3c3.tar.xz
lockd: handle lockowner allocation failure in nlmclnt_proc()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-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);