提交 2967acbb 编写于 作者: J Jens Axboe

blktrace: fix trace mutex deadlock

A previous commit changed the locking around registration/cleanup,
but direct callers of blk_trace_remove() were missed. This means
that if we hit the error path in setup, we will deadlock on
attempting to re-acquire the queue trace mutex.

Fixes: 1f2cac10 ("blktrace: fix unlocked access to init/start-stop/teardown")
Signed-off-by: NJens Axboe <axboe@kernel.dk>
上级 6c4ca1e3
......@@ -591,7 +591,7 @@ static int __blk_trace_setup(struct request_queue *q, char *name, dev_t dev,
return ret;
if (copy_to_user(arg, &buts, sizeof(buts))) {
blk_trace_remove(q);
__blk_trace_remove(q);
return -EFAULT;
}
return 0;
......@@ -637,7 +637,7 @@ static int compat_blk_trace_setup(struct request_queue *q, char *name,
return ret;
if (copy_to_user(arg, &buts.name, ARRAY_SIZE(buts.name))) {
blk_trace_remove(q);
__blk_trace_remove(q);
return -EFAULT;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册