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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1486438213.2645.1.camel@intel.com>
Date:   Tue, 07 Feb 2017 11:30:13 +0800
From:   Zhang Rui <rui.zhang@...el.com>
To:     Shailendra Verma <shailendra.v@...sung.com>,
        Eduardo Valentin <edubezval@...il.com>,
        linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
        p.shailesh@...sung.com, ashish.kalra@...sung.com,
        Shailendra Verma <shailendra.capricorn@...il.com>
Subject: Re: [PATCH] Thermal - Fix possible NULL derefrence.

Just one comment,
the subject should be 
[PATCH] Thermal: imx_thermal : Fix possible NULL derefrence

On Mon, 2017-01-30 at 10:34 +0530, Shailendra Verma wrote:
> of_device_get_match_data could return NULL, and so can cause
> a NULL pointer dereference later.
> 
> Signed-off-by: Shailendra Verma <shailendra.v@...sung.com>

I think Eduardo will take this patch.

thanks,
rui
> ---
>  drivers/thermal/imx_thermal.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/thermal/imx_thermal.c
> b/drivers/thermal/imx_thermal.c
> index 06912f0..fb648a4 100644
> --- a/drivers/thermal/imx_thermal.c
> +++ b/drivers/thermal/imx_thermal.c
> @@ -489,6 +489,10 @@ static int imx_thermal_probe(struct
> platform_device *pdev)
>  	data->tempmon = map;
>  
>  	data->socdata = of_device_get_match_data(&pdev->dev);
> +	if (!data->socdata) {
> +		dev_err(&pdev->dev, "no device match found\n");
> +		return -ENODEV;
> +	}
>  
>  	/* make sure the IRQ flag is clear before enabling irq on
> i.MX6SX */
>  	if (data->socdata->version == TEMPMON_IMX6SX) {

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ