Skip to content

Commit 21953ee

Browse files
KAGA-KOKOsuryasaimadhu
authored andcommitted
x86/cpu: Export native_write_cr4() only when CONFIG_LKTDM=m
Modules have no business poking into this but fixing this is for later. [ bp: Carve out from an earlier patch. ] Signed-off-by: Thomas Gleixner <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
1 parent bfe3d8f commit 21953ee

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

arch/x86/kernel/cpu/common.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,9 @@ void native_write_cr4(unsigned long val)
387387
bits_missing);
388388
}
389389
}
390+
#if IS_MODULE(CONFIG_LKDTM)
390391
EXPORT_SYMBOL_GPL(native_write_cr4);
392+
#endif
391393

392394
void cr4_update_irqsoff(unsigned long set, unsigned long clear)
393395
{

0 commit comments

Comments
 (0)