Messages in this thread | | | Date | Mon, 27 Jun 2022 08:43:14 -0400 | From | Qian Cai <> | Subject | Re: [PATCH v3 1/2] mm/swapfile: fix possible data races of inuse_pages |
| |
On Sat, Jun 25, 2022 at 05:33:45PM +0800, Miaohe Lin wrote: > si->inuse_pages could still be accessed concurrently now. The plain reads > outside si->lock critical section, i.e. swap_show and si_swapinfo, which > results in data races. READ_ONCE and WRITE_ONCE is used to fix such data > races. Note these data races should be ok because they're just used for > showing swap info.
Was this found by kcsan? If so, it would be useful to record the exact kscan report in the commit message.
| |