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>] [day] [month] [year] [list]
Date:	Thu, 7 Jul 2016 14:37:39 +0200
From:	Juergen Gross <jgross@...e.com>
To:	Jan Beulich <JBeulich@...e.com>,
	David Vrabel <david.vrabel@...rix.com>,
	Boris Ostrovsky <boris.ostrovsky@...cle.com>
Cc:	xen-devel <xen-devel@...ts.xenproject.org>,
	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] xenbus: prefer list_for_each()

On 07/07/16 09:33, Jan Beulich wrote:
> ... over list_for_each_safe() when list modification if accompanied by
> breaking out of the loop.
> 
> Signed-off-by: Jan Beulich <jbeulich@...e.com>

Reviewed-by: Juergen Gross <jgross@...e.com>

> ---
>  drivers/xen/xenbus/xenbus_dev_frontend.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> --- 4.7-rc6-xen.orig/drivers/xen/xenbus/xenbus_dev_frontend.c
> +++ 4.7-rc6-xen/drivers/xen/xenbus/xenbus_dev_frontend.c
> @@ -364,7 +364,7 @@ out:
>  
>  static int xenbus_write_watch(unsigned msg_type, struct xenbus_file_priv *u)
>  {
> -	struct watch_adapter *watch, *tmp_watch;
> +	struct watch_adapter *watch;
>  	char *path, *token;
>  	int err, rc;
>  	LIST_HEAD(staging_q);
> @@ -399,7 +399,7 @@ static int xenbus_write_watch(unsigned m
>  		}
>  		list_add(&watch->list, &u->watches);
>  	} else {
> -		list_for_each_entry_safe(watch, tmp_watch, &u->watches, list) {
> +		list_for_each_entry(watch, &u->watches, list) {
>  			if (!strcmp(watch->token, token) &&
>  			    !strcmp(watch->watch.node, path)) {
>  				unregister_xenbus_watch(&watch->watch);
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ