aboutsummaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorJianchao Wang <[email protected]>2018-04-17 11:46:20 +0800
committerJens Axboe <[email protected]>2018-04-16 21:56:41 -0600
commitf4560231ec42092c6662acccabb28c6cac9f5dfb (patch)
tree99f63bfa99798a198838f49306e5fe0fbbbcf86c /lib/test_overflow.c
parentb3906535ccc6cd04c42f9b1c7e31d1947b3ebc74 (diff)
blk-mq: start request gstate with gen 1
rq->gstate and rq->aborted_gstate both are zero before rqs are allocated. If we have a small timeout, when the timer fires, there could be rqs that are never allocated, and also there could be rq that has been allocated but not initialized and started. At the moment, the rq->gstate and rq->aborted_gstate both are 0, thus the blk_mq_terminate_expired will identify the rq is timed out and invoke .timeout early. For scsi, this will cause scsi_times_out to be invoked before the scsi_cmnd is not initialized, scsi_cmnd->device is still NULL at the moment, then we will get crash. Cc: Bart Van Assche <[email protected]> Cc: Tejun Heo <[email protected]> Cc: Ming Lei <[email protected]> Cc: Martin Steigerwald <[email protected]> Cc: [email protected] Signed-off-by: Jianchao Wang <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions