[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <a7d493c678d5836577b0dc703e5f0adaa457a7f0.1626945419.git-series.a.fatoum@pengutronix.de>
Date: Thu, 22 Jul 2021 11:18:01 +0200
From: Ahmad Fatoum <a.fatoum@...gutronix.de>
To: David Howells <dhowells@...hat.com>,
Jarkko Sakkinen <jarkko@...nel.org>,
James Morris <jmorris@...ei.org>,
"Serge E. Hallyn" <serge@...lyn.com>,
Alasdair Kergon <agk@...hat.com>,
Mike Snitzer <snitzer@...hat.com>, dm-devel@...hat.com,
Song Liu <song@...nel.org>, Richard Weinberger <richard@....at>
Cc: kernel@...gutronix.de, Ahmad Fatoum <a.fatoum@...gutronix.de>,
linux-kernel@...r.kernel.org, linux-raid@...r.kernel.org,
keyrings@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-security-module@...r.kernel.org,
linux-integrity@...r.kernel.org
Subject: [RFC PATCH v1 3/4] ubifs: auth: remove never hit key type error check
key_request accepts a key type as its first argument. If it returns a
valid pointer, it should always have this same requested key type.
Indeed other request_key users surveyed such as dm-crypt, ecryptfs
and fscrypt v1 also don't check the key type. Therefore drop the
apparently unneeded check.
Signed-off-by: Ahmad Fatoum <a.fatoum@...gutronix.de>
---
To: David Howells <dhowells@...hat.com>
To: Jarkko Sakkinen <jarkko@...nel.org>
To: James Morris <jmorris@...ei.org>
To: "Serge E. Hallyn" <serge@...lyn.com>
To: Alasdair Kergon <agk@...hat.com>
To: Mike Snitzer <snitzer@...hat.com>
To: dm-devel@...hat.com
To: Song Liu <song@...nel.org>
To: Richard Weinberger <richard@....at>
Cc: linux-kernel@...r.kernel.org
Cc: linux-raid@...r.kernel.org
Cc: keyrings@...r.kernel.org
Cc: linux-mtd@...ts.infradead.org
Cc: linux-security-module@...r.kernel.org
Cc: linux-integrity@...r.kernel.org
---
fs/ubifs/auth.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/fs/ubifs/auth.c b/fs/ubifs/auth.c
index e564d5ff8781..6a0b8d858d81 100644
--- a/fs/ubifs/auth.c
+++ b/fs/ubifs/auth.c
@@ -286,12 +286,6 @@ int ubifs_init_authentication(struct ubifs_info *c)
down_read(&keyring_key->sem);
- if (keyring_key->type != &key_type_logon) {
- ubifs_err(c, "key type must be logon");
- err = -ENOKEY;
- goto out;
- }
-
ukp = user_key_payload_locked(keyring_key);
if (!ukp) {
/* key was revoked before we acquired its semaphore */
--
git-series 0.9.1
Powered by blists - more mailing lists