linux/drivers/s390/net
Julian Wiedmann ce28867fd2 s390/qeth: don't clobber buffer on async TX completion
If qeth_qdio_output_handler() detects that a transmit requires async
completion, it replaces the pending buffer's metadata object
(qeth_qdio_out_buffer) so that this queue buffer can be re-used while
the data is pending completion.

Later when the CQ indicates async completion of such a metadata object,
qeth_qdio_cq_handler() tries to free any data associated with this
object (since HW has now completed the transfer). By calling
qeth_clear_output_buffer(), it erronously operates on the queue buffer
that _previously_ belonged to this transfer ... but which has been
potentially re-used several times by now.
This results in double-free's of the buffer's data, and failing
transmits as the buffer descriptor is scrubbed in mid-air.

The correct way of handling this situation is to
1. scrub the queue buffer when it is prepared for re-use, and
2. later obtain the data addresses from the async-completion notifier
   (ie. the AOB), instead of the queue buffer.

All this only affects qeth devices used for af_iucv HiperTransport.

Fixes: 0da9581ddb ("qeth: exploit asynchronous delivery of storage blocks")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-30 21:19:48 +09:00
..
ctcm_dbug.c
ctcm_dbug.h
ctcm_fsms.c
ctcm_fsms.h
ctcm_main.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
ctcm_main.h
ctcm_mpc.c
ctcm_mpc.h
ctcm_sysfs.c
fsm.c
fsm.h
Kconfig
lcs.c s390/net: set HW port number in netdevice 2018-04-27 13:38:47 -04:00
lcs.h
Makefile
netiucv.c
qeth_core.h s390/qeth: don't clobber buffer on async TX completion 2018-06-30 21:19:48 +09:00
qeth_core_main.c s390/qeth: don't clobber buffer on async TX completion 2018-06-30 21:19:48 +09:00
qeth_core_mpc.c
qeth_core_mpc.h s390/qeth: add IPv6 RX checksum offload support 2018-04-27 13:38:49 -04:00
qeth_core_sys.c s390/net: set HW port number in netdevice 2018-04-27 13:38:47 -04:00
qeth_l2.h
qeth_l2_main.c s390/qeth: avoid using is_multicast_ether_addr_64bits on (u8 *)[6] 2018-06-30 21:19:48 +09:00
qeth_l2_sys.c
qeth_l3.h s390/qeth: shrink qeth_ipaddr struct 2018-03-09 13:10:05 -05:00
qeth_l3_main.c s390/qeth: add IPv6 TX checksum offload support 2018-04-27 13:38:49 -04:00
qeth_l3_sys.c s390/qeth: extract helpers for managing special IPs 2018-03-09 13:10:05 -05:00
smsgiucv.c s390/smsgiucv: disable SMSG on module unload 2018-04-16 09:10:17 +02:00
smsgiucv.h
smsgiucv_app.c