diff options
author | Harald Freudenberger <freude@linux.ibm.com> | 2021-01-21 16:03:08 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2021-02-09 15:57:04 +0100 |
commit | d39fae45c97c67b1b4da04773f2bb5a2f29088c4 (patch) | |
tree | 00b093729965cea2d471653c9fc7c6ce7ebd078d /Documentation/virt | |
parent | 5b96e6c10b632cb8ff40f3d107c4e9dece18beeb (diff) | |
download | linux-d39fae45c97c67b1b4da04773f2bb5a2f29088c4.tar.bz2 |
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: 91ffc519c199 ("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>
Diffstat (limited to 'Documentation/virt')
0 files changed, 0 insertions, 0 deletions