]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
blktrace: fix unlocked access to init/start-stop/teardown
authorJens Axboe <axboe@kernel.dk>
Sun, 5 Nov 2017 16:13:48 +0000 (09:13 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 May 2020 06:15:30 +0000 (08:15 +0200)
commit0ef5b092bb9936584a8885201f9e712ceec4a9d2
tree0fbfe042ee8472e8abb5230386370628db6af2a6
parentb4880925650b90cedc82b4044571177165448953
blktrace: fix unlocked access to init/start-stop/teardown

commit 1f2cac107c591c24b60b115d6050adc213d10fc0 upstream.

sg.c calls into the blktrace functions without holding the proper queue
mutex for doing setup, start/stop, or teardown.

Add internal unlocked variants, and export the ones that do the proper
locking.

Fixes: 6da127ad0918 ("blktrace: Add blktrace ioctls to SCSI generic devices")
Tested-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
kernel/trace/blktrace.c