From: Sang-Heon Jeon <ekffu200098@gmail.com>
To: James Morris <jmorris@namei.org>,
Paul Moore <paul@paul-moore.com>,
"Serge E. Hallyn" <serge@hallyn.com>
Cc: linux-security-module@vger.kernel.org
Subject: [PATCH] lsm: remove redundant NULL check in security_init()
Date: Tue, 29 Sep 2026 02:06:37 +0900 [thread overview]
Message-ID: <20260928170639.413560-1-ekffu200098@gmail.com> (raw)
Since commit 5137e583ba26 ("lsm: cleanup the debug and console output
in lsm_init.c"), the NULL check for lsm_order_legacy in security_init()
has no effect.
So remove the check.
No functional change.
Signed-off-by: Sang-Heon Jeon <ekffu200098@gmail.com>
---
security/lsm_init.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/security/lsm_init.c b/security/lsm_init.c
index dbda7771013b..8d5ecea99c46 100644
--- a/security/lsm_init.c
+++ b/security/lsm_init.c
@@ -431,8 +431,7 @@ int __init security_init(void)
}
if (lsm_order_cmdline) {
- if (lsm_order_legacy)
- lsm_order_legacy = NULL;
+ lsm_order_legacy = NULL;
lsm_order_parse(lsm_order_cmdline, "cmdline");
} else
lsm_order_parse(lsm_order_builtin, "builtin");
base-commit: 63b4c8561b436e8950409d6041fce43f12936f59
--
2.43.0
next reply other threads:[~2026-09-28 17:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-28 17:06 Sang-Heon Jeon [this message]
2026-09-28 17:09 ` [PATCH] lsm: remove redundant NULL check in security_init() sashiko-bot
2026-09-30 1:47 ` Paul Moore
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=20260928170639.413560-1-ekffu200098@gmail.com \
--to=ekffu200098@gmail.com \
--cc=jmorris@namei.org \
--cc=linux-security-module@vger.kernel.org \
--cc=paul@paul-moore.com \
--cc=serge@hallyn.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