diff options
author | Bart Van Assche <bart.vanassche@sandisk.com> | 2017-04-26 13:47:52 -0700 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2017-04-26 15:09:04 -0600 |
commit | e869b5462f83bcc771a3301fa7c8de47ed8c74f5 (patch) | |
tree | 3fe1868219d4506580b19b5738632a6f2baaa041 /net | |
parent | f05d1ba7871a2c20ca9ebb303aac89c9296d1f58 (diff) |
blk-mq: Unregister debugfs attributes earlier
We currently call blk_mq_free_queue() from blk_cleanup_queue()
before we unregister the debugfs attributes for that queue in
blk_release_queue(). This leaves a window open during which
accessing most of the mq debugfs attributes would cause a
use-after-free. Additionally, the "state" attribute allows
running the queue, which we should not do after the queue has
entered the "dead" state. Fix both cases by unregistering the
debugfs attributes before freeing queue resources starts.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Omar Sandoval <osandov@fb.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'net')
0 files changed, 0 insertions, 0 deletions