diff options
author | Jithu Joseph <[email protected]> | 2023-09-27 11:48:24 -0700 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2023-10-04 11:52:44 +0200 |
commit | 2545deba314eec91dc5ca1a954fe97f91ef1cf07 (patch) | |
tree | 97c45a5bb426ac1e754cbeb7be0caff2702276b1 /lib/test_fortify/write_overflow-strncpy-src.c | |
parent | 981368e1440b76f68b1ac8f5fb14e739f80ecc4e (diff) |
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: 5210fb4e1880 ("platform/x86/intel/ifs: Sysfs interface for Array BIST")
Cc: [email protected]
Signed-off-by: Jithu Joseph <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Reviewed-by: Hans de Goede <[email protected]>
Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'lib/test_fortify/write_overflow-strncpy-src.c')
0 files changed, 0 insertions, 0 deletions