mirror of
https://kernel.googlesource.com/pub/scm/linux/kernel/git/stable/linux-stable.git
synced 2025-09-13 11:07:46 +10:00
apparmor: use the condition in AA_BUG_FMT even with debug disabled
[ Upstream commit 67e370aa7f
]
This follows the established practice and fixes a build failure for me:
security/apparmor/file.c: In function ‘__file_sock_perm’:
security/apparmor/file.c:544:24: error: unused variable ‘sock’ [-Werror=unused-variable]
544 | struct socket *sock = (struct socket *) file->private_data;
| ^~~~
Signed-off-by: Mateusz Guzik <mjguzik@gmail.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
a0080ff221
commit
5d0140bc8a
@ -48,7 +48,11 @@ extern struct aa_dfa *stacksplitdfa;
|
||||
#define AA_BUG_FMT(X, fmt, args...) \
|
||||
WARN((X), "AppArmor WARN %s: (" #X "): " fmt, __func__, ##args)
|
||||
#else
|
||||
#define AA_BUG_FMT(X, fmt, args...) no_printk(fmt, ##args)
|
||||
#define AA_BUG_FMT(X, fmt, args...) \
|
||||
do { \
|
||||
BUILD_BUG_ON_INVALID(X); \
|
||||
no_printk(fmt, ##args); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#define AA_ERROR(fmt, args...) \
|
||||
|
Loading…
Reference in New Issue
Block a user