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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20171102.170005.1755683020318904615.davem@davemloft.net>
Date:   Thu, 02 Nov 2017 17:00:05 +0900 (KST)
From:   David Miller <davem@...emloft.net>
To:     kurup.manish@...il.com
Cc:     jhs@...atatu.com, xiyou.wangcong@...il.com, jiri@...nulli.us,
        jakub.kicinski@...ronome.com, simon.horman@...ronome.com,
        pieter.jansenvanvuuren@...ronome.com, john.hurley@...ronome.com,
        oss-drivers@...ronome.com, netdev@...r.kernel.org,
        aring@...atatu.com, mrv@...atatu.com, manish.kurup@...izon.com
Subject: Re: [PATCH net-next v5 3/3] act_vlan: VLAN action rewrite to use
 RCU lock/unlock and update

From: Manish Kurup <kurup.manish@...il.com>
Date: Wed,  1 Nov 2017 17:46:21 -0400

> -	v->tcfv_push_proto = push_proto;
> +	ASSERT_RTNL();
> +	p = kzalloc(sizeof(*p), GFP_KERNEL);
> +	if (!p) {
> +		if (ovr)
> +			tcf_idr_release(*a, bind);
> +		return -ENOMEM;
> +	}
>  
>  	v->tcf_action = parm->action;
>  
> -	spin_unlock_bh(&v->tcf_lock);
> +	p_old = rtnl_dereference(v->vlan_p);
> +
> +	p->tcfv_action = action;
> +	p->tcfv_push_vid = push_vid;
> +	p->tcfv_push_prio = push_prio;
> +	p->tcfv_push_proto = push_proto;
> +
> +	rcu_assign_pointer(v->vlan_p, p);
> +
> +	if (p_old)
> +		kfree_rcu(p_old, rcu);

What frees this RCU memory when the VLAN action is destroyed?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ