From nobody Mon Jun 8 07:24:34 2026 Received: from outbound.baidu.com (mx22.baidu.com [220.181.50.185]) by smtp.subspace.kernel.org (Postfix) with SMTP id CDC6A15FA81 for ; Mon, 1 Jun 2026 05:37:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=220.181.50.185 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780292257; cv=none; b=qtKE3KSKGpM/+kn1vxS+lY5AOcBDD2WOha/Ui1qoZWM5fy7OsQApHCGS2jRNve/NYil7WQc9T8RTLbouzVxoY36vxtDaFO7TwgbVXx/qC2HxuXTTRHKERDFeHTuKfG113pnA0V+7GwWUAT2e0+5ZxyhXokB5WxArdVrQ+kZpGuI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780292257; c=relaxed/simple; bh=WerkChvjmjsWux4hXSxYXAJLt6yh4Dk1uqwuYxolPGM=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=L1UZ1ASTCqrbmu/O6lyNJ1TnpbtyDqQCwArnSFu0MBhIbLmw64LSa73mHlU3VhGpp1OAULa53vIT8itcIvXHsVN9az8r9M6EU+OCFpTY57N+2zG8QFv1JfhxA6AtNx2qEtFqNtsrDgPflu079ltu3DivnYwi3wioz6FWfH2Evh8= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com; spf=pass smtp.mailfrom=baidu.com; dkim=pass (2048-bit key) header.d=baidu.com header.i=@baidu.com header.b=Lu+Cu+0Y; arc=none smtp.client-ip=220.181.50.185 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=baidu.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baidu.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baidu.com header.i=@baidu.com header.b="Lu+Cu+0Y" X-MD-Sfrom: lirongqing@baidu.com X-MD-SrcIP: 172.31.50.47 From: lirongqing To: Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , , "H . Peter Anvin" , Li RongQing , Subject: [PATCH] x86/process: Return early on NULL iobm in native_tss_update_io_bitmap() Date: Mon, 1 Jun 2026 01:37:15 -0400 Message-ID: <20260601053715.2233-1-lirongqing@baidu.com> X-Mailer: git-send-email 2.17.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: bjhj-exc3.internal.baidu.com (172.31.3.13) To bjkjy-exc3.internal.baidu.com (172.31.50.47) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baidu.com; s=selector1; t=1780292246; bh=5EEbBUQszX1hmoEDvpVIF72DmFiHsqkeF9sVlgcyTYI=; h=From:To:Subject:Date:Message-ID:Content-Type; b=Lu+Cu+0Yl9sINbtSzfGhXF7IbFV6JmmFC58UlUtwiM82Wwb719GXyRjhsFxlPojCS SJXPa1rdP7TuG+oTFNheABhFKYgAZb2JMN6GzEQITIOHGwDqI1bKOHLeSu35ekpSLc KMgnEOMThoFMv/oO/BmjOzR0zn/rscU5lcCUkm49Uj3Rs3oxH5QTK+ewhS1zW/wvQs fsk39TduHPde2zO8Xn233hVpgpzz6ONKCc5Lgg4EqKYWWNPl/LC5SiGeNsDXNBcjHi 9i7WGOzj+eOi1M7XObkIu9eADM/i3T9nXFNEPJrZjvMy8k78Dx9LFwwXqkcVmYvaa0 o32G8RzOZ+9YQ== Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" From: Li RongQing 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 --- 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; } =20 /* --=20 2.9.4