mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 20:51:03 +02:00
kasan, sched/headers: Uninline kasan_enable/disable_current()
<linux/kasan.h> is a low level header that is included early in affected kernel headers. But it includes <linux/sched.h> which complicates the cleanup of sched.h dependencies. But kasan.h has almost no need for sched.h: its only use of scheduler functionality is in two inline functions which are not used very frequently - so uninline kasan_enable_current() and kasan_disable_current(). Also add a <linux/sched.h> dependency to a .c file that depended on kasan.h including it. This paves the way to remove the <linux/sched.h> include from kasan.h. Acked-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -30,16 +30,10 @@ static inline void *kasan_mem_to_shadow(const void *addr)
|
||||
}
|
||||
|
||||
/* Enable reporting bugs after kasan_disable_current() */
|
||||
static inline void kasan_enable_current(void)
|
||||
{
|
||||
current->kasan_depth++;
|
||||
}
|
||||
extern void kasan_enable_current(void);
|
||||
|
||||
/* Disable reporting bugs for current task */
|
||||
static inline void kasan_disable_current(void)
|
||||
{
|
||||
current->kasan_depth--;
|
||||
}
|
||||
extern void kasan_disable_current(void);
|
||||
|
||||
void kasan_unpoison_shadow(const void *address, size_t size);
|
||||
|
||||
|
Reference in New Issue
Block a user