From: Vasily Gorbik <gor@linux.ibm.com>
To: Heiko Carstens <hca@linux.ibm.com>
Cc: Christoph Schlameuss <schlameuss@linux.ibm.com>,
Alexander Egorenkov <egorenar@linux.ibm.com>,
Alexander Gordeev <agordeev@linux.ibm.com>,
Sven Schnelle <svens@linux.ibm.com>,
Christian Borntraeger <borntraeger@linux.ibm.com>,
linux-s390@vger.kernel.org
Subject: Re: [PATCH] s390/time: Use jiffies instead of jiffies_64
Date: Fri, 14 Aug 2026 13:30:08 +0200 [thread overview]
Message-ID: <ttjrby8@ub.hpns> (raw)
In-Reply-To: <20260813132505.3691502-1-hca@linux.ibm.com>
On Thu, Aug 13, 2026 at 03:25:05PM +0200, Heiko Carstens wrote:
> Christoph Schlameuss and Alexander Egorenkov reported a data-race
> reported by KCSAN when jiffies_64 is read:
>
> ==================================================================
> BUG: KCSAN: data-race in do_account_vtime / tick_do_update_jiffies64
>
> write to 0x0000016599ea8600 of 8 bytes by interrupt on cpu 6:
> tick_do_update_jiffies64+0x140/0x250
> =============================================================>
> BUG: KCSAN: data-race in do_account_vtime / tick_do_update_ji>
>
> write to 0x0000016599ea8600 of 8 bytes by interrupt on cpu 6:
> tick_do_update_jiffies64+0x140/0x250
> tick_nohz_handler+0x2e6/0x300
> __run_hrtimer+0x156/0x4d0
> __hrtimer_run_queues+0xd2/0x150
> ...
> system_call+0x72/0x90
>
> read to 0x0000016599ea8600 of 8 bytes by interrupt on cpu 12:
> do_account_vtime+0x7d6/0x860
> vtime_flush+0x26/0xe0
> update_process_times+0x32/0x160
> tick_nohz_handler+0x12a/0x300
> ...
> system_call+0x72/0x90
>
> value changed: 0x00000000ffffaa6c -> 0x00000000ffffaa6d
> ...
> =============================================================>
>
> Problem is that jiffies_64 instead of jiffies is used. Both are at the
> same address, but only jiffies is of volatile type, which prevents this
> warning.
>
> Change the vtime code so jiffies instead of jiffies_64 is used
> everywhere. This addresses also the inconsistency that both jiffies and
> jiffies_64 were used in the original patch which introduced this.
>
> Fixes: f341b8dff982 ("s390/vtime: limit MT scaling value updates")
> Reported-by: Christoph Schlameuss <schlameuss@linux.ibm.com>
> Reported-by: Alexander Egorenkov <egorenar@linux.ibm.com>
> Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
> ---
> arch/s390/kernel/vtime.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
Applied, thank you!
prev parent reply other threads:[~2026-08-14 11:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-13 13:25 [PATCH] s390/time: Use jiffies instead of jiffies_64 Heiko Carstens
2026-08-13 13:48 ` sashiko-bot
2026-08-14 9:52 ` Alexander Egorenkov
2026-08-14 11:30 ` Vasily Gorbik [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=ttjrby8@ub.hpns \
--to=gor@linux.ibm.com \
--cc=agordeev@linux.ibm.com \
--cc=borntraeger@linux.ibm.com \
--cc=egorenar@linux.ibm.com \
--cc=hca@linux.ibm.com \
--cc=linux-s390@vger.kernel.org \
--cc=schlameuss@linux.ibm.com \
--cc=svens@linux.ibm.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