[PATCH] x86/process: Return early on NULL iobm in native_tss_update_io_bitmap()

From: lirongqing

Date: Mon Jun 01 2026 - 01:39:05 EST


From: Li RongQing <lirongqing@xxxxxxxxx>

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@xxxxxxxxx>
---
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