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:	Mon, 10 Mar 2014 10:38:17 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	John Fastabend <john.fastabend@...il.com>
Cc:	xiyou.wangcong@...il.com, jhs@...atatu.com, netdev@...r.kernel.org,
	davem@...emloft.net
Subject: Re: [RCU PATCH 05/14] net: sched: cls_flow use RCU

On Mon, 2014-03-10 at 10:05 -0700, John Fastabend wrote:

>  static void flow_destroy(struct tcf_proto *tp)
>  {
> -	struct flow_head *head = tp->root;
> +	struct flow_head *head = rtnl_dereference(tp->root);
>  	struct flow_filter *f, *next;
>  
>  	list_for_each_entry_safe(f, next, &head->filters, list) {
> -		list_del(&f->list);
> -		flow_destroy_filter(tp, f);
> +		list_del_rcu(&f->list);
> +		call_rcu(&f->rcu, flow_destroy_filter);
>  	}
> -	kfree(head);
> +	rcu_assign_pointer(tp->root, NULL);

RCU_INIT_POINTER()

> +	kfree_rcu(head, rcu);
>  }
>  

Otherwise, SGTM, thanks !



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ