[PATCH v2] fs: jfs: fix a possible data race in txBegin()

2020-05-05 Thread Jia-Ju Bai
The functions txBegin() and txLazyCommit() can be concurrently executed in the following call contexts: Thread1: jfs_write_inode() jfs_commit_inode() txBegin() Thread2: jfs_lazycommit() txLazyCommit() In txBegin(): tblk->next = tblk->last = tblk->xflag = tblk->flag =

[PATCH v2] fs: jfs: fix a possible data race in txBegin()

2020-05-05 Thread Jia-Ju Bai
The functions txBegin() and txLazyCommit() can be concurrently executed in the following call contexts: Thread1: jfs_write_inode() jfs_commit_inode() txBegin() Thread2: jfs_lazycommit() txLazyCommit() In txBegin(): tblk->next = tblk->last = tblk->xflag = tblk->flag =

Re: fs: jfs: fix a possible data race in txBegin()

2020-05-05 Thread Jia-Ju Bai
On 2020/5/5 21:23, Dave Kleikamp wrote: On 5/5/20 12:12 AM, Markus Elfring wrote: I am not sure how to add the tag "Fixes"... How helpful do you find the available software documentation?

Re: fs: jfs: fix a possible data race in txBegin()

2020-05-05 Thread Dave Kleikamp
On 5/5/20 12:12 AM, Markus Elfring wrote: >> I am not sure how to add the tag "Fixes"... > > How helpful do you find the available software documentation? >

Re: fs: jfs: fix a possible data race in txBegin()

2020-05-05 Thread Jia-Ju Bai
On 2020/5/5 13:12, Markus Elfring wrote: I am not sure how to add the tag "Fixes"... How helpful do you find the available software documentation?

Re: fs: jfs: fix a possible data race in txBegin()

2020-05-04 Thread Markus Elfring
> I am not sure how to add the tag "Fixes"... How helpful do you find the available software documentation? https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?id=47cf1b422e6093aee2a3e55d5e162112a2c69870#n183 > I need to find

Re: [PATCH] fs: jfs: fix a possible data race in txBegin()

2020-05-04 Thread Jia-Ju Bai
On 2020/5/5 0:15, Markus Elfring wrote: Thus, a data race can occur for tblk->flag. To fix this data race, the spinlock log->gclock is used in txBegin(). This data race is found by our concurrency fuzzer. How do you think about a wording variant like the following? Change description:

Re: [PATCH] fs: jfs: fix a possible data race in txBegin()

2020-05-04 Thread Markus Elfring
> Thus, a data race can occur for tblk->flag. > > To fix this data race, the spinlock log->gclock is used in > txBegin(). > > This data race is found by our concurrency fuzzer. How do you think about a wording variant like the following? Change description: A data race can occur for the

[PATCH] fs: jfs: fix a possible data race in txBegin()

2020-05-04 Thread Jia-Ju Bai
The functions txBegin() and txLazyCommit() can be concurrently executed in the following call contexts: Thread1: jfs_write_inode() jfs_commit_inode() txBegin() Thread2: jfs_lazycommit() txLazyCommit() In txBegin(): tblk->next = tblk->last = tblk->xflag = tblk->flag =