From: Al Viro Date: Sun, 29 Jul 2012 19:17:39 +0000 (+0400) Subject: lockd: handle lockowner allocation failure in nlmclnt_proc() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=bf8848918d751c1fb86f6514a75bf8d406f1c3c3;p=linux-beck.git lockd: handle lockowner allocation failure in nlmclnt_proc() Signed-off-by: Al Viro --- 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);