* [PATCH 1/3][NETLABEL]: Compilation for CONFIG_AUDIT=n case.
@ 2008-02-07 17:20 Pavel Emelyanov
2008-02-13 6:35 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Pavel Emelyanov @ 2008-02-07 17:20 UTC (permalink / raw)
To: David Miller; +Cc: Linux Netdev List
The audit_log_start() will expand into an empty do { } while (0)
construction and the audit_ctx becomes unused.
The solution: push current->audit_context into audit_log_start()
directly, since it is not required in any other place in the
calling function.
Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
---
net/netlabel/netlabel_user.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/net/netlabel/netlabel_user.c b/net/netlabel/netlabel_user.c
index 85a96a3..023fc8f 100644
--- a/net/netlabel/netlabel_user.c
+++ b/net/netlabel/netlabel_user.c
@@ -96,7 +96,6 @@ int netlbl_netlink_init(void)
struct audit_buffer *netlbl_audit_start_common(int type,
struct netlbl_audit *audit_info)
{
- struct audit_context *audit_ctx = current->audit_context;
struct audit_buffer *audit_buf;
char *secctx;
u32 secctx_len;
@@ -104,7 +103,7 @@ struct audit_buffer *netlbl_audit_start_common(int type,
if (audit_enabled == 0)
return NULL;
- audit_buf = audit_log_start(audit_ctx, GFP_ATOMIC, type);
+ audit_buf = audit_log_start(current->audit_context, GFP_ATOMIC, type);
if (audit_buf == NULL)
return NULL;
--
1.5.3.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3][NETLABEL]: Compilation for CONFIG_AUDIT=n case.
2008-02-07 17:20 [PATCH 1/3][NETLABEL]: Compilation for CONFIG_AUDIT=n case Pavel Emelyanov
@ 2008-02-13 6:35 ` David Miller
2008-02-13 17:21 ` Paul Moore
0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2008-02-13 6:35 UTC (permalink / raw)
To: xemul; +Cc: netdev
From: Pavel Emelyanov <xemul@openvz.org>
Date: Thu, 07 Feb 2008 20:20:30 +0300
> The audit_log_start() will expand into an empty do { } while (0)
> construction and the audit_ctx becomes unused.
>
> The solution: push current->audit_context into audit_log_start()
> directly, since it is not required in any other place in the
> calling function.
>
> Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/3][NETLABEL]: Compilation for CONFIG_AUDIT=n case.
2008-02-13 6:35 ` David Miller
@ 2008-02-13 17:21 ` Paul Moore
0 siblings, 0 replies; 3+ messages in thread
From: Paul Moore @ 2008-02-13 17:21 UTC (permalink / raw)
To: David Miller; +Cc: xemul, netdev
On Wednesday 13 February 2008 1:35:44 am David Miller wrote:
> From: Pavel Emelyanov <xemul@openvz.org>
> Date: Thu, 07 Feb 2008 20:20:30 +0300
>
> > The audit_log_start() will expand into an empty do { } while (0)
> > construction and the audit_ctx becomes unused.
> >
> > The solution: push current->audit_context into audit_log_start()
> > directly, since it is not required in any other place in the
> > calling function.
> >
> > Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
>
> Applied.
Sorry I missed these three patches when they were posted because my
email got screwy and I was dropped from netdev (all of vger.kernel.org
actually). I just dug them up in the archives and they looks fine to
me. Thanks again Pavel.
(better late than never I suppose, applies to all three patches in the
patchset)
Acked-by: Paul Moore <paul.moore@hp.com>
--
paul moore
linux security @ hp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-02-13 17:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-02-07 17:20 [PATCH 1/3][NETLABEL]: Compilation for CONFIG_AUDIT=n case Pavel Emelyanov
2008-02-13 6:35 ` David Miller
2008-02-13 17:21 ` Paul Moore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).