netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: nhorman@tuxdriver.com
Cc: netdev@vger.kernel.org, boyang@redhat.com, skhare@vmware.com,
	pv-drivers@vmware.com
Subject: Re: [PATCH] vmxnet3: repair memory leak
Date: Tue, 23 Jan 2018 19:58:39 -0500 (EST)	[thread overview]
Message-ID: <20180123.195839.1025412103690413060.davem@davemloft.net> (raw)
In-Reply-To: <20180122210637.8254-1-nhorman@tuxdriver.com>

From: Neil Horman <nhorman@tuxdriver.com>
Date: Mon, 22 Jan 2018 16:06:37 -0500

> with the introduction of commit
> b0eb57cb97e7837ebb746404c2c58c6f536f23fa, it appears that rq->buf_info
> is improperly handled.  While it is heap allocated when an rx queue is
> setup, and freed when torn down, an old line of code in
> vmxnet3_rq_destroy was not properly removed, leading to rq->buf_info[0]
> being set to NULL prior to its being freed, causing a memory leak, which
> eventually exhausts the system on repeated create/destroy operations
> (for example, when  the mtu of a vmxnet3 interface is changed
> frequently.
> 
> Fix is pretty straight forward, just move the NULL set to after the
> free.
> 
> Tested by myself with successful results
> 
> Applies to net, and should likely be queued for stable, please
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> Reported-By: boyang@redhat.com

Applied and queued up for -stable, thanks Neil.

      parent reply	other threads:[~2018-01-24  0:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-22 21:06 [PATCH] vmxnet3: repair memory leak Neil Horman
2018-01-23 18:55 ` Shrikrishna Khare
2018-01-24  0:58 ` 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=20180123.195839.1025412103690413060.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=boyang@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=pv-drivers@vmware.com \
    --cc=skhare@vmware.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).