Linux-ext4 Archive mirror
 help / color / mirror / Atom feed
From: Stefan Wahren <wahrenst@gmx.net>
To: Theodore Ts'o <tytso@mit.edu>, Andreas Dilger <adilger.kernel@dilger.ca>
Cc: linux-ext4@vger.kernel.org
Subject: KCSAN: data-race in ext4_da_write_end / mpage_process_page_bufs
Date: Sat, 2 Mar 2024 14:16:44 +0100	[thread overview]
Message-ID: <bac377c2-ccc2-4cc3-974e-01cdf3f14af7@gmx.net> (raw)

Hi,
i enabled KCSAN for Linux 6.6.19 on Raspberry Pi 3 B+ (arm64/defconfig)
and after installing a Debian packaging on the ext4 rootfs the following
has been triggered in the kernel log:

[ 1389.056656]
==================================================================
[ 1389.056781] BUG: KCSAN: data-race in ext4_da_write_end /
mpage_process_page_bufs

[ 1389.056926] write to 0xffff29ba65896a68 of 8 bytes by task 1447 on cpu 1:
[ 1389.056989]  ext4_da_write_end+0xe4/0x43c
[ 1389.057058]  generic_perform_write+0x1c0/0x2dc
[ 1389.057161]  ext4_buffered_write_iter+0x90/0x198
[ 1389.057246]  ext4_file_write_iter+0x98/0x84c
[ 1389.057328]  vfs_write+0x374/0x4bc
[ 1389.057398]  ksys_write+0x84/0x138
[ 1389.057467]  __arm64_sys_write+0x44/0x58
[ 1389.057539]  invoke_syscall+0x60/0x180
[ 1389.057636]  el0_svc_common.constprop.0+0x78/0x14c
[ 1389.057735]  do_el0_svc+0x34/0x44
[ 1389.057827]  el0_svc+0x38/0x70
[ 1389.057914]  el0t_64_sync_handler+0x13c/0x158
[ 1389.058007]  el0t_64_sync+0x190/0x194

[ 1389.058109] read to 0xffff29ba65896a68 of 8 bytes by task 939 on cpu 0:
[ 1389.058172]  mpage_process_page_bufs+0x54/0x308
[ 1389.058268]  mpage_prepare_extent_to_map+0x670/0x81c
[ 1389.058337]  ext4_do_writepages+0x5bc/0xf78
[ 1389.058405]  ext4_writepages+0xf4/0x1a4
[ 1389.058471]  do_writepages+0xb8/0x294
[ 1389.058557]  __writeback_single_inode+0x54/0x270
[ 1389.058628]  writeback_sb_inodes+0x374/0x6ac
[ 1389.058697]  __writeback_inodes_wb+0x68/0x150
[ 1389.058767]  wb_writeback.isra.0+0x228/0x258
[ 1389.058837]  wb_workfn+0x3e4/0x618
[ 1389.058904]  process_one_work+0x314/0x53c
[ 1389.058993]  worker_thread+0x628/0x7e4
[ 1389.059080]  kthread+0x1c0/0x1c4
[ 1389.059156]  ret_from_fork+0x10/0x20

[ 1389.059262] value changed: 0x0000000002a34000 -> 0x0000000002a35000

[ 1389.059347] Reported by Kernel Concurrency Sanitizer on:
[ 1389.059390] CPU: 0 PID: 939 Comm: kworker/u8:1 Not tainted 6.6.19 #2
[ 1389.059466] Hardware name: Raspberry Pi 3 Model B Plus Rev 1.3 (DT)
[ 1389.059519] Workqueue: writeback wb_workfn (flush-179:0)
[ 1389.059631]
==================================================================

I hope this isn't a false positive and helpful.

Regards

                 reply	other threads:[~2024-03-02 13:16 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=bac377c2-ccc2-4cc3-974e-01cdf3f14af7@gmx.net \
    --to=wahrenst@gmx.net \
    --cc=adilger.kernel@dilger.ca \
    --cc=linux-ext4@vger.kernel.org \
    --cc=tytso@mit.edu \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).