s390/qeth: cancel close_dev work before removing a card

commit c2780c1a3f upstream.

A card's close_dev work is scheduled on a driver-wide workqueue. If the
card is removed and freed while the work is still active, this causes a
use-after-free.
So make sure that the work is completed before freeing the card.

Fixes: 0f54761d16 ("qeth: Support VEPA mode")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16: adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Julian Wiedmann 2019-02-04 17:40:08 +01:00 • committed by Ben Hutchings
commit 84e4dff779
3 changed files with 3 additions and 0 deletions