Skip to content

Commit

Permalink
lockd: handle lockowner allocation failure in nlmclnt_proc()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jul 29, 2012
1 parent 446945a commit bf88489
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/lockd/clntproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit bf88489

Please sign in to comment.