]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: remove CARD_FROM_CDEV helper
authorJulian Wiedmann <jwi@linux.ibm.com>
Wed, 26 Sep 2018 16:29:11 +0000 (18:29 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Sep 2018 16:56:07 +0000 (09:56 -0700)
commit11f5fb2c75359548a971b6832998e9f9e1f53614
treec9887cac68c41adc43eaf78beffccdace4491b59
parent6be6ae2d33a5136ec9297e7b2c76f7d5181232fd
s390/qeth: remove CARD_FROM_CDEV helper

The cdev-to-card translation walks through two layers of drvdata,
with no locking or refcounting (where eg. the ccwgroup core only
accesses a cdev's drvdata while holding the ccwlock).

This might be safe for now, but any careless usage of the helper has the
potential for subtle races and use-after-free's. Luckily there's only
one occurrence where we _really_ need it (in qeth_irq()), for any other
user we can just pass through an appropriate card pointer.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c