diff options
author | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-22 15:04:33 +0100 |
---|---|---|
committer | David Woodhouse <dwmw2@shinybook.infradead.org> | 2005-06-22 15:04:33 +0100 |
commit | 9ad9ad385be27fcc7c16d290d972c6173e780a61 (patch) | |
tree | bbca700c2d88ba421a6c9c348de367eaf4de0e2c /security/selinux/hooks.c | |
parent | 177bbc733a1d9c935bc3d6efd776a6699b29b1ca (diff) | |
download | linux-stable-9ad9ad385be27fcc7c16d290d972c6173e780a61.tar.gz linux-stable-9ad9ad385be27fcc7c16d290d972c6173e780a61.tar.bz2 linux-stable-9ad9ad385be27fcc7c16d290d972c6173e780a61.zip |
AUDIT: Wait for backlog to clear when generating messages.
Add a gfp_mask to audit_log_start() and audit_log(), to reduce the
amount of GFP_ATOMIC allocation -- most of it doesn't need to be
GFP_ATOMIC. Also if the mask includes __GFP_WAIT, then wait up to
60 seconds for the auditd backlog to clear instead of immediately
abandoning the message.
The timeout should probably be made configurable, but for now it'll
suffice that it only happens if auditd is actually running.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index db845cbd5841..b5220a266dce 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3419,7 +3419,7 @@ static int selinux_nlmsg_perm(struct sock *sk, struct sk_buff *skb) err = selinux_nlmsg_lookup(isec->sclass, nlh->nlmsg_type, &perm); if (err) { if (err == -EINVAL) { - audit_log(current->audit_context, AUDIT_SELINUX_ERR, + audit_log(current->audit_context, GFP_KERNEL, AUDIT_SELINUX_ERR, "SELinux: unrecognized netlink message" " type=%hu for sclass=%hu\n", nlh->nlmsg_type, isec->sclass); |