From: Simon Horman <simon.horman@corigine.com>
To: Natalia Petrova <n.petrova@fintech.ru>
Cc: Manivannan Sadhasivam <mani@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
linux-arm-msm@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org
Subject: Re: [PATCH] net: qrtr: free memory on error path in radix_tree_insert()
Date: Wed, 25 Jan 2023 16:04:20 +0100 [thread overview]
Message-ID: <Y9FE9E4G/arTAHjL@corigine.com> (raw)
In-Reply-To: <20230125134831.8090-1-n.petrova@fintech.ru>
On Wed, Jan 25, 2023 at 04:48:31PM +0300, Natalia Petrova wrote:
> Function radix_tree_insert() returns errors if the node hasn't
> been initialized and added to the tree.
>
> "kfree(node)" and return value "NULL" of node_get() help
> to avoid using unclear node in other calls.
>
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
>
> Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace")
> Signed-off-by: Natalia Petrova <n.petrova@fintech.ru>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
next prev parent reply other threads:[~2023-01-25 15:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-25 13:48 [PATCH] net: qrtr: free memory on error path in radix_tree_insert() Natalia Petrova
2023-01-25 15:04 ` Simon Horman [this message]
2023-01-27 5:55 ` Manivannan Sadhasivam
2023-01-28 8:40 ` patchwork-bot+netdevbpf
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=Y9FE9E4G/arTAHjL@corigine.com \
--to=simon.horman@corigine.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lvc-project@linuxtesting.org \
--cc=mani@kernel.org \
--cc=n.petrova@fintech.ru \
--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