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)
committerJens Axboe <axboe@kernel.dk>
Sun, 5 Nov 2017 16:13:48 +0000 (09:13 -0700)
commit78ed8cdad8be3a7fe18b10e5e268de40df462d0d
treebf22664f10278e9554a7a1c46f59d7e536fe6950
parent2d6349944d967129c1da3c47287376f10121dbe1
blktrace: fix unlocked access to init/start-stop/teardown

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")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
kernel/trace/blktrace.c