Commit c3b4afc
blk-mq: free hctx->ctxs in queue's release handler
Now blk_cleanup_queue() can be called before calling
del_gendisk()[1], inside which hctx->ctxs is touched
from blk_mq_unregister_hctx(), but the variable has
been freed by blk_cleanup_queue() at that time.
So this patch moves freeing of hctx->ctxs into queue's
release handler for fixing the oops reported by Stefan.
[1], 6cd18e7 (block: destroy bdi before blockdev is
unregistered)
Reported-by: Stefan Seyfried <stefan.seyfried@googlemail.com>
Cc: NeilBrown <neilb@suse.de>
Cc: Christoph Hellwig <hch@lst.de>
Cc: stable@vger.kernel.org (v4.0)
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>1 parent d4a4f75 commit c3b4afc
1 file changed
+6
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1600 | 1600 | | |
1601 | 1601 | | |
1602 | 1602 | | |
| 1603 | + | |
1603 | 1604 | | |
1604 | 1605 | | |
1605 | 1606 | | |
| |||
1618 | 1619 | | |
1619 | 1620 | | |
1620 | 1621 | | |
1621 | | - | |
1622 | 1622 | | |
1623 | 1623 | | |
1624 | 1624 | | |
| |||
1891 | 1891 | | |
1892 | 1892 | | |
1893 | 1893 | | |
1894 | | - | |
| 1894 | + | |
| 1895 | + | |
| 1896 | + | |
| 1897 | + | |
1895 | 1898 | | |
| 1899 | + | |
1896 | 1900 | | |
1897 | 1901 | | |
1898 | 1902 | | |
| |||
0 commit comments