netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wang <jasowang@redhat.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Linux Kernel Network Developers <netdev@vger.kernel.org>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: Re: [Patch net v3] tun: fix a memory leak for tfile->tx_array
Date: Tue, 16 Jan 2018 14:00:52 +0800	[thread overview]
Message-ID: <16b82836-7e07-c13c-cd7b-917eaa06d224@redhat.com> (raw)
In-Reply-To: <CAM_iQpWKTZTpkfS3tmarNNN64wtPdSutZSzymy+1XnN24__NPA@mail.gmail.com>



On 2018年01月16日 13:49, Cong Wang wrote:
> On Mon, Jan 15, 2018 at 9:46 PM, Jason Wang <jasowang@redhat.com> wrote:
>>
>> I think then you don't even need the memset trick since we are sure it has
>> been implemented?
> It doesn't look like sk_alloc() zero's the memory of tfile.

Typo, for "implemented" I mean "initialized".

I mean we can leave __tun_detach() as is, and just add the cleanup to 
tun_detach_all(). This is because in both cases, we're sure skb array 
has been initialized before.

Thanks

  reply	other threads:[~2018-01-16  6:00 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-15 19:37 [Patch net v3] tun: fix a memory leak for tfile->tx_array Cong Wang
2018-01-16  5:46 ` Jason Wang
2018-01-16  5:49   ` Cong Wang
2018-01-16  6:00     ` Jason Wang [this message]
2018-01-16  6:07       ` Cong Wang
2018-01-16  6:12         ` Jason Wang
2018-01-16  6:33           ` Cong Wang
2018-01-16  6:37             ` Jason Wang
2018-01-16  6:49               ` Cong Wang

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=16b82836-7e07-c13c-cd7b-917eaa06d224@redhat.com \
    --to=jasowang@redhat.com \
    --cc=dvyukov@google.com \
    --cc=netdev@vger.kernel.org \
    --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).