From: Alex Dewar <alex.dewar90@gmail.com>
To: Saeed Mahameed <saeed@kernel.org>
Cc: Alex Dewar <alex.dewar90@gmail.com>,
Leon Romanovsky <leon@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
"Gustavo A. R. Silva" <gustavoars@kernel.org>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net/mlx5e: Fix freeing of unassigned pointer
Date: Wed, 7 Oct 2020 10:13:49 +0100 [thread overview]
Message-ID: <20201007091349.cceyuje3ktilygzv@medion> (raw)
In-Reply-To: <80cb7391f0feb838cc61a608efe0c24dcef41115.camel@kernel.org>
On Tue, Oct 06, 2020 at 04:22:12PM -0700, Saeed Mahameed wrote:
> On Sat, 2020-10-03 at 12:10 +0100, Alex Dewar wrote:
> > Commit ff7ea04ad579 ("net/mlx5e: Fix potential null pointer
> > dereference")
> > added some missing null checks but the error handling in
> > mlx5e_alloc_flow() was left broken: the variable attr is passed to
> > kfree
> > although it is never assigned to and never needs to be freed in this
> > function. Fix this.
> >
> > Addresses-Coverity-ID: 1497536 ("Memory - illegal accesses")
> > Fixes: ff7ea04ad579 ("net/mlx5e: Fix potential null pointer
> > dereference")
> > Signed-off-by: Alex Dewar <alex.dewar90@gmail.com>
> > ---
> > drivers/net/ethernet/mellanox/mlx5/core/en_tc.c | 17 +++++++++----
> > ----
> > 1 file changed, 9 insertions(+), 8 deletions(-)
> >
>
> Hi Alex, thanks for the patch,
> Colin submitted a one liner patch that I already picked up.
>
> I hope you are ok with this.
Hi Saeed,
Sure. As long as attr is no longer being freed then that should fix the
problem.
Best,
Alex
>
> Thanks,
> Saeed.
>
prev parent reply other threads:[~2020-10-07 9:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-03 11:10 [PATCH] net/mlx5e: Fix freeing of unassigned pointer Alex Dewar
2020-10-06 23:22 ` Saeed Mahameed
2020-10-07 9:13 ` Alex Dewar [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=20201007091349.cceyuje3ktilygzv@medion \
--to=alex.dewar90@gmail.com \
--cc=davem@davemloft.net \
--cc=gustavoars@kernel.org \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=saeed@kernel.org \
/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).