Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8881
b: refs/heads/master
c: f556196
h: refs/heads/master
i:
  8879: 3c34457
v: v3
  • Loading branch information
David Woodhouse committed Jul 13, 2005
1 parent a5e61b2 commit 2371efb
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 582edda586120004d0fb67113115fa442a0a1571
refs/heads/master: f55619642e863990d5a46cf2c2c840170d22a9f9
13 changes: 8 additions & 5 deletions trunk/kernel/auditsc.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
#include <linux/time.h>
#include <linux/kthread.h>
#include <linux/netlink.h>
#include <linux/compiler.h>
#include <asm/unistd.h>

/* 0 = no checking
Expand Down Expand Up @@ -778,13 +779,13 @@ static void audit_log_task_info(struct audit_buffer *ab)
up_read(&mm->mmap_sem);
}

static void audit_log_exit(struct audit_context *context)
static void audit_log_exit(struct audit_context *context, unsigned int gfp_mask)
{
int i;
struct audit_buffer *ab;
struct audit_aux_data *aux;

ab = audit_log_start(context, GFP_KERNEL, AUDIT_SYSCALL);
ab = audit_log_start(context, gfp_mask, AUDIT_SYSCALL);
if (!ab)
return; /* audit_panic has been called */
audit_log_format(ab, "arch=%x syscall=%d",
Expand Down Expand Up @@ -900,9 +901,11 @@ void audit_free(struct task_struct *tsk)
return;

/* Check for system calls that do not go through the exit
* function (e.g., exit_group), then free context block. */
* function (e.g., exit_group), then free context block.
* We use GFP_ATOMIC here because we might be doing this
* in the context of the idle thread */
if (context->in_syscall && context->auditable)
audit_log_exit(context);
audit_log_exit(context, GFP_ATOMIC);

audit_free_context(context);
}
Expand Down Expand Up @@ -1007,7 +1010,7 @@ void audit_syscall_exit(struct task_struct *tsk, int valid, long return_code)
return;

if (context->in_syscall && context->auditable)
audit_log_exit(context);
audit_log_exit(context, GFP_KERNEL);

context->in_syscall = 0;
context->auditable = 0;
Expand Down

0 comments on commit 2371efb

Please sign in to comment.