Hi Jens, These patches are what I came up with while analyzing syzbot and blktests complaints related to dynamically changing the number of hardware queues. Please consider these patches for the upstream kernel. Thanks, Bart. Bart Van Assche (5): blk-mq: Fix a comment in include/linux/blk-mq.h blk-mq: Keep set->nr_hw_queues and set->map[].nr_queues in sync blk-mq: Fix a recently introduced regression in blk_mq_realloc_hw_ctxs() null_blk: Suppress an UBSAN complaint triggered when setting 'memory_backed' null_blk: Fix changing the number of hardware queues block/blk-mq.c | 17 ++++-- drivers/block/null_blk_main.c | 105 ++++++++++++++++++++++------------ include/linux/blk-mq.h | 5 +- 3 files changed, 84 insertions(+), 43 deletions(-)