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]
Message-ID: <20110318152452.GA12980@hmsreliant.think-freely.org>
Date:	Fri, 18 Mar 2011 11:24:52 -0400
From:	Neil Horman <nhorman@...driver.com>
To:	Lai Jiangshan <laijs@...fujitsu.com>
Cc:	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Ingo Molnar <mingo@...e.hu>, Jens Axboe <axboe@...nel.dk>,
	Robert Love <robert.w.love@...el.com>,
	"James E.J. Bottomley" <James.Bottomley@...e.de>,
	"David S. Miller" <davem@...emloft.net>,
	Alexey Kuznetsov <kuznet@....inr.ac.ru>,
	"Pekka Savola (ipv6)" <pekkas@...core.fi>,
	James Morris <jmorris@...ei.org>,
	Hideaki YOSHIFUJI <yoshfuji@...ux-ipv6.org>,
	Patrick McHardy <kaber@...sh.net>,
	Eric Dumazet <eric.dumazet@...il.com>,
	Stephen Hemminger <shemminger@...tta.com>,
	Tejun Heo <tj@...nel.org>, Jarek Poplawski <jarkao2@...il.com>,
	linux-kernel@...r.kernel.org, devel@...n-fcoe.org,
	linux-scsi@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH 01/36] net,rcu: convert call_rcu(free_dm_hw_stat) to
 kfree_rcu()

On Fri, Mar 18, 2011 at 11:39:43AM +0800, Lai Jiangshan wrote:
> 
> 
> The rcu callback free_dm_hw_stat() just calls a kfree(),
> so we use kfree_rcu() instead of the call_rcu(free_dm_hw_stat).
> 
> Signed-off-by: Lai Jiangshan <laijs@...fujitsu.com>
Acked-by: Neil Horman <nhorman@...driver.com>

> ---
>  net/core/drop_monitor.c |   12 ++----------
>  1 files changed, 2 insertions(+), 10 deletions(-)
> 
> diff --git a/net/core/drop_monitor.c b/net/core/drop_monitor.c
> index 36e603c..32365e7 100644
> --- a/net/core/drop_monitor.c
> +++ b/net/core/drop_monitor.c
> @@ -207,14 +207,6 @@ static void trace_napi_poll_hit(void *ignore, struct napi_struct *napi)
>  	rcu_read_unlock();
>  }
>  
> -
> -static void free_dm_hw_stat(struct rcu_head *head)
> -{
> -	struct dm_hw_stat_delta *n;
> -	n = container_of(head, struct dm_hw_stat_delta, rcu);
> -	kfree(n);
> -}
> -
>  static int set_all_monitor_traces(int state)
>  {
>  	int rc = 0;
> @@ -245,7 +237,7 @@ static int set_all_monitor_traces(int state)
>  		list_for_each_entry_safe(new_stat, temp, &hw_stats_list, list) {
>  			if (new_stat->dev == NULL) {
>  				list_del_rcu(&new_stat->list);
> -				call_rcu(&new_stat->rcu, free_dm_hw_stat);
> +				kfree_rcu(new_stat, rcu);
>  			}
>  		}
>  		break;
> @@ -314,7 +306,7 @@ static int dropmon_net_event(struct notifier_block *ev_block,
>  				new_stat->dev = NULL;
>  				if (trace_state == TRACE_OFF) {
>  					list_del_rcu(&new_stat->list);
> -					call_rcu(&new_stat->rcu, free_dm_hw_stat);
> +					kfree_rcu(new_stat, rcu);
>  					break;
>  				}
>  			}
> -- 
> 1.7.4
> 
--
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