All of lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla-daemon@bugzilla.kernel.org
To: linux-xfs@vger.kernel.org
Subject: [Bug 207715] xfs: data race on lip->li_lsn in xfs_trans_ail_update_bulk()
Date: Wed, 13 May 2020 04:10:56 +0000	[thread overview]
Message-ID: <bug-207715-201763-8SlYWYrmkc@https.bugzilla.kernel.org/> (raw)
In-Reply-To: <bug-207715-201763@https.bugzilla.kernel.org/>

https://bugzilla.kernel.org/show_bug.cgi?id=207715

--- Comment #1 from Dave Chinner (david@fromorbit.com) ---
On Wed, May 13, 2020 at 03:21:05AM +0000, bugzilla-daemon@bugzilla.kernel.org
wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=207715
> 
>             Bug ID: 207715
>            Summary: xfs: data race on lip->li_lsn in
>                     xfs_trans_ail_update_bulk()
>            Product: File System
>            Version: 2.5
>     Kernel Version: 5.4
>           Hardware: All
>                 OS: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: XFS
>           Assignee: filesystem_xfs@kernel-bugs.kernel.org
>           Reporter: baijiaju1990@gmail.com
>         Regression: No
> 
> The functions xfs_trans_ail_update_bulk() and xfs_inode_item_format_core()
> are
> concurrently executed at runtime in the following call contexts:
> 
> Thread 1:
> xlog_ioend_work()
>   xlog_state_done_syncing()
>     xlog_state_do_callback()
>       xlog_state_do_iclog_callbacks()
>         xlog_cil_process_committed()
>           xlog_cil_committed()
>             xfs_trans_committed_bulk()
>               xfs_log_item_batch_insert()
>                 xfs_trans_ail_update_bulk()
> 
> Thread 2:
> xfs_file_write_iter()
>   xfs_file_buffered_aio_write()
>     xfs_file_aio_write_checks()
>       xfs_vn_update_time()
>         xfs_trans_commit()
>           __xfs_trans_commit()
>             xfs_log_commit_cil()
>               xlog_cil_insert_items()
>                 xlog_cil_insert_format_items()
>                   xfs_inode_item_format()
>                     xfs_inode_item_format_core()
> 
> In xfs_trans_ail_update_bulk():
>   lip->li_lsn = lsn;
> 
> In xfs_inode_item_format_core():
>   xfs_inode_to_log_dinode(ip, dic, ip->i_itemp->ili_item.li_lsn);

Probably a bug on 32 bit systems where a torn write can be seen.
Likely should use xfs_trans_ail_copy_lsn() to sample the lsn out
of the log item.

Cheers,

Dave.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

  parent reply	other threads:[~2020-05-13  4:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-13  3:21 [Bug 207715] New: xfs: data race on lip->li_lsn in xfs_trans_ail_update_bulk() bugzilla-daemon
2020-05-13  4:10 ` Dave Chinner
2020-05-13  4:10 ` bugzilla-daemon [this message]
2020-05-13  8:19 ` [Bug 207715] " bugzilla-daemon

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=bug-207715-201763-8SlYWYrmkc@https.bugzilla.kernel.org/ \
    --to=bugzilla-daemon@bugzilla.kernel.org \
    --cc=linux-xfs@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.