Repository navigation
Conversation
|
Upstream branch: 24a19b9 |
|
Upstream branch: 24a19b9 |
7c38520 to
1b6ceeb
Compare
|
Upstream branch: 24a19b9 |
1b6ceeb to
a85cd17
Compare
2e69118 to
3cdd51f
Compare
|
Upstream branch: 4056b3c |
a85cd17 to
91243f6
Compare
3cdd51f to
e6ca2c1
Compare
|
Upstream branch: 0fcb05b |
91243f6 to
249f6fd
Compare
e6ca2c1 to
3d027d5
Compare
|
Upstream branch: 58161ea |
249f6fd to
b9017c7
Compare
3d027d5 to
90ea7e4
Compare
|
Upstream branch: c03c1a1 |
b9017c7 to
a8a7802
Compare
90ea7e4 to
435b194
Compare
|
Upstream branch: 7be4bc5 |
a8a7802 to
5f06fc4
Compare
435b194 to
fd67522
Compare
|
Upstream branch: 17bb0e2 |
5f06fc4 to
7732e8b
Compare
fd67522 to
3b53a63
Compare
|
Upstream branch: 6b4b543 |
5d387a7 to
b808845
Compare
5d84576 to
6582ed2
Compare
|
Upstream branch: fb2c3f4 |
b808845 to
6f78e89
Compare
6582ed2 to
b3a1abc
Compare
|
Upstream branch: d135ab4 |
6f78e89 to
4ac035d
Compare
b3a1abc to
712496f
Compare
|
Upstream branch: c339f40 |
4ac035d to
bf280de
Compare
712496f to
a186880
Compare
|
Upstream branch: d89e1d1 |
bf280de to
07bafd8
Compare
a186880 to
46206a3
Compare
|
Upstream branch: 6628e7d |
07bafd8 to
7db9cb3
Compare
46206a3 to
220bd96
Compare
|
Upstream branch: 05441d6 |
7db9cb3 to
7256856
Compare
220bd96 to
6c4625e
Compare
|
Upstream branch: f66469d |
7256856 to
e0d2d05
Compare
6c4625e to
c7f678d
Compare
|
Upstream branch: d487237 |
e0d2d05 to
8850dcd
Compare
c7f678d to
6aa6cd1
Compare
mapping->nrpages is updated under the i_pages lock but is read locklessly as a cheap "anything cached?" hint, e.g. in invalidate_bdev() and filemap_write_and_wait_range(). KCSAN reports the race: BUG: KCSAN: data-race in __filemap_add_folio / invalidate_bdev read-write to 0xffff8881004c4178 of 8 bytes by task 3600 on cpu 0: __filemap_add_folio+0x6b7/0x910 mm/filemap.c:919 filemap_add_folio+0x1cd/0x380 page_cache_ra_unbounded+0x1a4/0x3a0 ... blkdev_read_iter+0x21e/0x2d0 read to 0xffff8881004c4178 of 8 bytes by task 3601 on cpu 1: invalidate_bdev+0x25/0x70 block/bdev.c:98 ext4_fill_super+0x2ccb/0x37b0 The same counter also races with filemap_write_and_wait_range() through mapping_needs_writeback(). The race is benign: a stale value only makes the caller do or skip a harmless invalidate/flush pass. Mark the lockless reads with data_race() in invalidate_bdev() and in the two callers of mapping_needs_writeback(), rather than inside the helper, so a future user needing a reliable answer is not silently covered. Reported-by: syzbot+e0624b5bf72b99131402@syzkaller.appspotmail.com Closes: https://syzkaller.appspot.com/bug?extid=e0624b5bf72b99131402 Signed-off-by: Nguyen Ngoc Thang <ngocthang2710.1999@gmail.com> Reviewed-by: Jan Kara <jack@suse.cz>
|
Upstream branch: b3dfbde |
8850dcd to
0646255
Compare
Pull request for series with
subject: mm/filemap: annotate lockless reads of mapping->nrpages
version: 2
url: https://patchwork.kernel.org/series/1183849/