]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Hannes Reinecke <hare@suse.de> |
2 | Subject: Kernel bug in kmpathd during FC cable pulls | |
3 | References: bnc#476330 | |
4 | ||
5 | Kernel bug in kmpathd during FC cable pulls. | |
6 | After one FC cable pull cycle system produced call trace. | |
7 | ||
8 | As it turned out blk_abort_requests() will not touch | |
9 | any requests for which the endio processing has already | |
10 | started. So we need to splice those requests back onto | |
11 | the timeout list for endio processing to be able to | |
12 | continue properly. | |
13 | ||
14 | Signed-off-by: Hannes Reinecke <hare@suse.de> | |
15 | ||
16 | diff --git a/block/blk-timeout.c b/block/blk-timeout.c | |
17 | index 4cc0205..bcadbb2 100644 | |
18 | --- a/block/blk-timeout.c | |
19 | +++ b/block/blk-timeout.c | |
20 | @@ -145,6 +145,8 @@ void blk_add_timer(struct request *req) | |
21 | * blk_abort_queue -- Abort all request on given queue | |
22 | * @queue: pointer to queue | |
23 | * | |
24 | + * We have to use list_splice() here as blk_abort_request() | |
25 | + * might add requests back on the timeout list. | |
26 | */ | |
27 | void blk_abort_queue(struct request_queue *q) | |
28 | { | |
29 | @@ -161,6 +163,9 @@ void blk_abort_queue(struct request_queue *q) | |
30 | list_for_each_entry_safe(rq, tmp, &list, timeout_list) | |
31 | blk_abort_request(rq); | |
32 | ||
33 | + /* Add remaining requests back on the list */ | |
34 | + list_splice(&list, &q->timeout_list); | |
35 | + | |
36 | spin_unlock_irqrestore(q->queue_lock, flags); | |
37 | ||
38 | } |