mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Cc: linux-kernel@vger.kernel.org, Lai Jiangshan <jiangshanlai@gmail.com>
Subject: Re: [PATCH v2 1/1] workqueue: fix data race with the pwq->stats[] increment
Date: Wed, 30 Aug 2023 09:55:27 -1000	[thread overview]
Message-ID: <ZO-er9rbuXiqwfU6@slm.duckdns.org> (raw)
In-Reply-To: <e5120df6-19f7-da11-1c53-e16fb92d9098@alu.unizg.hr>

Hello,

On Wed, Aug 30, 2023 at 09:48:53PM +0200, Mirsad Todorovac wrote:
> These might just not have been triggered yet, but logically they seem suspicious for a data race.
> I still have to verify if they are called from a locked context ...
> 
> Of course, as the original developer, you will have a clearer picture. I have been led by KCSAN
> to this particular detail.

These are just stats and pwq's are already per-cpu (most of the time). If
they trip kcsan and there's no easy way to work around like here, we should
add a wrapper to inc the stat and annotate it so that kcsan ignores it.

Thanks.

-- 
tejun

      reply	other threads:[~2023-08-30 20:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-26 14:51 Mirsad Goran Todorovac
2023-08-29 19:52 ` Tejun Heo
2023-08-30 19:48   ` Mirsad Todorovac
2023-08-30 19:55     ` Tejun Heo [this message]

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=ZO-er9rbuXiqwfU6@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mirsad.todorovac@alu.unizg.hr \
    /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®