summaryrefslogtreecommitdiff
path: root/kernel/auditsc.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 16:37:42 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2026-02-21 17:09:51 -0800
commitbf4afc53b77aeaa48b5409da5c8da6bb4eff7f43 (patch)
tree01fdd9d27f1b272bef0127966e08eac44d134d0a /kernel/auditsc.c
parente19e1b480ac73c3e62ffebbca1174f0f511f43e7 (diff)
downloadlwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.tar.gz
lwn-bf4afc53b77aeaa48b5409da5c8da6bb4eff7f43.zip
Convert 'alloc_obj' family to use the new default GFP_KERNEL argument
This was done entirely with mindless brute force, using git grep -l '\<k[vmz]*alloc_objs*(.*, GFP_KERNEL)' | xargs sed -i 's/\(alloc_objs*(.*\), GFP_KERNEL)/\1)/' to convert the new alloc_obj() users that had a simple GFP_KERNEL argument to just drop that argument. Note that due to the extreme simplicity of the scripting, any slightly more complex cases spread over multiple lines would not be triggered: they definitely exist, but this covers the vast bulk of the cases, and the resulting diff is also then easier to check automatically. For the same reason the 'flex' versions will be done as a separate conversion. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r--kernel/auditsc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c
index e45883de200f..f6af6a8f68c4 100644
--- a/kernel/auditsc.c
+++ b/kernel/auditsc.c
@@ -255,7 +255,7 @@ static int grow_tree_refs(struct audit_context *ctx)
{
struct audit_tree_refs *p = ctx->trees;
- ctx->trees = kzalloc_obj(struct audit_tree_refs, GFP_KERNEL);
+ ctx->trees = kzalloc_obj(struct audit_tree_refs);
if (!ctx->trees) {
ctx->trees = p;
return 0;
@@ -1032,7 +1032,7 @@ static inline struct audit_context *audit_alloc_context(enum audit_state state)
{
struct audit_context *context;
- context = kzalloc_obj(*context, GFP_KERNEL);
+ context = kzalloc_obj(*context);
if (!context)
return NULL;
context->context = AUDIT_CTX_UNUSED;
@@ -2650,7 +2650,7 @@ int __audit_sockaddr(int len, void *a)
struct audit_context *context = audit_context();
if (!context->sockaddr) {
- void *p = kmalloc_obj(struct sockaddr_storage, GFP_KERNEL);
+ void *p = kmalloc_obj(struct sockaddr_storage);
if (!p)
return -ENOMEM;
@@ -2743,7 +2743,7 @@ int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
struct audit_context *context = audit_context();
struct cpu_vfs_cap_data vcaps;
- ax = kmalloc_obj(*ax, GFP_KERNEL);
+ ax = kmalloc_obj(*ax);
if (!ax)
return -ENOMEM;