]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: conclude all event processing before offlining a card
authorJulian Wiedmann <jwi@linux.ibm.com>
Mon, 4 Feb 2019 16:40:09 +0000 (17:40 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Feb 2019 17:43:48 +0000 (09:43 -0800)
commit4a850d20b2df3b15b0293d82acbc9c808a7c61a1
tree29d3e353e7d7de47e4c69c99c4a448b8900c6a16
parent75cd0317f4d73cda0d92a2b20b6475c877039559
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: 415d00be3e08 ("qeth: bridgeport support - basic control")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core.h
drivers/s390/net/qeth_core_main.c
drivers/s390/net/qeth_l2_main.c
drivers/s390/net/qeth_l3_main.c