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  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:   Sat, 23 Mar 2019 14:41:07 +0100 (CET)
From:   Julia Lawall <julia.lawall@...6.fr>
To:     Wen Yang <wen.yang99@....com.cn>
cc:     yamada.masahiro@...ionext.com, linux-kernel@...r.kernel.org,
        wang.yi59@....com.cn, Gilles Muller <Gilles.Muller@...6.fr>,
        Nicolas Palix <nicolas.palix@...g.fr>,
        Michal Marek <michal.lkml@...kovi.net>, cocci@...teme.lip6.fr
Subject: Re: [PATCH] coccinelle: put_device: reduce false positives



On Sat, 23 Mar 2019, Wen Yang wrote:

> Don't complain about a return when this function returns "&pdev->dev".
>
> Reported-by: Julia Lawall <Julia.Lawall@...6.fr>
> Signed-off-by: Wen Yang <wen.yang99@....com.cn>
> Cc: Julia Lawall <Julia.Lawall@...6.fr>
> Cc: Gilles Muller <Gilles.Muller@...6.fr>
> Cc: Nicolas Palix <nicolas.palix@...g.fr>
> Cc: Michal Marek <michal.lkml@...kovi.net>
> Cc: Masahiro Yamada <yamada.masahiro@...ionext.com>
> CC: cocci@...teme.lip6.fr
> Cc: linux-kernel@...r.kernel.org

Acked-by: Julia Lawall <julia.lawall@...6.fr>


> ---
>  scripts/coccinelle/free/put_device.cocci | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/scripts/coccinelle/free/put_device.cocci b/scripts/coccinelle/free/put_device.cocci
> index 7395697..c9f071b 100644
> --- a/scripts/coccinelle/free/put_device.cocci
> +++ b/scripts/coccinelle/free/put_device.cocci
> @@ -32,6 +32,7 @@ if (id == NULL || ...) { ... return ...; }
>  (    id
>  |    (T2)dev_get_drvdata(&id->dev)
>  |    (T3)platform_get_drvdata(id)
> +|    &id->dev
>  );
>  | return@p2 ...;
>  )
> --
> 2.9.5
>
>

Powered by blists - more mailing lists