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]
Date:   Fri, 7 Jul 2017 08:56:28 +0800
From:   Mark yao <mark.yao@...k-chips.com>
To:     "Gustavo A. R. Silva" <garsilva@...eddedor.com>,
        David Airlie <airlied@...ux.ie>,
        Heiko Stuebner <heiko@...ech.de>
Cc:     dri-devel@...ts.freedesktop.org,
        linux-arm-kernel@...ts.infradead.org,
        linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/rockchip: fix NULL check on devm_kzalloc() return
 value

On 2017年07月07日 05:58, Gustavo A. R. Silva wrote:
> The right variable to check here is port, not dp.
>
> This issue was detected using Coccinelle and the following semantic patch:
>
> @@
> expression x;
> identifier fld;
> @@
>
> * x = devm_kzalloc(...);
>    ... when != x == NULL
>    x->fld
>
> Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>

Thanks for the fix,

Acked-by: Mark Yao <mark.yao@...k-chips.com>

> ---
>   drivers/gpu/drm/rockchip/cdn-dp-core.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/rockchip/cdn-dp-core.c b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> index 14fa1f8..9b0b058 100644
> --- a/drivers/gpu/drm/rockchip/cdn-dp-core.c
> +++ b/drivers/gpu/drm/rockchip/cdn-dp-core.c
> @@ -1195,7 +1195,7 @@ static int cdn_dp_probe(struct platform_device *pdev)
>   			continue;
>   
>   		port = devm_kzalloc(dev, sizeof(*port), GFP_KERNEL);
> -		if (!dp)
> +		if (!port)
>   			return -ENOMEM;
>   
>   		port->extcon = extcon;


-- 
Mark Yao


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ