Skip to content

Commit

Permalink
[NETLABEL]: Compilation for CONFIG_AUDIT=n case.
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Feb 13, 2008
1 parent 910d6c3 commit 94de7fe
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions net/netlabel/netlabel_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,14 @@ 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;

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;

Expand Down

0 comments on commit 94de7fe

Please sign in to comment.