mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@nvidia.com>
To: Aleksandr Mishin <amishin@t-argos.ru>
Cc: Jiri Pirko <jiri@resnulli.us>, Petr Machata <petrm@nvidia.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	lvc-project@linuxtesting.org
Subject: Re: [PATCH net] mlxsw: core_linecards: Fix double memory deallocation in case of invalid INI file
Date: Wed, 3 Jul 2024 20:26:38 +0300	[thread overview]
Message-ID: <ZoWJzqaRJKjtTlNO@shredder.mtl.com> (raw)
In-Reply-To: <20240702103352.15315-1-amishin@t-argos.ru>

On Tue, Jul 02, 2024 at 01:33:52PM +0300, Aleksandr Mishin wrote:
> In case of invalid INI file mlxsw_linecard_types_init() deallocates memory
> but doesn't reset pointer to NULL and returns 0. In case of any error
> occured after mlxsw_linecard_types_init() call, mlxsw_linecards_init()
> calls mlxsw_linecard_types_fini() which perform memory deallocation again.

s/perform/performs/

> 
> Add pointer reset to NULL.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: b217127e5e4e ("mlxsw: core_linecards: Add line card objects and implement provisioning")
> Signed-off-by: Aleksandr Mishin <amishin@t-argos.ru>

Reviewed-by: Ido Schimmel <idosch@nvidia.com>

      parent reply	other threads:[~2024-07-03 17:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-02 10:33 Aleksandr Mishin
2024-07-02 10:50 ` Przemek Kitszel
2024-07-03 17:26 ` Ido Schimmel [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=ZoWJzqaRJKjtTlNO@shredder.mtl.com \
    --to=idosch@nvidia.com \
    --cc=amishin@t-argos.ru \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvc-project@linuxtesting.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.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

all inboxes | Powered by JetHome®