Skip to content

Commit 9e431c6

Browse files
arndbgregkh
authored andcommitted
kcov: mark in_softirq_really() as __always_inline
commit cb0ca08b326aa03f87fe94bb91872ce8d2ef1ed8 upstream. If gcc decides not to inline in_softirq_really(), objtool warns about a function call with UACCESS enabled: kernel/kcov.o: warning: objtool: __sanitizer_cov_trace_pc+0x1e: call to in_softirq_really() with UACCESS enabled kernel/kcov.o: warning: objtool: check_kcov_mode+0x11: call to in_softirq_really() with UACCESS enabled Mark this as __always_inline to avoid the problem. Link: https://lkml.kernel.org/r/[email protected] Fixes: 7d4df2dad312 ("kcov: properly check for softirq context") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Marco Elver <[email protected]> Cc: Aleksandr Nogikh <[email protected]> Cc: Andrey Konovalov <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent cff1de8 commit 9e431c6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

kernel/kcov.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ static void kcov_remote_area_put(struct kcov_remote_area *area,
165165
* Unlike in_serving_softirq(), this function returns false when called during
166166
* a hardirq or an NMI that happened in the softirq context.
167167
*/
168-
static inline bool in_softirq_really(void)
168+
static __always_inline bool in_softirq_really(void)
169169
{
170170
return in_serving_softirq() && !in_hardirq() && !in_nmi();
171171
}

0 commit comments

Comments
 (0)