aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/net/qeth_l3_main.c
diff options
context:
space:
mode:
authorJulian Wiedmann <jwi@linux.ibm.com>2019-02-04 17:40:09 +0100
committerDavid S. Miller <davem@davemloft.net>2019-02-04 09:43:48 -0800
commitc0a2e4d10d9366ada133a8ae4ff2f32397f8b15b (patch)
tree29d3e353e7d7de47e4c69c99c4a448b8900c6a16 /drivers/s390/net/qeth_l3_main.c
parents390/qeth: cancel close_dev work before removing a card (diff)
downloadlinux-dev-c0a2e4d10d9366ada133a8ae4ff2f32397f8b15b.tar.xz
linux-dev-c0a2e4d10d9366ada133a8ae4ff2f32397f8b15b.zip
s390/qeth: conclude all event processing before offlining a card
Work for Bridgeport events is currently placed on a driver-wide workqueue. If the card is removed and freed while any such work is still active, this causes a use-after-free. So put the events on a per-card queue, where we can control their lifetime. As we also don't want stale events to last beyond an offline & online cycle, flush this queue when setting the card offline. Fixes: b4d72c08b358 ("qeth: bridgeport support - basic control") Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/s390/net/qeth_l3_main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/net/qeth_l3_main.c b/drivers/s390/net/qeth_l3_main.c
index 5e810561cb12..df34bff4ac31 100644
--- a/drivers/s390/net/qeth_l3_main.c
+++ b/drivers/s390/net/qeth_l3_main.c
@@ -1433,6 +1433,8 @@ static void qeth_l3_stop_card(struct qeth_card *card, int recovery_mode)
qeth_clear_cmd_buffers(&card->read);
qeth_clear_cmd_buffers(&card->write);
}
+
+ flush_workqueue(card->event_wq);
}
/*