Re: kernel/trace/ftrace.c:6651:40: sparse: sparse: incorrect type in assignment (different address spaces)

From: Leon Hwang

Date: Thu Sep 10 2026 - 23:15:48 EST


On 11/9/26 07:59, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 50d05c7c76c96b90462f24debacca971d2e86713
> commit: 092f8ec7dbdc71f5bde9bb0f8dead384d2115a44 ftrace: Protect direct_functions in update_ftrace_direct_mod
> date: 5 weeks ago
> config: x86_64-randconfig-122-20260911 (https://download.01.org/0day-ci/archive/20260911/202609110704.Q3M5vCDV-lkp@xxxxxxxxx/config)
> compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260911/202609110704.Q3M5vCDV-lkp@xxxxxxxxx/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Fixes: 092f8ec7dbdc ("ftrace: Protect direct_functions in update_ftrace_direct_mod")
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202609110704.Q3M5vCDV-lkp@xxxxxxxxx/
>

Hi,

I reproduced the warning with sparse v0.6.5-rc1. The patch below fixes
it locally.

Could you please retest it with the reported config?

Thanks,
Leon

---