netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: patchwork-bot+netdevbpf@kernel.org
To: shaozhengchao <shaozhengchao@huawei.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com, jiri@mellanox.com,
	weiyongjun1@huawei.com, yuehaibing@huawei.com
Subject: Re: [PATCH net] netdevsim: fix memory leak in nsim_bus_dev_new()
Date: Thu, 27 Oct 2022 18:00:18 +0000	[thread overview]
Message-ID: <166689361886.21530.15766841922004344115.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20221026015405.128795-1-shaozhengchao@huawei.com>

Hello:

This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Wed, 26 Oct 2022 09:54:05 +0800 you wrote:
> If device_register() failed in nsim_bus_dev_new(), the value of reference
> in nsim_bus_dev->dev is 1. obj->name in nsim_bus_dev->dev will not be
> released.
> 
> unreferenced object 0xffff88810352c480 (size 16):
>   comm "echo", pid 5691, jiffies 4294945921 (age 133.270s)
>   hex dump (first 16 bytes):
>     6e 65 74 64 65 76 73 69 6d 31 00 00 00 00 00 00  netdevsim1......
>   backtrace:
>     [<000000005e2e5e26>] __kmalloc_node_track_caller+0x3a/0xb0
>     [<0000000094ca4fc8>] kvasprintf+0xc3/0x160
>     [<00000000aad09bcc>] kvasprintf_const+0x55/0x180
>     [<000000009bac868d>] kobject_set_name_vargs+0x56/0x150
>     [<000000007c1a5d70>] dev_set_name+0xbb/0xf0
>     [<00000000ad0d126b>] device_add+0x1f8/0x1cb0
>     [<00000000c222ae24>] new_device_store+0x3b6/0x5e0
>     [<0000000043593421>] bus_attr_store+0x72/0xa0
>     [<00000000cbb1833a>] sysfs_kf_write+0x106/0x160
>     [<00000000d0dedb8a>] kernfs_fop_write_iter+0x3a8/0x5a0
>     [<00000000770b66e2>] vfs_write+0x8f0/0xc80
>     [<0000000078bb39be>] ksys_write+0x106/0x210
>     [<00000000005e55a4>] do_syscall_64+0x35/0x80
>     [<00000000eaa40bbc>] entry_SYSCALL_64_after_hwframe+0x46/0xb0
> 
> [...]

Here is the summary with links:
  - [net] netdevsim: fix memory leak in nsim_bus_dev_new()
    https://git.kernel.org/netdev/net/c/cf2010aa1c73

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



      parent reply	other threads:[~2022-10-27 18:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-26  1:54 [PATCH net] netdevsim: fix memory leak in nsim_bus_dev_new() Zhengchao Shao
2022-10-27  3:35 ` Jakub Kicinski
2022-10-27 18:00 ` patchwork-bot+netdevbpf [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=166689361886.21530.15766841922004344115.git-patchwork-notify@kernel.org \
    --to=patchwork-bot+netdevbpf@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jiri@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shaozhengchao@huawei.com \
    --cc=weiyongjun1@huawei.com \
    --cc=yuehaibing@huawei.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).