[PATCH 2/4] s390/mm: Add __context_unsafe() attribute to do_secure_storage_access()

From: Heiko Carstens

Date: Mon Aug 03 2026 - 14:12:11 EST


Compiling do_secure_storage_access() with context analysis enabled
results in this warning:

arch/s390/mm/fault.c:472:3: warning: releasing spinlock 'fw.ptl' that was not held
472 | folio_walk_end(&fw, vma);

Problem is that folio_walk_end() comes without the required context
analysis attribute. Also the proper attribute cannot be added easily,
since folio_walk_end() is a macro, and not a function.

For the time being disable context analysis only for
do_secure_storage_access() until this is resolved.

Signed-off-by: Heiko Carstens <hca@xxxxxxxxxxxxx>
---
arch/s390/mm/fault.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/arch/s390/mm/fault.c b/arch/s390/mm/fault.c
index 028aeb9c48d6..5af448fca962 100644
--- a/arch/s390/mm/fault.c
+++ b/arch/s390/mm/fault.c
@@ -406,6 +406,7 @@ NOKPROBE_SYMBOL(do_dat_exception);
#if IS_ENABLED(CONFIG_KVM)

void do_secure_storage_access(struct pt_regs *regs)
+__context_unsafe(/* folio_walk_end() not instrumented */)
{
union teid teid = { .val = regs->int_parm_long };
unsigned long addr = get_fault_address(regs);
--
2.53.0