]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
landlock: Fix formatting
authorMickaël Salaün <mic@digikod.net>
Tue, 3 Mar 2026 17:36:31 +0000 (18:36 +0100)
committerMickaël Salaün <mic@digikod.net>
Wed, 4 Mar 2026 17:28:08 +0000 (18:28 +0100)
Auto-format with clang-format -i security/landlock/*.[ch]

Cc: Günther Noack <gnoack@google.com>
Cc: Kees Cook <kees@kernel.org>
Fixes: 69050f8d6d07 ("treewide: Replace kmalloc with kmalloc_obj for non-scalar types")
Reviewed-by: Günther Noack <gnoack3000@gmail.com>
Link: https://lore.kernel.org/r/20260303173632.88040-1-mic@digikod.net
Signed-off-by: Mickaël Salaün <mic@digikod.net>
security/landlock/domain.c
security/landlock/ruleset.c

index f5b78d4766cd8653bba194b1263c12624855f214..f0d83f43afa1d28c58d72a4f5bbe353bc8e228cd 100644 (file)
@@ -94,8 +94,7 @@ static struct landlock_details *get_current_details(void)
         * allocate with GFP_KERNEL_ACCOUNT because it is independent from the
         * caller.
         */
-       details =
-               kzalloc_flex(*details, exe_path, path_size);
+       details = kzalloc_flex(*details, exe_path, path_size);
        if (!details)
                return ERR_PTR(-ENOMEM);
 
index 31987358638521682b02c85682627f4c54046552..73018dc8d6c7ec72e4ee729f39cb328d8af8803d 100644 (file)
@@ -32,9 +32,8 @@ static struct landlock_ruleset *create_ruleset(const u32 num_layers)
 {
        struct landlock_ruleset *new_ruleset;
 
-       new_ruleset =
-               kzalloc_flex(*new_ruleset, access_masks, num_layers,
-                            GFP_KERNEL_ACCOUNT);
+       new_ruleset = kzalloc_flex(*new_ruleset, access_masks, num_layers,
+                                  GFP_KERNEL_ACCOUNT);
        if (!new_ruleset)
                return ERR_PTR(-ENOMEM);
        refcount_set(&new_ruleset->usage, 1);
@@ -559,8 +558,8 @@ landlock_merge_ruleset(struct landlock_ruleset *const parent,
        if (IS_ERR(new_dom))
                return new_dom;
 
-       new_dom->hierarchy = kzalloc_obj(*new_dom->hierarchy,
-                                        GFP_KERNEL_ACCOUNT);
+       new_dom->hierarchy =
+               kzalloc_obj(*new_dom->hierarchy, GFP_KERNEL_ACCOUNT);
        if (!new_dom->hierarchy)
                return ERR_PTR(-ENOMEM);