lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9687f027-7a5d-2959-82fe-96e68d59c1ab@codeaurora.org>
Date:   Thu, 31 Dec 2020 12:11:52 +0530
From:   Veerabhadrarao Badiganti <vbadigan@...eaurora.org>
To:     Md Sadre Alam <mdalam@...eaurora.org>, bjorn.andersson@...aro.org,
        adrian.hunter@...el.com, ulf.hansson@...aro.org,
        linux-arm-msm@...r.kernel.org, linux-mmc@...r.kernel.org,
        linux-kernel@...r.kernel.org
Cc:     sricharan@...eaurora.org
Subject: Re: [PATCH] mmc: sdhci-msm: Fix possible NULL pointer exception


On 12/22/2020 2:18 PM, Md Sadre Alam wrote:
> of_device_get_match_data returns NULL when no match.
> So add the NULL pointer check to avoid dereference.
>
> Signed-off-by: Md Sadre Alam <mdalam@...eaurora.org>
> ---

Reviewed-by: Veerabhadrarao Badiganti <vbadigan@...eaurora.org>

>   drivers/mmc/host/sdhci-msm.c | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/mmc/host/sdhci-msm.c b/drivers/mmc/host/sdhci-msm.c
> index 9c7927b..f20e424 100644
> --- a/drivers/mmc/host/sdhci-msm.c
> +++ b/drivers/mmc/host/sdhci-msm.c
> @@ -2235,6 +2235,8 @@ static int sdhci_msm_probe(struct platform_device *pdev)
>   	 * the data associated with the version info.
>   	 */
>   	var_info = of_device_get_match_data(&pdev->dev);
> +	if (!var_info)
> +		goto pltfm_free;
>   
>   	msm_host->mci_removed = var_info->mci_removed;
>   	msm_host->restore_dll_config = var_info->restore_dll_config;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ