On Mon, Dec 19 2016, Jinpu Wang wrote: > Hi Neil, > > After apply the patch below, it paniced during boot in > generic_make_request-> bio_list_pop. > Looks related to you do bio_list_init(&bio_list_on_stack); again. >> diff --git a/block/blk-core.c b/block/blk-core.c >> index 14d7c0740dc0..3436b6fc3ef8 100644 >> --- a/block/blk-core.c >> +++ b/block/blk-core.c >> @@ -2036,10 +2036,31 @@ blk_qc_t generic_make_request(struct bio *bio) >> struct request_queue *q = bdev_get_queue(bio->bi_bdev); >> >> if (likely(blk_queue_enter(q, false) == 0)) { >> + struct bio_list hold; >> + struct bio_list lower, same; >> + >> + /* Create a fresh bio_list for all subordinate requests */ >> + bio_list_merge(&hold, &bio_list_on_stack); This is the problem. 'hold' hasn't been initialised. We could either do: bio_list_init(&hold); bio_list_merge(&hold, &bio_list_on_stack); or just hold = bio_list_on_stack; You didn't find 'hold' to be necessary in your testing, but I think that is more complex arrangements it could make an important difference. Thanks, NeilBrown >> + bio_list_init(&bio_list_on_stack); ??? maybe init hold, and then merge bio_list_on_stack? >> ret = q->make_request_fn(q, bio); >> >> blk_queue_exit(q);
Attachment:
signature.asc
Description: PGP signature