Skip to content
  • Ingo Molnar's avatar
    kasan, sched/headers: Uninline kasan_enable/disable_current() · af8601ad
    Ingo Molnar authored
    
    
    <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: default avatarLinus 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: default avatarIngo Molnar <mingo@kernel.org>
    af8601ad