[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230328191051.4ceea7bb@kernel.org>
Date: Tue, 28 Mar 2023 19:10:51 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Liang He <windhl@....com>
Cc: davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
netdev@...r.kernel.org
Subject: Re: [PATCH] rionet: Fix refcounting bugs
On Tue, 28 Mar 2023 12:50:06 +0800 Liang He wrote:
> In rionet_start_xmit(), we should put the refcount_inc()
> before we add *skb* into the queue, otherwise it may cause
> the consumer to prematurely call refcount_dec().
Are you sure the race can happen? Look around the code, please.
> Besides, before the next rionet_queue_tx_msg() when we
> meet the 'RIONET_MAC_MATCH', we should also call
> refcount_inc() before the skb is added into the queue.
And why is that?
As far as I can tell your patch reorders something that doesn't matter
and then adds a bug :|
Powered by blists - more mailing lists