Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2BAE638F950; Sat, 17 Oct 2026 17:53:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792259602; cv=none; b=UMtML0m1x/uzlqt/ESHQDJyKrHJxkKluMMUAzNC8AiwPSNM0UM6RvK3L9F5ui/tbqpD+N9Pr/OX5lNW1pRy5u5rhaA3WzCg+BpBQj/WsWDu9gLFXOJlnGWHW5Hhay+oGLslLinb4zACTleCyRBgc8e8061mMCgrPFjV1Pi9tXHs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792259602; c=relaxed/simple; bh=QWL8jCioGeIjxnIZD61a7vTPCPBGd3j6r66M9ELdbEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=V5n40/HpoRrJpYYm5zd7lsfimlWW+dOBclja8wUAqE6i4p3kCmu7KVeMipAVaksUfd6hI/URwqXyttrNa6XzZtbKBvecjAvZhp/rVSa04VvJhv9BDVizyteUYvXu/4VJVIMG15jwDT4UQ4rcihqoWzODN2/z6WsF/OSfQUUAXgE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FcKLWJ6S; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FcKLWJ6S" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 877171F000C4; Sat, 17 Oct 2026 17:53:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792259601; bh=BSOJVfv3beKRaCc/DQfQgAOU8czzJGh4ydy2AmOC8C0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=FcKLWJ6StA3S6i+NuZ83/pqG5uztVbA1JQwWCyKFt5/9JCXHv880Mdc09yLvFjUTz R9LX12xcgGHoaxdNu9aPVSRSoa0GXNcVAbnxlslsdKSUf0g8oT4hOYr6yKolfgb2WT 7mbidT2/iBqVOe5+lc48J0nmeaZq7WN6RxAF8GrE= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Rafael J. Wysocki" , Andy Shevchenko , =?UTF-8?q?Ilpo=20J=C3=A4rvinen?= , Sasha Levin Subject: [PATCH 6.6 1267/1674] platform/x86: intel_sar: Check ACPI_HANDLE() against NULL Date: Sat, 17 Oct 2026 17:58:59 +0200 Message-ID: <20261017160503.663405408@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261017160431.119607952@linuxfoundation.org> References: <20261017160431.119607952@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Rafael J. Wysocki [ Upstream commit 2765f16c12af7c2533763e46b8113b727354012d ] Every platform driver can be forced to match a device that doesn't match its list of device IDs because of device_match_driver_override(), so platform drivers that rely on the existence of a device's ACPI companion object need to verify its presence. Accordingly, add a requisite ACPI_HANDLE() check against NULL to the platform/x86 intel_sar driver. Fixes: dcfbd31ef4bc ("platform/x86: BIOS SAR driver for Intel M.2 Modem") Signed-off-by: Rafael J. Wysocki Reviewed-by: Andy Shevchenko Link: https://patch.msgid.link/14023870.uLZWGnKmhe@rafael.j.wysocki Reviewed-by: Ilpo Järvinen Signed-off-by: Ilpo Järvinen Stable-dep-of: 30c906cff490 ("platform/x86: int1092: Fix potential memory leak in sar_probe()") Signed-off-by: Sasha Levin --- drivers/platform/x86/intel/int1092/intel_sar.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/platform/x86/intel/int1092/intel_sar.c b/drivers/platform/x86/intel/int1092/intel_sar.c index 6246c066ade2b..926be7d9086a1 100644 --- a/drivers/platform/x86/intel/int1092/intel_sar.c +++ b/drivers/platform/x86/intel/int1092/intel_sar.c @@ -245,15 +245,20 @@ static void sar_get_data(int reg, struct wwan_sar_context *context) static int sar_probe(struct platform_device *device) { struct wwan_sar_context *context; + acpi_handle handle; int reg; int result; + handle = ACPI_HANDLE(&device->dev); + if (!handle) + return -ENODEV; + context = kzalloc(sizeof(*context), GFP_KERNEL); if (!context) return -ENOMEM; context->sar_device = device; - context->handle = ACPI_HANDLE(&device->dev); + context->handle = handle; dev_set_drvdata(&device->dev, context); result = guid_parse(SAR_DSM_UUID, &context->guid); -- 2.53.0