Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
blkmq: Fix NULL pointer deref when all reserved tags in
When allocating from the reserved tags pool, bt_get() is called with a NULL hctx. If all tags are in use, the hw queue is kicked to push out any pending IO, potentially freeing tags, and tag allocation is retried. The problem is that blk_mq_run_hw_queue() doesn't check for a NULL hctx. So we avoid it with a simple NULL hctx test. Tested by hammering mtip32xx with concurrent smartctl/hdparm. Signed-off-by: Sam Bradshaw <[email protected]> Signed-off-by: Selvan Mani <[email protected]> Fixes: b322320 ("blk-mq: fix hang in bt_get()") Cc: [email protected] Added appropriate comment. Signed-off-by: Jens Axboe <[email protected]>
- Loading branch information