From: Heiko Carstens <hca@linux.ibm.com>
To: Alexander Gordeev <agordeev@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Vasily Gorbik <gor@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Claudio Imbrenda <imbrenda@linux.ibm.com>
Cc: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] s390/sysinfo: Add context analysis attributes
Date: Mon, 3 Aug 2026 19:21:41 +0200 [thread overview]
Message-ID: <20260803172144.827049-2-hca@linux.ibm.com> (raw)
In-Reply-To: <20260803172144.827049-1-hca@linux.ibm.com>
Add context analysis attributes to service_level_start() and
service_level_stop() to specify that those functions only
acquire or release a lock.
Addresses the following warnings:
arch/s390/kernel/sysinfo.c:331:1: warning: rw_semaphore 'service_level_sem' is still held at the end of function
arch/s390/kernel/sysinfo.c:329:2: note: rw_semaphore acquired here
329 | down_read(&service_level_sem);
arch/s390/kernel/sysinfo.c:340:2: warning: releasing rw_semaphore 'service_level_sem' that was not held
340 | up_read(&service_level_sem);
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
---
arch/s390/kernel/sysinfo.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/s390/kernel/sysinfo.c b/arch/s390/kernel/sysinfo.c
index 33ca3e47a0e6..45b4f448fe3d 100644
--- a/arch/s390/kernel/sysinfo.c
+++ b/arch/s390/kernel/sysinfo.c
@@ -325,6 +325,7 @@ int unregister_service_level(struct service_level *slr)
EXPORT_SYMBOL(unregister_service_level);
static void *service_level_start(struct seq_file *m, loff_t *pos)
+__acquires_shared(service_level_sem)
{
down_read(&service_level_sem);
return seq_list_start(&service_level_list, *pos);
@@ -336,6 +337,7 @@ static void *service_level_next(struct seq_file *m, void *p, loff_t *pos)
}
static void service_level_stop(struct seq_file *m, void *p)
+__releases_shared(service_level_sem)
{
up_read(&service_level_sem);
}
--
2.53.0
next prev parent reply other threads:[~2026-08-03 17:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-03 17:21 [PATCH 0/4] s390: Enable CONTEXT_ANALYSIS for various directories Heiko Carstens
2026-08-03 17:21 ` Heiko Carstens [this message]
2026-08-03 17:21 ` [PATCH 2/4] s390/mm: Add __context_unsafe() attribute to do_secure_storage_access() Heiko Carstens
2026-08-03 17:21 ` [PATCH 3/4] s390/mm: Add __context_unsafe() attribute to gmap helper functions Heiko Carstens
2026-08-04 10:30 ` Claudio Imbrenda
2026-08-03 17:21 ` [PATCH 4/4] s390: Enable CONTEXT_ANALYSIS for various directories Heiko Carstens
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260803172144.827049-2-hca@linux.ibm.com \
--to=hca@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=gor@linux.ibm.com \
--cc=imbrenda@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=svens@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox