Skip to contentSkip to conversation

s390/qeth: delay draining the TX buffers

PATCH Applied Julian Wiedmann 2 participants 2 messages Sep 10, 2020

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 s390/qeth: delay draining the TX buffers

Wait until the QDIO data connection is severed. Otherwise the device might still be processing the buffers, and end up accessing skb data that we already freed.

Fixes 8b5026bc1693 ("s390/qeth: fix qdio teardown after early init error")
---
 drivers/s390/net/qeth_l2_main.c | 2 +-
 drivers/s390/net/qeth_l3_main.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/s390/net/qeth_l2_main.c +1 -1
index 3a94f6cad167..6384f7adba66 100644
@@ -284,11 +284,11 @@ static void qeth_l2_stop_card(struct qeth_card *card)
 
 	if (card->state == CARD_STATE_SOFTSETUP) {
 		qeth_clear_ipacmd_list(card);
-		qeth_drain_output_queues(card);
 		card->state = CARD_STATE_DOWN;
 	}
 
 	qeth_qdio_clear_card(card, 0);
+	qeth_drain_output_queues(card);
 	qeth_clear_working_pool_list(card);
 	flush_workqueue(card->event_wq);
 	qeth_flush_local_addrs(card);
drivers/s390/net/qeth_l3_main.c +1 -1
index 4d461960370d..09ef518ca1ea 100644
@@ -1168,11 +1168,11 @@ static void qeth_l3_stop_card(struct qeth_card *card)
 	if (card->state == CARD_STATE_SOFTSETUP) {
 		qeth_l3_clear_ip_htable(card, 1);
 		qeth_clear_ipacmd_list(card);
-		qeth_drain_output_queues(card);
 		card->state = CARD_STATE_DOWN;
 	}
 
 	qeth_qdio_clear_card(card, 0);
+	qeth_drain_output_queues(card);
 	qeth_clear_working_pool_list(card);
 	flush_workqueue(card->event_wq);
 	qeth_flush_local_addrs(card);
Signature · 1 line
2.17.1
maintainer Applied
#1 lore raw

From: Julian Wiedmann <[email protected]>
Date: Thu, 10 Sep 2020 11:05:18 +0200

Quoted 6 lines

Wait until the QDIO data connection is severed. Otherwise the device might still be processing the buffers, and end up accessing skb data that we already freed.

Fixes 8b5026bc1693 ("s390/qeth: fix qdio teardown after early init error")

Applied.