android_kernel_motorola_sm6375/drivers/s390
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Peter Oberparleiter 8b3c9b69fa s390/cio: Fix CHPID "configure" attribute caching
[ Upstream commit 32ae4a2992529e2c7934e422035fad1d9b0f1fb5 ]

In some environments, the SCLP firmware interface used to query a
CHPID's configured state is not supported. On these environments,
rapidly reading the corresponding sysfs attribute produces inconsistent
results:

  $ cat /sys/devices/css0/chp0.00/configure
  cat: /sys/devices/css0/chp0.00/configure: Operation not supported
  $ cat /sys/devices/css0/chp0.00/configure
  3

This occurs for example when Linux is run as a KVM guest. The
inconsistency is a result of CIO using cached results for generating
the value of the "configure" attribute while failing to handle the
situation where no data was returned by SCLP.

Fix this by not updating the cache-expiration timestamp when SCLP
returns no data. With the fix applied, the system response is
consistent:

  $ cat /sys/devices/css0/chp0.00/configure
  cat: /sys/devices/css0/chp0.00/configure: Operation not supported
  $ cat /sys/devices/css0/chp0.00/configure
  cat: /sys/devices/css0/chp0.00/configure: Operation not supported

Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Reviewed-by: Eric Farman <farman@linux.ibm.com>
Tested-by: Eric Farman <farman@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-04-10 14:29:36 +02:00
..
block s390/dasd: fix error recovery leading to data corruption on ESE devices 2024-09-04 13:14:49 +02:00
char s390/sclp_vt220: Convert newlines to CRLF instead of LFCR 2024-11-08 16:20:48 +01:00
cio s390/cio: Fix CHPID "configure" attribute caching 2025-04-10 14:29:36 +02:00
crypto s390/pkey: Wipe sensitive data on failure 2024-07-18 11:40:49 +02:00
net s390/qeth: Fix potential loss of L3-IP@ in case of network issues 2024-03-01 13:13:34 +01:00
scsi
virtio
Makefile