linux/drivers/s390/net
Julian Wiedmann 4bdd0b2626 s390/qeth: conclude all event processing before offlining a card
commit c0a2e4d10d upstream.

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: b4d72c08b3 ("qeth: bridgeport support - basic control")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16:
 - Add gdev parameter to qeth_alloc_card(), as done upstream by commit
   121ca39aa5 "s390/qeth: uninstall IRQ handler on device removal"
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
History 2019-05-02 21:41:38 +01:00
..
claw.c claw: replace PTR_RET with PTR_ERR_OR_ZERO 2014-04-28 13:44:10 -04:00
claw.h s390/s390dbf: use debug_level_enabled() where applicable 2013-10-24 17:16:54 +02:00
ctcm_dbug.c s390/s390dbf: use debug_level_enabled() where applicable 2013-10-24 17:16:54 +02:00
ctcm_dbug.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_fsms.c drivers/s390/net: removes unnecessary semicolon 2012-09-24 15:45:17 -04:00
ctcm_fsms.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_main.c ctc: replace PTR_RET with PTR_ERR_OR_ZERO 2014-04-28 13:44:10 -04:00
ctcm_main.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_mpc.c ctcm: remove BUG_ONs 2012-11-19 14:19:00 -05:00
ctcm_mpc.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
ctcm_sysfs.c s390/net: fix format string mismatches 2014-05-30 17:35:23 -07:00
fsm.c include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h 2010-03-30 22:02:32 +09:00
fsm.h atomic: use <linux/atomic.h> 2011-07-26 16:49:47 -07:00
Kconfig qeth: Update Kconfig wording 2013-01-21 13:51:15 -05:00
lcs.c s390/net: fix format string mismatches 2014-05-30 17:35:23 -07:00
lcs.h s390/s390dbf: use debug_level_enabled() where applicable 2013-10-24 17:16:54 +02:00
Makefile qeth: bridgeport support - basic control 2014-01-15 14:48:01 -08:00
netiucv.c netiucv: improve state checking in conn_action_txdone 2013-12-17 17:17:13 -05:00
qeth_core.h s390/qeth: conclude all event processing before offlining a card 2019-05-02 21:41:38 +01:00
qeth_core_main.c s390/qeth: conclude all event processing before offlining a card 2019-05-02 21:41:38 +01:00
qeth_core_mpc.c qeth: bridgeport support - address notifications 2014-01-15 14:48:01 -08:00
qeth_core_mpc.h qeth: bridgeport support - address notifications 2014-01-15 14:48:01 -08:00
qeth_core_sys.c s390/qeth: unbreak OSM and OSN support 2017-09-15 18:29:34 +01:00
qeth_l2.h s390/qeth: unbreak OSM and OSN support 2017-09-15 18:29:34 +01:00
qeth_l2_main.c s390/qeth: conclude all event processing before offlining a card 2019-05-02 21:41:38 +01:00
qeth_l2_sys.c s390/qeth: unbreak OSM and OSN support 2017-09-15 18:29:34 +01:00
qeth_l3.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
qeth_l3_main.c s390/qeth: conclude all event processing before offlining a card 2019-05-02 21:41:38 +01:00
qeth_l3_sys.c s390: replace strict_strtoul() with kstrtoul() 2013-08-22 12:20:00 +02:00
smsgiucv.c smsgiucv: reestablish IUCV path after resume 2012-10-16 14:41:46 -04:00
smsgiucv.h s390/comments: unify copyright messages and remove file names 2012-07-20 11:15:04 +02:00
smsgiucv_app.c Driver core: driver_find() drops reference before returning 2012-01-24 16:00:34 -08:00