linux/arch
Kajol Jain 2b03b50d1d powerpc/hv-gpci: Add return value check in affinity_domain_via_partition_show function
[ Upstream commit 070b71f428 ]

To access hv-gpci kernel interface files data, the
"Enable Performance Information Collection" option has to be set
in hmc. Incase that option is not set and user try to read
the interface files, it should give error message as
operation not permitted.

Result of accessing added interface files with disabled
performance collection option:

[command]# cat processor_bus_topology
cat: processor_bus_topology: Operation not permitted

[command]# cat processor_config
cat: processor_config: Operation not permitted

[command]# cat affinity_domain_via_domain
cat: affinity_domain_via_domain: Operation not permitted

[command]# cat affinity_domain_via_virtual_processor
cat: affinity_domain_via_virtual_processor: Operation not permitted

[command]# cat affinity_domain_via_partition

Based on above result there is no error message when reading
affinity_domain_via_partition file because of missing
check for failed hcall. Fix this issue by adding
a check in the start of affinity_domain_via_partition_show
function, to return error incase hcall fails, with error type
other then H_PARAMETER.

Fixes: a15e0d6a69 ("powerpc/hv_gpci: Add sysfs file inside hv_gpci device to show affinity domain via partition information")
Reported-by: Disha Goel <disgoel@linux.vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://msgid.link/20231116122033.160964-1-kjain@linux.ibm.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-25 15:35:13 -08:00
..
alpha Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
arc ARC: fix smatch warning 2024-01-20 11:51:44 +01:00
arm ARM: sun9i: smp: fix return code check of of_property_match_string 2024-01-20 11:51:47 +01:00
arm64 posix-timers: Get rid of [COMPAT_]SYS_NI() uses 2024-01-20 11:51:46 +01:00
csky arch/csky 2nd patches for 6.6 2023-09-01 08:02:45 -07:00
hexagon Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
ia64 cpu-hotplug: Provide prototypes for arch CPU registration 2023-10-11 14:27:37 +02:00
loongarch efi/loongarch: Use load address to calculate kernel entry address 2024-01-20 11:51:43 +01:00
m68k ata changes for 6.6 2023-09-05 12:37:28 -07:00
microblaze Microblaze patches for 6.6-rc1 2023-09-05 10:15:22 -07:00
mips MIPS: dts: loongson: drop incorrect dwmac fallback compatible 2024-01-20 11:51:43 +01:00
nios2 Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
openrisc OpenRISC updates for 6.6 2023-09-05 10:09:31 -07:00
parisc parisc: Fix asm operand number out of range build error in bug table 2023-12-13 18:45:30 +01:00
powerpc powerpc/hv-gpci: Add return value check in affinity_domain_via_partition_show function 2024-01-25 15:35:13 -08:00
riscv posix-timers: Get rid of [COMPAT_]SYS_NI() uses 2024-01-20 11:51:46 +01:00
s390 posix-timers: Get rid of [COMPAT_]SYS_NI() uses 2024-01-20 11:51:46 +01:00
sh sh: bios: Revive earlyprintk support 2023-11-20 11:59:22 +01:00
sparc sparc32: fix a braino in fault handling in csum_and_copy_..._user() 2023-10-27 20:06:06 -04:00
um This pull request contains the following changes for UML: 2023-09-04 11:32:21 -07:00
x86 x86: Fix CPUIDLE_FLAG_IRQ_ENABLE leaking timer reprogram 2024-01-25 15:35:12 -08:00
xtensa xtensa: boot/lib: fix function prototypes 2023-09-20 05:03:30 -07:00
.gitignore
Kconfig Add x86 shadow stack support 2023-08-31 12:20:12 -07:00