From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 2B8B5229B15 for ; Thu, 17 Apr 2025 10:51:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744887107; cv=none; b=dAm/95e/GUftnPQ3VnTOwi5qQpSjCo1/8ffcCW+98khHHq2dS0VwEiFr/iWNwTWbFg14ikbGKXS5Vr2yWTUW7Oc9tidD1Ljho+IdBg7s6lgIaaI2fhTDBxklchcXN3Ynv0nuN5UQ6Hyt13wfbRblH+MqenJ0/IXZaG5Lg2uNs2o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1744887107; c=relaxed/simple; bh=a+RGIWumWuTf7eOuE8hlNn+7GgYlIw/4BR/UXVAMra8=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=frABe0YcgxWZx6T827Hj6obWWEmb/Ib5gNuJVAMNqWvSFlq5eEdfAxcFI2SxBspMPgsdHOlav6MmM9wpaBloqTPXCDiEidncMtDLpQ4qaMshAbl7T8OLxHE6sPFuPC3ua3bz4KvOPTOz8iFyRWCWHxWrZQlwO0h931asr/pFVjw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=EaEkUngV; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="EaEkUngV" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1CFDDC4CEEE; Thu, 17 Apr 2025 10:51:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1744887105; bh=a+RGIWumWuTf7eOuE8hlNn+7GgYlIw/4BR/UXVAMra8=; h=Subject:To:Cc:From:Date:From; b=EaEkUngVkHDGnFzHTT4esQoLP4KVhi+oXZcDdyYXsk4Ecgo2cAtLlWpryR01m4zdt n+OZp1iP9mP/KcPPtJ9y+0A4ZPvC3vj9c/660jqtyBAkeJfOmjTnsRoZ4m9iKlvvWG WA6r+6sUIP3vEq7v0vggqH9hc+OlgVO3B4FfJiRk= Subject: FAILED: patch "[PATCH] soc: samsung: exynos-chipid: Add NULL pointer check in" failed to apply to 5.10-stable tree To: chenyuan0y@gmail.com,krzysztof.kozlowski@linaro.org,stable@vger.kernel.org Cc: From: Date: Thu, 17 Apr 2025 12:51:34 +0200 Message-ID: <2025041734-nebulizer-isolating-0ccb@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x c8222ef6cf29dd7cad21643228f96535cc02b327 # git commit -s git send-email --to '' --in-reply-to '2025041734-nebulizer-isolating-0ccb@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From c8222ef6cf29dd7cad21643228f96535cc02b327 Mon Sep 17 00:00:00 2001 From: Chenyuan Yang Date: Wed, 12 Feb 2025 15:35:18 -0600 Subject: [PATCH] soc: samsung: exynos-chipid: Add NULL pointer check in exynos_chipid_probe() soc_dev_attr->revision could be NULL, thus, a pointer check is added to prevent potential NULL pointer dereference. This is similar to the fix in commit 3027e7b15b02 ("ice: Fix some null pointer dereference issues in ice_ptp.c"). This issue is found by our static analysis tool. Signed-off-by: Chenyuan Yang Link: https://lore.kernel.org/r/20250212213518.69432-1-chenyuan0y@gmail.com Fixes: 3253b7b7cd44 ("soc: samsung: Add exynos chipid driver support") Cc: Signed-off-by: Krzysztof Kozlowski diff --git a/drivers/soc/samsung/exynos-chipid.c b/drivers/soc/samsung/exynos-chipid.c index e37dde1fb588..95294462ff21 100644 --- a/drivers/soc/samsung/exynos-chipid.c +++ b/drivers/soc/samsung/exynos-chipid.c @@ -134,6 +134,8 @@ static int exynos_chipid_probe(struct platform_device *pdev) soc_dev_attr->revision = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%x", soc_info.revision); + if (!soc_dev_attr->revision) + return -ENOMEM; soc_dev_attr->soc_id = product_id_to_soc_id(soc_info.product_id); if (!soc_dev_attr->soc_id) { pr_err("Unknown SoC\n");