bianbu-linux-6.6/drivers/platform/x86/intel/ifs
Jithu Joseph 2545deba31 platform/x86/intel/ifs: release cpus_read_lock()
Couple of error paths in do_core_test() was returning directly without
doing a necessary cpus_read_unlock().

Following lockdep warning was observed when exercising these scenarios
with PROVE_RAW_LOCK_NESTING enabled:

[  139.304775] ================================================
[  139.311185] WARNING: lock held when returning to user space!
[  139.317593] 6.6.0-rc2ifs01+ #11 Tainted: G S      W I
[  139.324499] ------------------------------------------------
[  139.330908] bash/11476 is leaving the kernel with locks still held!
[  139.338000] 1 lock held by bash/11476:
[  139.342262]  #0: ffffffffaa26c930 (cpu_hotplug_lock){++++}-{0:0}, at:
do_core_test+0x35/0x1c0 [intel_ifs]

Fix the flow so that all scenarios release the lock prior to returning
from the function.

Fixes: 5210fb4e18 ("platform/x86/intel/ifs: Sysfs interface for Array BIST")
Cc: stable@vger.kernel.org
Signed-off-by: Jithu Joseph <jithu.joseph@intel.com>
Link: https://lore.kernel.org/r/20230927184824.2566086-1-jithu.joseph@intel.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2023-10-04 11:52:44 +02:00
..
core.c platform/x86/intel/ifs: Sysfs interface for Array BIST 2023-03-27 16:10:20 +02:00
ifs.h platform/x86/intel/ifs: Update IFS doc 2023-03-27 16:10:20 +02:00
Kconfig Revert "platform/x86/intel/ifs: Mark as BROKEN" 2022-11-19 11:31:20 +01:00
load.c x86/microcode/intel: Rename get_datasize() since its used externally 2023-08-13 18:42:55 +02:00
Makefile platform/x86/intel/ifs: Add IFS sysfs interface 2022-05-12 15:35:29 +02:00
runtest.c platform/x86/intel/ifs: release cpus_read_lock() 2023-10-04 11:52:44 +02:00
sysfs.c modules-6.4-rc1 2023-04-27 16:36:55 -07:00