[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200929123713.GG3094@unreal>
Date: Tue, 29 Sep 2020 15:37:13 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Alex Dewar <alex.dewar90@...il.com>
Cc: Saeed Mahameed <saeedm@...dia.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Roi Dayan <roid@...lanox.com>, Oz Shlomo <ozsh@...lanox.com>,
Paul Blakey <paulb@...lanox.com>,
Eli Britstein <elibr@...lanox.com>,
Ariel Levkovich <lariel@...dia.com>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] net/mlx5e: Fix use of freed pointer
On Tue, Sep 29, 2020 at 11:15:49AM +0100, Alex Dewar wrote:
> If the call to mlx5_fc_create() fails, then shared_counter will be freed
> before its member, shared_counter->counter, is accessed to retrieve the
> error code. Fix by using an intermediate variable.
>
> Addresses-Coverity: CID 1497153: Memory - illegal accesses (USE_AFTER_FREE)
> Fixes: 1edae2335adf ("net/mlx5e: CT: Use the same counter for both directions")
> Signed-off-by: Alex Dewar <alex.dewar90@...il.com>
> ---
> v2:
> - Add Fixes tag (Leon)
> - Use ERR_CAST (Leon)
>
> Hi Leon,
>
> I've made the suggested changes. Let me know if there's anything else
> you need :)
Hi Alex,
Saeed already picked Dan's patch.
https://lore.kernel.org/linux-rdma/1017ab3724b83818c03dfa7661b3f31827a7f62f.camel@kernel.org/T/#t
>
> There is also this patch in the series which doesn't seem to have been
> reviewed yet: https://lore.kernel.org/lkml/20200927113254.362480-4-alex.dewar90@gmail.com/
Ariel is handling this internally.
https://lore.kernel.org/linux-rdma/64f6a3eaaac505c341f996df0b0877ee9af56c00.camel@kernel.org/T/#t
Thanks
Powered by blists - more mailing lists