From b6ddc518520887a62728b0414efbf802a9dfdd55 Mon Sep 17 00:00:00 2001
From: David Woodhouse <dwmw2@shinybook.infradead.org>
Date: Tue, 6 Sep 2005 08:09:03 +0100
Subject: [PATCH] Fix build failure on ppc64 without CONFIG_AUDIT

We shouldn't call audit_syscall_exit() unless it actually exists.

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
---
 arch/ppc64/kernel/entry.S | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/ppc64/kernel/entry.S b/arch/ppc64/kernel/entry.S
index ae5d563ad93a..14cd56ac40dd 100644
--- a/arch/ppc64/kernel/entry.S
+++ b/arch/ppc64/kernel/entry.S
@@ -282,6 +282,7 @@ _GLOBAL(ppc32_rt_sigsuspend)
 	bne	syscall_exit
 	/* If sigsuspend() returns zero, we are going into a signal handler. We
 	   may need to call audit_syscall_exit() to mark the exit from sigsuspend() */
+#ifdef CONFIG_AUDIT
 	ld	r3,PACACURRENT(r13)
 	ld	r4,AUDITCONTEXT(r3)
 	cmpdi	0,r4,0
@@ -289,6 +290,7 @@ _GLOBAL(ppc32_rt_sigsuspend)
 	li	r4, 2			/* AUDITSC_FAILURE */
 	li	r5,-4			/* It's always -EINTR */
 	bl	.audit_syscall_exit
+#endif
 	b	.ret_from_except
 
 _GLOBAL(ppc_fork)
-- 
GitLab