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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 18 Dec 2020 19:49:22 +0530
From:   Lokesh Vutla <lokeshvutla@...com>
To:     Jacob Keller <jacob.e.keller@...el.com>,
        <linux-kernel@...r.kernel.org>, <linux-pci@...r.kernel.org>
CC:     "Rafael J . Wysocki" <rafael@...nel.org>,
        Stuart Yoder <stuyoder@...il.com>,
        Laurentiu Tudor <laurentiu.tudor@....com>,
        Nishanth Menon <nm@...com>, Tero Kristo <t-kristo@...com>,
        Santosh Shilimkar <ssantosh@...nel.org>,
        Miquel Raynal <miquel.raynal@...tlin.com>
Subject: Re: [PATCH] msi: use for_each_msi_entry_safe iterator macro



On 17/12/20 6:25 am, Jacob Keller wrote:
> Commit 81b1e6e6a859 ("platform-msi: Free descriptors in
> platform_msi_domain_free()") introduced for_each_msi_entry_safe as an
> iterator operating on the msi_list using the safe semantics with
> a temporary variable.
> 
> A handful of locations still used the generic iterator instead of the
> specific macro. Fix the 3 remaining cases. Add a cocci script which can
> detect and report any misuse that is introduced in future changes.
> 
> Cc: Rafael J. Wysocki <rafael@...nel.org>
> Cc: Stuart Yoder <stuyoder@...il.com>
> Cc: Laurentiu Tudor <laurentiu.tudor@....com>
> Cc: Nishanth Menon <nm@...com>
> Cc: Tero Kristo <t-kristo@...com>
> Cc: Santosh Shilimkar <ssantosh@...nel.org>
> Cc: Miquel Raynal <miquel.raynal@...tlin.com>
> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
> ---

[..snip..]

>  	}
> diff --git a/drivers/soc/ti/ti_sci_inta_msi.c b/drivers/soc/ti/ti_sci_inta_msi.c
> index 0eb9462f609e..66f9772dcdfa 100644
> --- a/drivers/soc/ti/ti_sci_inta_msi.c
> +++ b/drivers/soc/ti/ti_sci_inta_msi.c
> @@ -64,7 +64,7 @@ static void ti_sci_inta_msi_free_descs(struct device *dev)
>  {
>  	struct msi_desc *desc, *tmp;
>  
> -	list_for_each_entry_safe(desc, tmp, dev_to_msi_list(dev), list) {
> +	for_each_msi_entry_safe(desc, tmp, dev) {
>  		list_del(&desc->list);
>  		free_msi_entry(desc);
>  	}

For ti_sci_inta_msi part:

Reviewed-by: Lokesh Vutla <lokeshvutla@...com>

Thanks and regards,
Lokesh

Powered by blists - more mailing lists