From: David Miller <davem@davemloft.net>
To: kurup.manish@gmail.com
Cc: jhs@mojatatu.com, xiyou.wangcong@gmail.com, jiri@resnulli.us,
jakub.kicinski@netronome.com, simon.horman@netronome.com,
pieter.jansenvanvuuren@netronome.com, john.hurley@netronome.com,
oss-drivers@netronome.com, netdev@vger.kernel.org,
aring@mojatatu.com, mrv@mojatatu.com, manish.kurup@verizon.com
Subject: Re: [PATCH net-next v5 3/3] act_vlan: VLAN action rewrite to use RCU lock/unlock and update
Date: Thu, 02 Nov 2017 17:00:05 +0900 (KST) [thread overview]
Message-ID: <20171102.170005.1755683020318904615.davem@davemloft.net> (raw)
In-Reply-To: <1509572781-17370-1-git-send-email-manish.kurup@verizon.com>
From: Manish Kurup <kurup.manish@gmail.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?
prev parent reply other threads:[~2017-11-02 8:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 21:46 [PATCH net-next v5 3/3] act_vlan: VLAN action rewrite to use RCU lock/unlock and update Manish Kurup
2017-11-02 8:00 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171102.170005.1755683020318904615.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=aring@mojatatu.com \
--cc=jakub.kicinski@netronome.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=john.hurley@netronome.com \
--cc=kurup.manish@gmail.com \
--cc=manish.kurup@verizon.com \
--cc=mrv@mojatatu.com \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
--cc=pieter.jansenvanvuuren@netronome.com \
--cc=simon.horman@netronome.com \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).