mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] x86/process: Return early on NULL iobm in native_tss_update_io_bitmap()
@ 2026-06-01  5:37 lirongqing
  2026-06-10 12:40 ` 答复: " Li,Rongqing
  2026-06-12  2:19 ` Sohil Mehta
  0 siblings, 2 replies; 4+ messages in thread
From: lirongqing @ 2026-06-01  5:37 UTC (permalink / raw)
  To: Thomas Gleixner, Ingo Molnar, Borislav Petkov, Dave Hansen, x86,
	H . Peter Anvin, Li RongQing, linux-kernel

From: Li RongQing <lirongqing@baidu.com>

When 'iobm' is NULL, native_tss_update_io_bitmap() clears the thread
flag and invalidates the TSS bitmap, but falls through to subsequent code
that dereferences 'iobm'.

Add a missing return statement to prevent a potential kernel NULL
pointer dereference panic.

Signed-off-by: Li RongQing <lirongqing@baidu.com>
---
 arch/x86/kernel/process.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kernel/process.c b/arch/x86/kernel/process.c
index 4c718f8..d5cd217 100644
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -486,6 +486,7 @@ void native_tss_update_io_bitmap(void)
 		if (WARN_ON_ONCE(!iobm)) {
 			clear_thread_flag(TIF_IO_BITMAP);
 			native_tss_invalidate_io_bitmap();
+			return;
 		}
 
 		/*
-- 
2.9.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-06-12  3:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-06-01  5:37 [PATCH] x86/process: Return early on NULL iobm in native_tss_update_io_bitmap() lirongqing
2026-06-10 12:40 ` 答复: " Li,Rongqing
2026-06-12  2:19 ` Sohil Mehta
2026-06-12  3:11   ` 答复: [外部邮件] " Li,Rongqing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®