From: Paolo Abeni <pabeni@redhat.com>
To: Gui-Dong Han <hanguidong02@gmail.com>,
3chas3@gmail.com, horms@kernel.org, kuba@kernel.org
Cc: linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, baijiaju1990@gmail.com,
stable@vger.kernel.org
Subject: Re: [PATCH REPOST net v2] atm/fore200e: Fix possible data race in fore200e_open()
Date: Thu, 20 Nov 2025 12:26:49 +0100 [thread overview]
Message-ID: <038697aa-a11c-45ce-a270-258403cc1457@redhat.com> (raw)
In-Reply-To: <20251118033330.1844136-1-hanguidong02@gmail.com>
On 11/18/25 4:33 AM, Gui-Dong Han wrote:
> Protect access to fore200e->available_cell_rate with rate_mtx lock to
> prevent potential data race.
>
> In this case, since the update depends on a prior read, a data race
> could lead to a wrong fore200e.available_cell_rate value.
>
> The field fore200e.available_cell_rate is generally protected by the lock
> fore200e.rate_mtx when accessed. In all other read and write cases, this
> field is consistently protected by the lock, except for this case and
> during initialization.
>
> This potential bug was detected by our experimental static analysis tool,
> which analyzes locking APIs and paired functions to identify data races
> and atomicity violations.
>
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Cc: stable@vger.kernel.org
> Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com>
> Reviewed-by: Simon Horman <horms@kernel.org>
> ---
> v2:
> * Added a description of the data race hazard in fore200e_open(), as
> suggested by Jakub Kicinski and Simon Horman.
It looks like you missed Jakub's reply on v2:
https://lore.kernel.org/netdev/20250123071201.3d38d8f6@kernel.org/
The above comment is still not sufficient: you should describe
accurately how 2 (or more) CPUs could actually race causing the
corruption, reporting the relevant call paths leading to the race.
Thanks,
Paolo
next prev parent reply other threads:[~2025-11-20 11:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-18 3:33 Gui-Dong Han
2025-11-20 11:26 ` Paolo Abeni [this message]
2025-11-20 12:14 ` Gui-Dong Han
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=038697aa-a11c-45ce-a270-258403cc1457@redhat.com \
--to=pabeni@redhat.com \
--cc=3chas3@gmail.com \
--cc=baijiaju1990@gmail.com \
--cc=hanguidong02@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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
all inboxes | Powered by JetHome®