Skip to contentSkip to conversation

: Compilation for CONFIG_AUDIT=n case.

PATCH Applied Pavel Emelyanov 3 participants 3 messages Feb 7, 2008 – Feb 13, 2008

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/3 : Compilation for CONFIG_AUDIT=n case.

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.

---
 net/netlabel/netlabel_user.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
net/netlabel/netlabel_user.c +1 -2
index 85a96a3..023fc8f 100644
@@ -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;
 
Signature · 1 line
1.5.3.4
maintainer Applied
#1 lore raw

From: Pavel Emelyanov <[email protected]>
Date: Thu, 07 Feb 2008 20:20:30 +0300

Quoted 8 lines

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.

Applied.

Acked-by
#2 lore raw
Quoted 6 lines · David Miller

From: Pavel Emelyanov <[email protected]>
Date: Thu, 07 Feb 2008 20:20:30 +0300

Quoted 3 lines

The audit_log_start() will expand into an empty do { } while (0) construction and the audit_ctx becomes unused.

Quoted 7 lines
Quoted 5 lines

The solution: push current->audit_context into audit_log_start() directly, since it is not required in any other place in the calling function.

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)

Signature · 2 lines
paul moore
linux security @ hp