diff options
author | Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp> | 2018-11-12 08:42:14 -0700 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-12 08:44:06 -0700 |
commit | 628bd85947091830a8c4872adfd5ed1d515a9cf2 (patch) | |
tree | b61f92f16f3e5cfb159038ccd346fff19c9ddf57 /drivers | |
parent | 8e18ebef4dd4c83cea65730821da423553ed6019 (diff) | |
download | linux-628bd85947091830a8c4872adfd5ed1d515a9cf2.tar.bz2 |
loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl()
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/loop.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c index bf6bc35aaf88..176ab1f28eca 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -2074,12 +2074,10 @@ static long loop_control_ioctl(struct file *file, unsigned int cmd, break; if (lo->lo_state != Lo_unbound) { ret = -EBUSY; - mutex_unlock(&loop_ctl_mutex); break; } if (atomic_read(&lo->lo_refcnt) > 0) { ret = -EBUSY; - mutex_unlock(&loop_ctl_mutex); break; } lo->lo_disk->private_data = NULL; |