From: Al Viro Date: Sun, 29 Jul 2012 19:17:39 +0000 (+0400) Subject: lockd: handle lockowner allocation failure in nlmclnt_proc() X-Git-Tag: v3.6-rc1~18^2~31 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bf8848918d751c1fb86f6514a75bf8d406f1c3c3;p=profile%2Fivi%2Fkernel-adaptation-intel-automotive.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 27c74f3..05d2912 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);