Netdev Archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: netdev <netdev@vger.kernel.org>, Jakub Kicinski <kuba@kernel.org>
Cc: danielj@nvidia.com, jiri@nvidia.com, hengqi@linux.alibaba.com,
	Jason Wang <jasowang@redhat.com>, Paolo Abeni <pabeni@redhat.com>
Subject: Leak in virtio_net in net-next
Date: Thu, 9 May 2024 11:44:16 -0600	[thread overview]
Message-ID: <0674ca1b-020f-4f93-94d0-104964566e3f@kernel.dk> (raw)

Hi,

Starting working on a small networking series this morning, and
was instantly greeted by:

[   13.018662] kmemleak: 2 new suspected memory leaks (see /sys/kernel/debug/kmemleak)

when booting my vm image. Details:

# cat /sys/kernel/debug/kmemleak
unreferenced object 0xffff000006479aa0 (size 8):
  comm "kworker/3:1", pid 98, jiffies 4294892862
  hex dump (first 8 bytes):
    00 00 00 00 00 00 00 00                          ........
  backtrace (crc 0):
    [<00000000e3a8eaad>] kmemleak_alloc+0x30/0x38
    [<0000000067412f7a>] kmalloc_trace+0x234/0x364
    [<0000000077402ae2>] virtnet_rx_mode_work+0x144/0x78c
    [<00000000a7f96032>] process_one_work+0x538/0x1048
    [<000000002cbbcce6>] worker_thread+0x760/0xbd4
    [<0000000077f92d4a>] kthread+0x2dc/0x368
    [<0000000051ca839f>] ret_from_fork+0x10/0x20
unreferenced object 0xffff000006479ac0 (size 8):
  comm "kworker/3:1", pid 98, jiffies 4294892862
  hex dump (first 8 bytes):
    00 00 00 00 00 00 00 00                          ........
  backtrace (crc 0):
    [<00000000e3a8eaad>] kmemleak_alloc+0x30/0x38
    [<0000000067412f7a>] kmalloc_trace+0x234/0x364
    [<0000000077402ae2>] virtnet_rx_mode_work+0x144/0x78c
    [<00000000a7f96032>] process_one_work+0x538/0x1048
    [<000000002cbbcce6>] worker_thread+0x760/0xbd4
    [<0000000077f92d4a>] kthread+0x2dc/0x368
    [<0000000051ca839f>] ret_from_fork+0x10/0x20

and taking a quick look at the virtio_net commits that are in that tree,
this one introduces the leaks:

commit ff7c7d9f5261e4372e541e6bb6781b386a839b48
Author: Daniel Jurgens <danielj@nvidia.com>
Date:   Fri May 3 23:24:41 2024 +0300

    virtio_net: Remove command data from control_buf

I didn't look into debugging this, figured if I can trigger this by just
booting a vm in 10 seconds, it should be trivial for the
authors/testers/reviewers to sort out.

-- 
Jens Axboe


                 reply	other threads:[~2024-05-09 17:44 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=0674ca1b-020f-4f93-94d0-104964566e3f@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=danielj@nvidia.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=jiri@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 read-only IMAP folder(s) and NNTP newsgroup(s).