OSDN Git Service

loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl()
authorTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Mon, 12 Nov 2018 15:42:14 +0000 (08:42 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 26 Jan 2019 08:42:52 +0000 (09:42 +0100)
commit9ec298cc874d08020f45791a8396e1593c3278c1
treef406abf89cb02aa39c800d9070c2039c0d564318
parent611f77199cd763e6b7c0462c2f199ddb3a089750
loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl()

commit 628bd85947091830a8c4872adfd5ed1d515a9cf2 upstream.

Commit 0a42e99b58a20883 ("loop: Get rid of loop_index_mutex") forgot to
remove mutex_unlock(&loop_ctl_mutex) from loop_control_ioctl() when
replacing loop_index_mutex with loop_ctl_mutex.

Fixes: 0a42e99b58a20883 ("loop: Get rid of loop_index_mutex")
Reported-by: syzbot <syzbot+c0138741c2290fc5e63f@syzkaller.appspotmail.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/block/loop.c