From: Eric Dumazet <eric.dumazet@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: roy.qing.li@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/2] ipv6: remove unnecessary codes in tcp_ipv6.c
Date: Mon, 02 Jul 2012 10:13:36 +0200 [thread overview]
Message-ID: <1341216816.5269.32.camel@edumazet-glaptop> (raw)
In-Reply-To: <20120701.202610.12425223200611171.davem@davemloft.net>
On Sun, 2012-07-01 at 20:26 -0700, David Miller wrote:
> From: roy.qing.li@gmail.com
> Date: Mon, 2 Jul 2012 11:18:59 +0800
>
> > - if (opt) {
> > - newnp->opt = ipv6_dup_options(newsk, opt);
> > - if (opt != np->opt)
> > - sock_kfree_s(sk, opt, opt->tot_len);
>
> This is bogus, if we copy the options into a new copy in
> ipv6_dup_options() we have to free the old one or else we
> leak it.
Note that the old one is the np->opt of the listener, not the child.
I dont understand how np->opt could change under us, since we have
the listener socket locked.
If np->opt can change under us, we are doomed and need to add refcounts.
next prev parent reply other threads:[~2012-07-02 8:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 3:18 [PATCH net-next 1/2] ipv6: remove unnecessary codes in tcp_ipv6.c roy.qing.li
2012-07-02 3:19 ` [PATCH net-next 2/2] dccp: remove unnecessary codes in ipv6.c roy.qing.li
2012-07-02 3:26 ` David Miller
2012-07-02 9:08 ` Eric Dumazet
2012-07-05 10:13 ` David Miller
2012-07-02 3:26 ` [PATCH net-next 1/2] ipv6: remove unnecessary codes in tcp_ipv6.c David Miller
2012-07-02 5:23 ` RongQing Li
2012-07-02 5:37 ` David Miller
2012-07-02 8:13 ` Eric Dumazet [this message]
2012-07-02 8:54 ` Eric Dumazet
2012-07-02 9:07 ` Eric Dumazet
2012-07-05 10:13 ` David Miller
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=1341216816.5269.32.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=roy.qing.li@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