From 2318165502fb53fd6c24159006a13b5e2ac81fd2 Mon Sep 17 00:00:00 2001 From: Daniel Mentz Date: Thu, 24 Sep 2020 17:01:20 -0700 Subject: [PATCH] ANDROID: Disable kthread delayed work fp check in CFI builds With non-canonical CFI, LLVM generates jump table entries for external symbols in modules and as a result, a function pointer passed from a module to the core kernel will have a different address. Disable the warning for now. Bug: 145210207 Signed-off-by: Daniel Mentz Change-Id: I576a07206a465902773481e51a84529f0ac2e84b --- kernel/kthread.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kernel/kthread.c b/kernel/kthread.c index bfbfa481be3a..1e9bf63a30de 100644 --- a/kernel/kthread.c +++ b/kernel/kthread.c @@ -886,7 +886,9 @@ static void __kthread_queue_delayed_work(struct kthread_worker *worker, struct timer_list *timer = &dwork->timer; struct kthread_work *work = &dwork->work; +#ifndef CONFIG_CFI_CLANG WARN_ON_ONCE(timer->function != kthread_delayed_work_timer_fn); +#endif /* * If @delay is 0, queue @dwork->work immediately. This is for