diff options
Diffstat (limited to 'kernel/auditsc.c')
-rw-r--r-- | kernel/auditsc.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/kernel/auditsc.c b/kernel/auditsc.c index fa4bf9625456..05d31ee4f3dd 100644 --- a/kernel/auditsc.c +++ b/kernel/auditsc.c | |||
@@ -922,11 +922,11 @@ void audit_syscall_exit(int valid, long return_code) | |||
922 | * Add a name to the list of audit names for this context. | 922 | * Add a name to the list of audit names for this context. |
923 | * Called from fs/namei.c:getname(). | 923 | * Called from fs/namei.c:getname(). |
924 | */ | 924 | */ |
925 | void audit_getname(const char *name) | 925 | void __audit_getname(const char *name) |
926 | { | 926 | { |
927 | struct audit_context *context = current->audit_context; | 927 | struct audit_context *context = current->audit_context; |
928 | 928 | ||
929 | if (!context || IS_ERR(name) || !name) | 929 | if (IS_ERR(name) || !name) |
930 | return; | 930 | return; |
931 | 931 | ||
932 | if (!context->in_syscall) { | 932 | if (!context->in_syscall) { |
@@ -1189,14 +1189,11 @@ uid_t audit_get_loginuid(struct audit_context *ctx) | |||
1189 | * | 1189 | * |
1190 | * Returns 0 for success or NULL context or < 0 on error. | 1190 | * Returns 0 for success or NULL context or < 0 on error. |
1191 | */ | 1191 | */ |
1192 | int audit_ipc_obj(struct kern_ipc_perm *ipcp) | 1192 | int __audit_ipc_obj(struct kern_ipc_perm *ipcp) |
1193 | { | 1193 | { |
1194 | struct audit_aux_data_ipcctl *ax; | 1194 | struct audit_aux_data_ipcctl *ax; |
1195 | struct audit_context *context = current->audit_context; | 1195 | struct audit_context *context = current->audit_context; |
1196 | 1196 | ||
1197 | if (likely(!context)) | ||
1198 | return 0; | ||
1199 | |||
1200 | ax = kmalloc(sizeof(*ax), GFP_ATOMIC); | 1197 | ax = kmalloc(sizeof(*ax), GFP_ATOMIC); |
1201 | if (!ax) | 1198 | if (!ax) |
1202 | return -ENOMEM; | 1199 | return -ENOMEM; |
@@ -1221,14 +1218,11 @@ int audit_ipc_obj(struct kern_ipc_perm *ipcp) | |||
1221 | * | 1218 | * |
1222 | * Returns 0 for success or NULL context or < 0 on error. | 1219 | * Returns 0 for success or NULL context or < 0 on error. |
1223 | */ | 1220 | */ |
1224 | int audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) | 1221 | int __audit_ipc_set_perm(unsigned long qbytes, uid_t uid, gid_t gid, mode_t mode) |
1225 | { | 1222 | { |
1226 | struct audit_aux_data_ipcctl *ax; | 1223 | struct audit_aux_data_ipcctl *ax; |
1227 | struct audit_context *context = current->audit_context; | 1224 | struct audit_context *context = current->audit_context; |
1228 | 1225 | ||
1229 | if (likely(!context)) | ||
1230 | return 0; | ||
1231 | |||
1232 | ax = kmalloc(sizeof(*ax), GFP_ATOMIC); | 1226 | ax = kmalloc(sizeof(*ax), GFP_ATOMIC); |
1233 | if (!ax) | 1227 | if (!ax) |
1234 | return -ENOMEM; | 1228 | return -ENOMEM; |