[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <842845cbeb1187fc91b013077104fcce0c94dfc6.camel@nvidia.com>
Date: Fri, 8 Dec 2023 05:32:23 +0000
From: Jianbo Liu <jianbol@...dia.com>
To: "herbert@...dor.apana.org.au" <herbert@...dor.apana.org.au>,
"saeed@...nel.org" <saeed@...nel.org>
CC: "davem@...emloft.net" <davem@...emloft.net>, Tariq Toukan
<tariqt@...dia.com>, "netdev@...r.kernel.org" <netdev@...r.kernel.org>, Leon
Romanovsky <leonro@...dia.com>, "kuba@...nel.org" <kuba@...nel.org>,
"edumazet@...gle.com" <edumazet@...gle.com>, Saeed Mahameed
<saeedm@...dia.com>, "pabeni@...hat.com" <pabeni@...hat.com>
Subject: Re: [net V2 08/14] net/mlx5e: Check the number of elements before
walk TC rhashtable
On Fri, 2023-12-08 at 12:47 +0800, Herbert Xu wrote:
> Saeed Mahameed <saeed@...nel.org> wrote:
> > From: Jianbo Liu <jianbol@...dia.com>
> >
> > After IPSec TX tables are destroyed, the flow rules in TC
> > rhashtable,
> > which have the destination to IPSec, are restored to the original
> > one, the uplink.
> >
> > However, when the device is in switchdev mode and unload driver
> > with
> > IPSec rules configured, TC rhashtable cleanup is done before IPSec
> > cleanup, which means tc_ht->tbl is already freed when walking TC
> > rhashtable, in order to restore the destination. So add the
> > checking
> > before walking to avoid unexpected behavior.
>
> I'm confused. If the rhashtable has already been freed, then
> surely you can't even read nelems?
>
I think we can as rhashtable struct, not its pointer is declared in
rpriv, and rpriv is not freed.
Anyway, this patch was dropped in V3.
Thanks!
Jianbo
>
> Cheers,
Powered by blists - more mailing lists