Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

landlock: Clean up hook_ptrace_access_check()

Make variable's scope minimal in hook_ptrace_access_check().

Cc: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20251219193855.825889-3-mic@digikod.net
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Signed-off-by: Mickaël Salaün <mic@digikod.net>

+2 -2
+2 -2
security/landlock/task.c
··· 86 86 const unsigned int mode) 87 87 { 88 88 const struct landlock_cred_security *parent_subject; 89 - const struct landlock_ruleset *child_dom; 90 89 int err; 91 90 92 91 /* Quick return for non-landlocked tasks. */ ··· 95 96 96 97 scoped_guard(rcu) 97 98 { 98 - child_dom = landlock_get_task_domain(child); 99 + const struct landlock_ruleset *const child_dom = 100 + landlock_get_task_domain(child); 99 101 err = domain_ptrace(parent_subject->domain, child_dom); 100 102 } 101 103