[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZXKf8f/hjw1K6Qyp@gondor.apana.org.au>
Date: Fri, 8 Dec 2023 12:47:45 +0800
From: Herbert Xu <herbert@...dor.apana.org.au>
To: Saeed Mahameed <saeed@...nel.org>
Cc: davem@...emloft.net, kuba@...nel.org, pabeni@...hat.com,
edumazet@...gle.com, saeedm@...dia.com, netdev@...r.kernel.org,
tariqt@...dia.com, jianbol@...dia.com, leonro@...dia.com
Subject: Re: [net V2 08/14] net/mlx5e: Check the number of elements before
walk TC rhashtable
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?
Cheers,
--
Email: Herbert Xu <herbert@...dor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Powered by blists - more mailing lists