]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/its: Fix build errors when CONFIG_MODULES=n
authorEric Biggers <ebiggers@google.com>
Tue, 13 May 2025 02:58:39 +0000 (19:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 18 May 2025 06:21:26 +0000 (08:21 +0200)
commitc2bece04baf819b9614a35852e4573ee402e059d
treed016b8eaba17c9a1a902771ceb3ae888b6bc02fb
parent959cadf09dbae7b304f03e039b8d8e13c529e2dd
x86/its: Fix build errors when CONFIG_MODULES=n

commit 9f35e33144ae5377d6a8de86dd3bd4d995c6ac65 upstream.

Fix several build errors when CONFIG_MODULES=n, including the following:

../arch/x86/kernel/alternative.c:195:25: error: incomplete definition of type 'struct module'
  195 |         for (int i = 0; i < mod->its_num_pages; i++) {

Fixes: 872df34d7c51 ("x86/its: Use dynamic thunks for indirect branches")
Cc: stable@vger.kernel.org
Signed-off-by: Eric Biggers <ebiggers@google.com>
Acked-by: Dave Hansen <dave.hansen@intel.com>
Tested-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[ pawan: backport: Bring ITS dynamic thunk code under CONFIG_MODULES ]
Signed-off-by: Pawan Gupta <pawan.kumar.gupta@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/kernel/alternative.c