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

locks: fix error in locks_move_blocks()



After moving all requests from
   fl->fl_blocked_requests
to
   new->fl_blocked_requests

it is nonsensical to do anything to all the remaining elements, there
aren't any.  This should do something to all the requests that have been
moved. For simplicity, it does it to all requests in the target list.

Setting "f->fl_blocker = new" to all members of new->fl_blocked_requests
is "obviously correct" as it preserves the invariant of the linkage
among requests.

Reported-by: default avatar <syzbot+239d99847eb49ecb3899@syzkaller.appspotmail.com>
Fixes: 5946c431

 ("fs/locks: allow a lock request to block other requests.")
Signed-off-by: default avatarNeilBrown <neilb@suse.com>
Signed-off-by: default avatarJeff Layton <jlayton@kernel.org>
parent 8e143b90
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