]> git.karo-electronics.de Git - linux-beck.git/commitdiff
lockd: handle lockowner allocation failure in nlmclnt_proc()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 29 Jul 2012 19:17:39 +0000 (23:17 +0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 29 Jul 2012 19:17:39 +0000 (23:17 +0400)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/lockd/clntproc.c

index 27c74f32671b66b200102dc2e63594b6522190d4..05d29124c6ab4150c9a5381cbc98b9a472c65b25 100644 (file)
@@ -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);