From: Jakub Kicinski <kuba@kernel.org>
To: Liang He <windhl@126.com>
Cc: davem@davemloft.net, edumazet@google.com, pabeni@redhat.com,
netdev@vger.kernel.org
Subject: Re: [PATCH] rionet: Fix refcounting bugs
Date: Tue, 28 Mar 2023 19:10:51 -0700 [thread overview]
Message-ID: <20230328191051.4ceea7bb@kernel.org> (raw)
In-Reply-To: <20230328045006.2482327-1-windhl@126.com>
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 :|
next prev parent reply other threads:[~2023-03-29 2:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-28 4:50 [PATCH] rionet: Fix refcounting bugs Liang He
2023-03-29 2:10 ` Jakub Kicinski [this message]
2023-03-29 6:01 ` Liang He
2023-03-29 18:09 ` Simon Horman
2023-03-30 2:09 ` Liang He
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=20230328191051.4ceea7bb@kernel.org \
--to=kuba@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=windhl@126.com \
/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).