From: patchwork-bot+netdevbpf@kernel•org
To: Ruan Jinjie <ruanjinjie@huawei•com>
Cc: linux-arm-kernel@lists•infradead.org, netdev@vger•kernel.org,
lars.povlsen@microchip•com, Steen.Hegelund@microchip•com,
daniel.machon@microchip•com, UNGLinuxDriver@microchip•com,
davem@davemloft•net, edumazet@google•com, kuba@kernel•org,
pabeni@redhat•com, horatiu.vultur@microchip•com
Subject: Re: [PATCH net] net: microchip: vcap api: Fix possible memory leak for vcap_dup_rule()
Date: Sun, 10 Sep 2023 18:00:21 +0000 [thread overview]
Message-ID: <169436882179.20878.3372919952724343997.git-patchwork-notify@kernel.org> (raw)
In-Reply-To: <20230907140359.2399646-1-ruanjinjie@huawei.com>
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft•net>:
On Thu, 7 Sep 2023 22:03:58 +0800 you wrote:
> Inject fault When select CONFIG_VCAP_KUNIT_TEST, the below memory leak
> occurs. If kzalloc() for duprule succeeds, but the following
> kmemdup() fails, the duprule, ckf and caf memory will be leaked. So kfree
> them in the error path.
>
> unreferenced object 0xffff122744c50600 (size 192):
> comm "kunit_try_catch", pid 346, jiffies 4294896122 (age 911.812s)
> hex dump (first 32 bytes):
> 10 27 00 00 04 00 00 00 1e 00 00 00 2c 01 00 00 .'..........,...
> 00 00 00 00 00 00 00 00 18 06 c5 44 27 12 ff ff ...........D'...
> backtrace:
> [<00000000394b0db8>] __kmem_cache_alloc_node+0x274/0x2f8
> [<0000000001bedc67>] kmalloc_trace+0x38/0x88
> [<00000000b0612f98>] vcap_dup_rule+0x50/0x460
> [<000000005d2d3aca>] vcap_add_rule+0x8cc/0x1038
> [<00000000eef9d0f8>] test_vcap_xn_rule_creator.constprop.0.isra.0+0x238/0x494
> [<00000000cbda607b>] vcap_api_rule_remove_in_front_test+0x1ac/0x698
> [<00000000c8766299>] kunit_try_run_case+0xe0/0x20c
> [<00000000c4fe9186>] kunit_generic_run_threadfn_adapter+0x50/0x94
> [<00000000f6864acf>] kthread+0x2e8/0x374
> [<0000000022e639b3>] ret_from_fork+0x10/0x20
>
> [...]
Here is the summary with links:
- [net] net: microchip: vcap api: Fix possible memory leak for vcap_dup_rule()
https://git.kernel.org/netdev/net/c/281f65d29d6d
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
prev parent reply other threads:[~2023-09-10 18:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 14:03 [PATCH net] net: microchip: vcap api: Fix possible memory leak for vcap_dup_rule() Jinjie Ruan
2023-09-10 13:21 ` Simon Horman
2023-09-10 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=169436882179.20878.3372919952724343997.git-patchwork-notify@kernel.org \
--to=patchwork-bot+netdevbpf@kernel$(echo .)org \
--cc=Steen.Hegelund@microchip$(echo .)com \
--cc=UNGLinuxDriver@microchip$(echo .)com \
--cc=daniel.machon@microchip$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=horatiu.vultur@microchip$(echo .)com \
--cc=kuba@kernel$(echo .)org \
--cc=lars.povlsen@microchip$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pabeni@redhat$(echo .)com \
--cc=ruanjinjie@huawei$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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