#ifdef CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION
 static DECLARE_FAULT_ATTR(null_timeout_attr);
 static DECLARE_FAULT_ATTR(null_requeue_attr);
+static DECLARE_FAULT_ATTR(null_init_hctx_attr);
 #endif
 
 static inline u64 mb_per_tick(int mbps)
 
 static char g_requeue_str[80];
 module_param_string(requeue, g_requeue_str, sizeof(g_requeue_str), 0444);
+
+static char g_init_hctx_str[80];
+module_param_string(init_hctx, g_init_hctx_str, sizeof(g_init_hctx_str), 0444);
 #endif
 
 static int g_queue_mode = NULL_Q_MQ;
        struct nullb *nullb = hctx->queue->queuedata;
        struct nullb_queue *nq;
 
+#ifdef CONFIG_BLK_DEV_NULL_BLK_FAULT_INJECTION
+       if (g_init_hctx_str[0] && should_fail(&null_init_hctx_attr, 1))
+               return -EFAULT;
+#endif
+
        nq = &nullb->queues[hctx_idx];
        hctx->driver_data = nq;
        null_init_queue(nullb, nq);
                return false;
        if (!__null_setup_fault(&null_requeue_attr, g_requeue_str))
                return false;
+       if (!__null_setup_fault(&null_init_hctx_attr, g_init_hctx_str))
+               return false;
 #endif
        return true;
 }