Skip to content
Commit 52d304eb authored by NeilBrown's avatar NeilBrown Committed by Jeff Layton
Browse files

locks: fix NULL-deref in generic_delete_lease

commit 0efaa7e8


  locks: generic_delete_lease doesn't need a file_lock at all

moves the call to fl->fl_lmops->lm_change() to a place in the
code where fl might be a non-lease lock.
When that happens, fl_lmops is NULL and an Oops ensures.

So add an extra test to restore correct functioning.

Reported-by: default avatarLinda Walsh <suse@tlinx.org>
Link: https://bugzilla.suse.com/show_bug.cgi?id=912569
Cc: stable@vger.kernel.org (v3.18)
Fixes: 0efaa7e8


Signed-off-by: default avatarNeilBrown <neilb@suse.de>
Signed-off-by: default avatarJeff Layton <jlayton@primarydata.com>
parent 971780b7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment