From: David Howells <dhowells@redhat.com>
To: keyrings@vger.kernel.org
Cc: dhowells@redhat.com, Insu Yun <wuninsu@gmail.com>,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 3/6] keys: Be more consistent in selection of union members used
Date: Wed, 21 Oct 2015 15:27:06 +0100 [thread overview]
Message-ID: <20151021142706.31251.38071.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20151021142646.31251.6867.stgit@warthog.procyon.org.uk>
From: Insu Yun <wuninsu@gmail.com>
key->description and key->index_key.description are same because
they are unioned. But, for readability, using same name for
duplication and validation seems better.
Signed-off-by: Insu Yun <wuninsu@gmail.com>
Signed-off-by: David Howells <dhowells@redhat.com>
---
security/keys/key.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/security/keys/key.c b/security/keys/key.c
index aee2ec5a18fc..c0478465d1ac 100644
--- a/security/keys/key.c
+++ b/security/keys/key.c
@@ -278,7 +278,7 @@ struct key *key_alloc(struct key_type *type, const char *desc,
key->index_key.desc_len = desclen;
key->index_key.description = kmemdup(desc, desclen + 1, GFP_KERNEL);
- if (!key->description)
+ if (!key->index_key.description)
goto no_memory_3;
atomic_set(&key->usage, 1);
next prev parent reply other threads:[~2015-10-21 14:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-21 14:26 [PATCH 1/6] KEYS: use kvfree() in add_key David Howells
2015-10-21 14:26 ` [PATCH 2/6] certs: add .gitignore to stop git nagging about x509_certificate_list David Howells
2015-10-21 14:27 ` David Howells [this message]
2015-10-21 14:27 ` [PATCH 4/6] KEYS: Provide a script to extract the sys cert list from a vmlinux file David Howells
2015-10-21 14:27 ` [PATCH 5/6] KEYS: Provide a script to extract a module signature David Howells
2015-10-21 14:27 ` [PATCH 6/6] KEYS: Merge the type-specific data with the payload data David Howells
2015-10-21 14:29 ` [PATCH 1/6] KEYS: use kvfree() in add_key David Howells
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=20151021142706.31251.38071.stgit@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=keyrings@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=wuninsu@gmail.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
all inboxes | Powered by JetHome®