[-next] audit: correct audit_filter_inodes() definition

Message ID 20230721112101.176222-1-xiujianfeng@huawei.com
State New
Headers
Series [-next] audit: correct audit_filter_inodes() definition |

Commit Message

Xiu Jianfeng July 21, 2023, 11:21 a.m. UTC
  After changes in commit 0590b9335a1c ("fixing audit rule ordering mess,
part 1"), audit_filter_inodes() returns void, so if CONFIG_AUDITSYSCALL
not defined, it should be do {} while(0).

Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
---
 kernel/audit.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Paul Moore July 21, 2023, 4:17 p.m. UTC | #1
On Jul 21, 2023 Xiu Jianfeng <xiujianfeng@huawei.com> wrote:
> 
> After changes in commit 0590b9335a1c ("fixing audit rule ordering mess,
> part 1"), audit_filter_inodes() returns void, so if CONFIG_AUDITSYSCALL
> not defined, it should be do {} while(0).
> 
> Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
> ---
>  kernel/audit.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Merged into audit/next, thanks.

--
paul-moore.com
  

Patch

diff --git a/kernel/audit.h b/kernel/audit.h
index 94738bce40b2..a60d2840559e 100644
--- a/kernel/audit.h
+++ b/kernel/audit.h
@@ -334,7 +334,7 @@  static inline int audit_signal_info_syscall(struct task_struct *t)
 	return 0;
 }
 
-#define audit_filter_inodes(t, c) AUDIT_STATE_DISABLED
+#define audit_filter_inodes(t, c) do { } while (0)
 #endif /* CONFIG_AUDITSYSCALL */
 
 extern char *audit_unpack_string(void **bufp, size_t *remain, size_t len);