From: Eric Dumazet <eric.dumazet@gmail.com>
To: Martin KaFai Lau <kafai@fb.com>
Cc: netdev <netdev@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH net 3/3] ipv6: Fix dst_entry refcnt bugs in ip6_tunnel
Date: Wed, 02 Sep 2015 15:48:57 -0700 [thread overview]
Message-ID: <1441234137.8932.209.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <20150902215203.GB78846@kafai-mba.local>
On Wed, 2015-09-02 at 14:52 -0700, Martin KaFai Lau wrote:
> On Wed, Sep 02, 2015 at 02:30:45PM -0700, Eric Dumazet wrote:
> > Object cannot be freed until all cpus have exited their RCU sections.
> You meant the dst_destroy() here will wait for all cpus exited their RCU sections?
>
> static inline void dst_free(struct dst_entry *dst)
> {
> if (dst->obsolete > 0)
> return;
> if (!atomic_read(&dst->__refcnt)) {
> dst = dst_destroy(dst);
> if (!dst)
> return;
> }
> __dst_free(dst);
> }
dst_free() is called after RCU grace period, in the case you are
interested in.
Look at dst_rcu_free() and rt_free()
next prev parent reply other threads:[~2015-09-02 22:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-01 18:55 [PATCH net 0/3] ipv6: Fix dst_entry refcnt bugs in ip6_tunnel Martin KaFai Lau
2015-09-01 18:55 ` [PATCH net 1/3] ipv6: Refactor common ip6gre_tunnel_init codes Martin KaFai Lau
2015-09-01 18:55 ` [PATCH net 2/3] ipv6: Rename the dst_cache helper functions in ip6_tunnel Martin KaFai Lau
2015-09-01 18:55 ` [PATCH net 3/3] ipv6: Fix dst_entry refcnt bugs " Martin KaFai Lau
2015-09-01 20:14 ` Eric Dumazet
2015-09-01 20:55 ` Martin KaFai Lau
2015-09-01 21:26 ` Eric Dumazet
2015-09-01 22:25 ` Martin KaFai Lau
2015-09-01 22:38 ` Eric Dumazet
2015-09-02 0:31 ` Martin KaFai Lau
2015-09-02 0:42 ` Martin KaFai Lau
2015-09-02 1:02 ` Martin KaFai Lau
2015-09-02 1:55 ` Martin KaFai Lau
2015-09-02 20:58 ` Martin KaFai Lau
2015-09-02 21:30 ` Eric Dumazet
2015-09-02 21:52 ` Martin KaFai Lau
2015-09-02 22:48 ` Eric Dumazet [this message]
2015-09-02 23:04 ` David Miller
2015-09-02 23:10 ` Martin KaFai Lau
2015-09-02 23:14 ` David Miller
2015-09-02 23:46 ` Eric Dumazet
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=1441234137.8932.209.camel@edumazet-glaptop2.roam.corp.google.com \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=kafai@fb.com \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/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).