Commit 5bf490e6 authored by Julian Wiedmann's avatar Julian Wiedmann Committed by David S. Miller

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: 8b5026bc ("s390/qeth: fix qdio teardown after early init error")
Signed-off-by: default avatarJulian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 83896b0b
...@@ -284,11 +284,11 @@ static void qeth_l2_stop_card(struct qeth_card *card) ...@@ -284,11 +284,11 @@ static void qeth_l2_stop_card(struct qeth_card *card)
if (card->state == CARD_STATE_SOFTSETUP) { if (card->state == CARD_STATE_SOFTSETUP) {
qeth_clear_ipacmd_list(card); qeth_clear_ipacmd_list(card);
qeth_drain_output_queues(card);
card->state = CARD_STATE_DOWN; card->state = CARD_STATE_DOWN;
} }
qeth_qdio_clear_card(card, 0); qeth_qdio_clear_card(card, 0);
qeth_drain_output_queues(card);
qeth_clear_working_pool_list(card); qeth_clear_working_pool_list(card);
flush_workqueue(card->event_wq); flush_workqueue(card->event_wq);
qeth_flush_local_addrs(card); qeth_flush_local_addrs(card);
......
...@@ -1168,11 +1168,11 @@ static void qeth_l3_stop_card(struct qeth_card *card) ...@@ -1168,11 +1168,11 @@ static void qeth_l3_stop_card(struct qeth_card *card)
if (card->state == CARD_STATE_SOFTSETUP) { if (card->state == CARD_STATE_SOFTSETUP) {
qeth_l3_clear_ip_htable(card, 1); qeth_l3_clear_ip_htable(card, 1);
qeth_clear_ipacmd_list(card); qeth_clear_ipacmd_list(card);
qeth_drain_output_queues(card);
card->state = CARD_STATE_DOWN; card->state = CARD_STATE_DOWN;
} }
qeth_qdio_clear_card(card, 0); qeth_qdio_clear_card(card, 0);
qeth_drain_output_queues(card);
qeth_clear_working_pool_list(card); qeth_clear_working_pool_list(card);
flush_workqueue(card->event_wq); flush_workqueue(card->event_wq);
qeth_flush_local_addrs(card); qeth_flush_local_addrs(card);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment