: Compilation for CONFIG_AUDIT=n case.
Subsystems (3)
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
@@ -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
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 theaudit_ctxbecomes unused.The solution: push
current->audit_contextintoaudit_log_start()directly, since it is not required in any other place in the calling function.Signed-off-by Pavel Emelyanov <[email protected]>
Applied.
Paul Moore
Acked-byQuoted 6 lines · David Miller
From: Pavel Emelyanov <[email protected]>
Date: Thu, 07 Feb 2008 20:20:30 +0300Quoted 3 lines
The
audit_log_start()will expand into an empty do { } while (0) construction and theaudit_ctxbecomes unused.
Quoted 7 lines
Quoted 5 lines
The solution: push
current->audit_contextintoaudit_log_start()directly, since it is not required in any other place in the calling function.Signed-off-by Pavel Emelyanov <[email protected]>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