From: Jarkko Sakkinen <jarkko@kernel.org>
To: David Howells <dhowells@redhat.com>
Cc: Jarkko Sakkinen <jarkko@kernel.org>,
bpf@vger.kernel.org, dm-devel@lists.linux.dev,
fsverity@lists.linux.dev, keyrings@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-kselftest@vger.kernel.org,
linux-security-module@vger.kernel.org,
Alasdair Kergon <agk@redhat.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Alexei Starovoitov <ast@kernel.org>, Alex Shi <alexs@kernel.org>,
Anastasia Eskova <anastasia.eskova@ibm.com>,
Andrew Morton <akpm@linux-foundation.org>,
Andrii Nakryiko <andrii@kernel.org>,
Benjamin Marzinski <bmarzins@redhat.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
Daniel Borkmann <daniel@iogearbox.net>,
Dongliang Mu <dzm91@hust.edu.cn>,
Eduard Zingerman <eddyz87@gmail.com>,
Emil Tsalapatis <emil@etsalapatis.com>,
Eric Biggers <ebiggers@kernel.org>,
Ignat Korchagin <ignat@linux.win>,
Heiko Carstens <hca@linux.ibm.com>,
Ihor Solodrai <ihor.solodrai@linux.dev>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
James Morris <jmorris@namei.org>, Jiri Olsa <jolsa@kernel.org>,
Jonathan Corbet <corbet@lwn.net>,
Kumar Kartikeya Dwivedi <memxor@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
Mike Snitzer <snitzer@kernel.org>,
Mikulas Patocka <mpatocka@redhat.com>,
Mimi Zohar <zohar@linux.ibm.com>,
Paul Moore <paul@paul-moore.com>,
Peter Oberparleiter <oberpar@linux.ibm.com>,
Randy Dunlap <rdunlap@infradead.org>,
Roberto Sassu <roberto.sassu@huawei.com>,
"Serge E. Hallyn" <serge@hallyn.com>,
Shuah Khan <skhan@linuxfoundation.org>,
Song Liu <song@kernel.org>, Sven Schnelle <svens@linux.ibm.com>,
"Theodore Y. Ts'o" <tytso@mit.edu>,
Vasily Gorbik <gor@linux.ibm.com>,
Yanteng Si <si.yanteng@linux.dev>,
Yonghong Song <yonghong.song@linux.dev>,
stable@vger.kernel.org
Subject: [PATCH v11 3/6] s390/cert_store: Skip keys that disappeared during invalidation
Date: Sat, 14 Nov 2026 18:12:08 +0200 [thread overview]
Message-ID: <20261114161211.376859-4-jarkko@kernel.org> (raw)
In-Reply-To: <20261114161211.376859-1-jarkko@kernel.org>
key_lookup() can return NULL for an unlinked key. Skip such keys instead.
Cc: David Howells <dhowells@redhat.com>
Cc: stable@vger.kernel.org # v6.6+
Fixes: 8cf57d7217c3 ("s390: add support for user-defined certificates")
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
---
arch/s390/kernel/cert_store.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/s390/kernel/cert_store.c b/arch/s390/kernel/cert_store.c
index 0a10b31d68af..bc682216fa7f 100644
--- a/arch/s390/kernel/cert_store.c
+++ b/arch/s390/kernel/cert_store.c
@@ -333,6 +333,9 @@ static int invalidate_keyring_keys(struct key *keyring)
for (key_index = 0; key_index < num_keys; key_index++) {
current_key = key_lookup(key_array[key_index]);
+ if (!current_key)
+ continue;
+
pr_dbf_msg("Invalidating key %08x", current_key->serial);
key_invalidate(current_key);
--
2.47.3
next prev parent reply other threads:[~2026-11-14 16:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-14 16:12 [PATCH v11 0/6] KEYS: Replace assoc_array with Jarkko Sakkinen
2026-11-14 16:12 ` [PATCH v11 1/6] s390/cert_store: Pin the user session keyring Jarkko Sakkinen
2026-11-14 16:29 ` sashiko-bot
2026-11-14 16:12 ` [PATCH v11 2/6] s390/cert_store: Return an owned reference from find_cs_keyring() Jarkko Sakkinen
2026-11-14 16:26 ` sashiko-bot
2026-11-14 16:12 ` Jarkko Sakkinen [this message]
2026-11-14 16:24 ` [PATCH v11 3/6] s390/cert_store: Skip keys that disappeared during invalidation sashiko-bot
2026-11-14 16:12 ` [PATCH v11 4/6] KEYS: Introduce keyring_is_empty() Jarkko Sakkinen
2026-11-14 16:19 ` sashiko-bot
2026-11-14 16:12 ` [PATCH v11 5/6] KEYS: Replace assoc_array with rhashtable Jarkko Sakkinen
2026-11-14 16:12 ` [PATCH v11 6/6] lib: Remove assoc_array Jarkko Sakkinen
2026-11-14 16:18 ` sashiko-bot
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=20261114161211.376859-4-jarkko@kernel.org \
--to=jarkko@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=agk@redhat.com \
--cc=agordeev@linux.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=alexs@kernel.org \
--cc=anastasia.eskova@ibm.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bmarzins@redhat.com \
--cc=borntraeger@linux.ibm.com \
--cc=bpf@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=daniel@iogearbox.net \
--cc=dhowells@redhat.com \
--cc=dm-devel@lists.linux.dev \
--cc=dzm91@hust.edu.cn \
--cc=ebiggers@kernel.org \
--cc=eddyz87@gmail.com \
--cc=emil@etsalapatis.com \
--cc=fsverity@lists.linux.dev \
--cc=gor@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=ignat@linux.win \
--cc=ihor.solodrai@linux.dev \
--cc=jmorris@namei.org \
--cc=jolsa@kernel.org \
--cc=keyrings@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=martin.lau@linux.dev \
--cc=memxor@gmail.com \
--cc=mpatocka@redhat.com \
--cc=oberpar@linux.ibm.com \
--cc=paul@paul-moore.com \
--cc=rdunlap@infradead.org \
--cc=roberto.sassu@huawei.com \
--cc=serge@hallyn.com \
--cc=si.yanteng@linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=snitzer@kernel.org \
--cc=song@kernel.org \
--cc=stable@vger.kernel.org \
--cc=svens@linux.ibm.com \
--cc=torvalds@linux-foundation.org \
--cc=tytso@mit.edu \
--cc=yonghong.song@linux.dev \
--cc=zohar@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.