Skip to content

Commit

Permalink
SELinux: inline selinux_is_enabled in !CONFIG_SECURITY_SELINUX
Browse files Browse the repository at this point in the history
Without this patch building a kernel emits millions of warning like:

include/linux/selinux.h:92: warning: ?selinux_is_enabled? defined but not used

When it is build without CONFIG_SECURITY_SELINUX.  This is harmless, but
the function should be inlined, so it gets compiled out.

Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: James Morris <jmorris@namei.org>
  • Loading branch information
Eric Paris authored and James Morris committed Sep 15, 2009
1 parent c08ef80 commit 8a47890
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/selinux.h
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ static inline void selinux_secmark_refcount_dec(void)
return;
}

static bool selinux_is_enabled(void)
static inline bool selinux_is_enabled(void)
{
return false;
}
Expand Down

0 comments on commit 8a47890

Please sign in to comment.