]> git.baikalelectronics.ru Git - kernel.git/commit
locks: fix NULL-deref in generic_delete_lease
authorNeilBrown <neilb@suse.de>
Tue, 13 Jan 2015 02:17:43 +0000 (15:17 +1300)
committerJeff Layton <jlayton@primarydata.com>
Tue, 13 Jan 2015 12:00:55 +0000 (07:00 -0500)
commitd6c80e4b2db3070de047713c171fe9093f8d16af
tree68ef398f3f7ab3996a79cf1361adb92a0ed0fe4f
parentc99873bf71202496a3fe59db86988efb04d55c03
locks: fix NULL-deref in generic_delete_lease

commit aa4598805be3cdba638e44d0575bc0b3af55c918
  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: Linda Walsh <suse@tlinx.org>
Link: https://bugzilla.suse.com/show_bug.cgi?id=912569
Cc: stable@vger.kernel.org (v3.18)
Fixes: aa4598805be3cdba638e44d0575bc0b3af55c918
Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
fs/locks.c