linux/drivers/s390
Harald Freudenberger d39fae45c9 s390/zcrypt: return EIO when msg retry limit reached
When a msg is retried because the lower ap layer returns -EAGAIN
there is a retry limit (currently 10). When this limit is reached
the last return code from the lower layer is returned, causing
the userspace to get -1 on the ioctl with errno EAGAIN.

This EAGAIN is misleading here. After 10 retry attempts the
userspace should receive a clear failure indication like EINVAL
or EIO or ENODEV. However, the reason why these retries all
fail is unclear. On an invalid message EINVAL would be returned
by the lower layer, and if devices go away or are not available
an ENODEV is seen. So this patch now reworks the retry loops
to return EIO to userspace when the retry limit is reached.

Fixes: 91ffc519c1 ("s390/zcrypt: introduce msg tracking in zcrypt functions")
Signed-off-by: Harald Freudenberger <freude@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
2021-02-09 15:57:04 +01:00
..
block s390/dasd: fix list corruption of lcu list 2020-12-17 13:41:30 -07:00
char s390/tape: Fix spelling mistake in function name tape_3590_erp_succeded 2021-01-27 13:00:47 +01:00
cio s390/qdio: track time of last data IRQ for each device 2021-02-09 15:57:04 +01:00
crypto s390/zcrypt: return EIO when msg retry limit reached 2021-02-09 15:57:04 +01:00
net s390/qeth: fix L2 header access in qeth_l3_osa_features_check() 2021-01-07 18:54:06 -08:00
scsi SCSI misc on 20201216 2020-12-16 13:34:31 -08:00
virtio s390/virtio: remove unused pm callbacks 2020-06-16 13:44:04 +02:00
Makefile s390: remove pointless drivers-y in drivers/s390/Makefile 2019-09-16 13:21:51 +02:00