linux-brain/drivers/s390
Julian Wiedmann f3d26ce9ce s390/qeth: fix IPA command submission race
[ Upstream commit d22ffb5a71 ]

If multiple IPA commands are build & sent out concurrently,
fill_ipacmd_header() may assign a seqno value to a command that's
different from what send_control_data() later assigns to this command's
reply.
This is due to other commands passing through send_control_data(),
and incrementing card->seqno.ipa along the way.

So one IPA command has no reply that's waiting for its seqno, while some
other IPA command has multiple reply objects waiting for it.
Only one of those waiting replies wins, and the other(s) times out and
triggers a recovery via send_ipa_cmd().

Fix this by making sure that the same seqno value is assigned to
a command and its reply object.
Do so immediately before submitting the command & while holding the
irq_pending "lock", to produce nicely ascending seqnos.

As a side effect, *all* IPA commands now use a reply object that's
waiting for its actual seqno. Previously, early IPA commands that were
submitted while the card was still DOWN used the "catch-all" IDX seqno.

Signed-off-by: Julian Wiedmann <jwi@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-11 16:21:34 +01:00
..
block s390/dasd: fix wrongly assigned configuration data 2018-03-03 10:23:25 +01:00
char s390/vmlogrdr: fix IUCV buffer allocation 2017-01-09 08:32:22 +01:00
cio s390/chsc: Add exception handler for CHSC instruction 2017-03-15 10:02:41 +08:00
crypto s390/zcrypt: Introduce CEX6 toleration 2017-03-22 12:43:38 +01:00
net s390/qeth: fix IPA command submission race 2018-03-11 16:21:34 +01:00
scsi scsi: zfcp: fix erp_action use-before-initialize in REC action trace 2017-11-02 09:49:14 +01:00
virtio virtio/s390: deprecate old transport 2016-08-09 13:42:41 +03:00
Makefile virtio/s390: rename drivers/s390/kvm -> drivers/s390/virtio 2015-07-07 14:27:06 +03:00