summaryrefslogtreecommitdiffstats
path: root/block/kyber-iosched.c
diff options
context:
space:
mode:
authorHarald Freudenberger <freude@linux.ibm.com>2021-10-14 09:58:24 +0200
committerVasily Gorbik <gor@linux.ibm.com>2021-10-26 15:21:27 +0200
commit3826350e6dd435e244eb6e47abad5a47c169ebc2 (patch)
tree934ed73ae925d1854e90981f495e3375224dac99 /block/kyber-iosched.c
parentMerge branch 'fixes' into features (diff)
downloadlinux-3826350e6dd435e244eb6e47abad5a47c169ebc2.tar.xz
linux-3826350e6dd435e244eb6e47abad5a47c169ebc2.zip
s390/ap: Fix hanging ioctl caused by orphaned replies
When a queue is switched to soft offline during heavy load and later switched to soft online again and now used, it may be that the caller is blocked forever in the ioctl call. The failure occurs because there is a pending reply after the queue(s) have been switched to offline. This orphaned reply is received when the queue is switched to online and is accidentally counted for the outstanding replies. So when there was a valid outstanding reply and this orphaned reply is received it counts as the outstanding one thus dropping the outstanding counter to 0. Voila, with this counter the receive function is not called any more and the real outstanding reply is never received (until another request comes in...) and the ioctl blocks. The fix is simple. However, instead of readjusting the counter when an orphaned reply is detected, I check the queue status for not empty and compare this to the outstanding counter. So if the queue is not empty then the counter must not drop to 0 but at least have a value of 1. Signed-off-by: Harald Freudenberger <freude@linux.ibm.com> Cc: stable@vger.kernel.org Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'block/kyber-iosched.c')
0 files changed, 0 insertions, 0 deletions