* [PATCH] lsm: remove redundant NULL check in security_init()
@ 2026-09-28 17:06 Sang-Heon Jeon
2026-09-28 17:09 ` sashiko-bot
2026-09-30 1:47 ` Paul Moore
0 siblings, 2 replies; 3+ messages in thread
From: Sang-Heon Jeon @ 2026-09-28 17:06 UTC (permalink / raw)
To: James Morris, Paul Moore, Serge E. Hallyn; +Cc: linux-security-module
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] lsm: remove redundant NULL check in security_init()
2026-09-28 17:06 [PATCH] lsm: remove redundant NULL check in security_init() Sang-Heon Jeon
@ 2026-09-28 17:09 ` sashiko-bot
2026-09-30 1:47 ` Paul Moore
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-09-28 17:09 UTC (permalink / raw)
Cc: linux-security-module
> 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>
Sashiko has reviewed this patch and found no issues. It looks great!
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260928170639.413560-1-ekffu200098@gmail.com?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lsm: remove redundant NULL check in security_init()
2026-09-28 17:06 [PATCH] lsm: remove redundant NULL check in security_init() Sang-Heon Jeon
2026-09-28 17:09 ` sashiko-bot
@ 2026-09-30 1:47 ` Paul Moore
1 sibling, 0 replies; 3+ messages in thread
From: Paul Moore @ 2026-09-30 1:47 UTC (permalink / raw)
To: Sang-Heon Jeon, James Morris, Serge E. Hallyn; +Cc: linux-security-module
On Sep 28, 2026 Sang-Heon Jeon <ekffu200098@gmail.com> wrote:
>
> 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(-)
Merged into lsm/dev, thanks.
--
paul-moore.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-09-30 1:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-28 17:06 [PATCH] lsm: remove redundant NULL check in security_init() Sang-Heon Jeon
2026-09-28 17:09 ` sashiko-bot
2026-09-30 1:47 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox