mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Markus Elfring <Markus.Elfring@web.de>
To: Gui-Dong Han <hanguidong02@outlook.com>,
	linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org,
	kernel-janitors@vger.kernel.org, Chas Williams <3chas3@gmail.com>
Cc: LKML <linux-kernel@vger.kernel.org>, Jia-Ju Bai <baijiaju1990@gmail.com>
Subject: Re: [PATCH] atm/fore200e: Consolidate available cell rate update to prevent race condition
Date: Tue, 11 Jun 2024 09:39:24 +0200	[thread overview]
Message-ID: <2ed41eff-284c-4c44-8090-d2c1765ab6b5@web.de> (raw)
In-Reply-To: <ME3P282MB3617E02526BEE4B295478B1AC0C72@ME3P282MB3617.AUSP282.PROD.OUTLOOK.COM>

> In fore200e_change_qos, there is a race condition due to two consecutive
> updates to the 'available_cell_rate' variable. If a read operation
> occurs between these updates, an intermediate value might be read,
> leading to potential bugs.

* Would you like to explain a bit more why you find the applied mutex
  insufficient for data synchronisation aspects?

* Is any special analysis tool (like “BassCheck”) involved in such a contribution?


> To fix this issue, 'available_cell_rate' should be adjusted in a single
> operation, ensuring consistency and preventing any intermediate states
> from being read.

* Please improve the change description with an imperative wording.
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc2#n94

* How do you think about to specify the name of the affected function
  in the summary phrase?

* I would like to point out that similar source code adjustments can be achieved
  also by the means of the semantic patch language (Coccinelle software).

Regards,
Markus

  reply	other threads:[~2024-06-11  7:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-11  3:54 Gui-Dong Han
2024-06-11  7:39 ` Markus Elfring [this message]
2024-06-14 12:23 ` Simon Horman

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=2ed41eff-284c-4c44-8090-d2c1765ab6b5@web.de \
    --to=markus.elfring@web.de \
    --cc=3chas3@gmail.com \
    --cc=baijiaju1990@gmail.com \
    --cc=hanguidong02@outlook.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-atm-general@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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®