* Re: linux-next: Tree for Jan 13 (UBSAN: invalid-load in ../mm/swap.c:996:11) [not found] <20220113152247.3f7c6c49@canb.auug.org.au> @ 2022-01-13 20:12 ` Randy Dunlap 2022-01-13 20:47 ` Matthew Wilcox 0 siblings, 1 reply; 4+ messages in thread From: Randy Dunlap @ 2022-01-13 20:12 UTC (permalink / raw) To: Stephen Rothwell, Linux Next Mailing List Cc: Linux Kernel Mailing List, linux-mm, Andrew Morton [-- Attachment #1: Type: text/plain, Size: 2394 bytes --] On 1/12/22 20:22, Stephen Rothwell wrote: > Hi all, > > Please not add v5.18 related material to your linux-next included branches > until after v5.17-rc1 has been released. > > Changes since 20220112: > on x86_64: =============== [ 1.561983] UBSAN: invalid-load in ../mm/swap.c:996:11 [ 1.561986] load of value 221 is not a valid value for type '_Bool' [ 1.561988] CPU: 1 PID: 7 Comm: kworker/u16:0 Not tainted 5.16.0-next-20220113 #1 [ 1.561992] Hardware name: TOSHIBA PORTEGE R835/Portable PC, BIOS Version 4.10 01/08/2013 [ 1.561994] Workqueue: events_unbound async_run_entry_fn [ 1.562001] Call Trace: [ 1.562003] <TASK> [ 1.562004] dump_stack_lvl+0x38/0x49 [ 1.562010] dump_stack+0x10/0x12 [ 1.562014] ubsan_epilogue+0x9/0x45 [ 1.562018] __ubsan_handle_load_invalid_value+0x53/0x5c [ 1.562023] __pagevec_release+0x24/0x47 [ 1.562028] pagevec_release+0xe/0x11 [ 1.562031] truncate_inode_pages_range+0x1d9/0x410 [ 1.562036] ? __filemap_fdatawait_range+0x77/0x108 [ 1.562041] ? __invalidate_bh_lrus+0x2b/0x2b [ 1.562045] ? put_bh+0x5/0x5 [ 1.562050] truncate_inode_pages+0xd/0xf [ 1.562054] kill_bdev.isra.0+0x21/0x25 [ 1.562059] blkdev_flush_mapping+0x3d/0xd3 [ 1.562063] ? filemap_fdatawait_range+0x17/0x19 [ 1.562067] blkdev_put_whole+0x16/0x36 [ 1.562071] blkdev_put+0x128/0x152 [ 1.562075] disk_scan_partitions+0x4c/0x64 [ 1.562081] device_add_disk+0x236/0x2d5 [ 1.562085] sd_probe+0x308/0x3c4 [ 1.562088] really_probe+0x17f/0x3c3 [ 1.562092] __driver_probe_device+0xcf/0x14d [ 1.562095] driver_probe_device+0x1e/0x8f [ 1.562097] __device_attach_driver+0xc7/0x104 [ 1.562100] ? driver_allows_async_probing+0x5d/0x5d [ 1.562103] ? driver_allows_async_probing+0x5d/0x5d [ 1.562106] bus_for_each_drv+0x8c/0xb3 [ 1.562111] __device_attach_async_helper+0x75/0xd4 [ 1.562114] async_run_entry_fn+0x58/0xe3 [ 1.562118] process_one_work+0x129/0x1cc [ 1.562121] worker_thread+0x183/0x22a [ 1.562124] kthread+0xe0/0xe8 [ 1.562128] ? rescuer_thread+0x24c/0x24c [ 1.562130] ? kthread_complete_and_exit+0x1b/0x1b [ 1.562135] ret_from_fork+0x22/0x30 [ 1.562139] </TASK> [ 1.562140] ================================================================================ Full boot log and kernel config file are attached. -- ~Randy [-- Attachment #2: boot-22113-oftest.log.gz --] [-- Type: application/gzip, Size: 38582 bytes --] [-- Attachment #3: config-next22113of.gz --] [-- Type: application/gzip, Size: 31363 bytes --] ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for Jan 13 (UBSAN: invalid-load in ../mm/swap.c:996:11) 2022-01-13 20:12 ` linux-next: Tree for Jan 13 (UBSAN: invalid-load in ../mm/swap.c:996:11) Randy Dunlap @ 2022-01-13 20:47 ` Matthew Wilcox 2022-01-13 21:26 ` Randy Dunlap 0 siblings, 1 reply; 4+ messages in thread From: Matthew Wilcox @ 2022-01-13 20:47 UTC (permalink / raw) To: Randy Dunlap Cc: Stephen Rothwell, Linux Next Mailing List, Linux Kernel Mailing List, linux-mm, Andrew Morton On Thu, Jan 13, 2022 at 12:12:52PM -0800, Randy Dunlap wrote: > [ 1.561983] UBSAN: invalid-load in ../mm/swap.c:996:11 > [ 1.561986] load of value 221 is not a valid value for type '_Bool' Ooh. This one's mine. Randy, does it repeat easily? This should fix it: diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h index dda8d5868c81..67b1246f136b 100644 --- a/include/linux/pagevec.h +++ b/include/linux/pagevec.h @@ -111,6 +111,7 @@ static_assert(offsetof(struct pagevec, pages) == static inline void folio_batch_init(struct folio_batch *fbatch) { fbatch->nr = 0; + fbatch->percpu_pvec_drained = false; } static inline unsigned int folio_batch_count(struct folio_batch *fbatch) > [ 1.561988] CPU: 1 PID: 7 Comm: kworker/u16:0 Not tainted 5.16.0-next-20220113 #1 > [ 1.561992] Hardware name: TOSHIBA PORTEGE R835/Portable PC, BIOS Version 4.10 01/08/2013 > [ 1.561994] Workqueue: events_unbound async_run_entry_fn > [ 1.562001] Call Trace: > [ 1.562003] <TASK> > [ 1.562004] dump_stack_lvl+0x38/0x49 > [ 1.562010] dump_stack+0x10/0x12 > [ 1.562014] ubsan_epilogue+0x9/0x45 > [ 1.562018] __ubsan_handle_load_invalid_value+0x53/0x5c > [ 1.562023] __pagevec_release+0x24/0x47 > [ 1.562028] pagevec_release+0xe/0x11 > [ 1.562031] truncate_inode_pages_range+0x1d9/0x410 > [ 1.562036] ? __filemap_fdatawait_range+0x77/0x108 > [ 1.562041] ? __invalidate_bh_lrus+0x2b/0x2b > [ 1.562045] ? put_bh+0x5/0x5 > [ 1.562050] truncate_inode_pages+0xd/0xf > [ 1.562054] kill_bdev.isra.0+0x21/0x25 > [ 1.562059] blkdev_flush_mapping+0x3d/0xd3 > [ 1.562063] ? filemap_fdatawait_range+0x17/0x19 > [ 1.562067] blkdev_put_whole+0x16/0x36 > [ 1.562071] blkdev_put+0x128/0x152 > [ 1.562075] disk_scan_partitions+0x4c/0x64 > [ 1.562081] device_add_disk+0x236/0x2d5 > [ 1.562085] sd_probe+0x308/0x3c4 > [ 1.562088] really_probe+0x17f/0x3c3 > [ 1.562092] __driver_probe_device+0xcf/0x14d > [ 1.562095] driver_probe_device+0x1e/0x8f > [ 1.562097] __device_attach_driver+0xc7/0x104 > [ 1.562100] ? driver_allows_async_probing+0x5d/0x5d > [ 1.562103] ? driver_allows_async_probing+0x5d/0x5d > [ 1.562106] bus_for_each_drv+0x8c/0xb3 > [ 1.562111] __device_attach_async_helper+0x75/0xd4 > [ 1.562114] async_run_entry_fn+0x58/0xe3 > [ 1.562118] process_one_work+0x129/0x1cc > [ 1.562121] worker_thread+0x183/0x22a > [ 1.562124] kthread+0xe0/0xe8 > [ 1.562128] ? rescuer_thread+0x24c/0x24c > [ 1.562130] ? kthread_complete_and_exit+0x1b/0x1b > [ 1.562135] ret_from_fork+0x22/0x30 > [ 1.562139] </TASK> > [ 1.562140] ================================================================================ > > > Full boot log and kernel config file are attached. > > -- > ~Randy ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for Jan 13 (UBSAN: invalid-load in ../mm/swap.c:996:11) 2022-01-13 20:47 ` Matthew Wilcox @ 2022-01-13 21:26 ` Randy Dunlap 2022-01-14 0:30 ` Matthew Wilcox 0 siblings, 1 reply; 4+ messages in thread From: Randy Dunlap @ 2022-01-13 21:26 UTC (permalink / raw) To: Matthew Wilcox Cc: Stephen Rothwell, Linux Next Mailing List, Linux Kernel Mailing List, linux-mm, Andrew Morton On 1/13/22 12:47, Matthew Wilcox wrote: > On Thu, Jan 13, 2022 at 12:12:52PM -0800, Randy Dunlap wrote: >> [ 1.561983] UBSAN: invalid-load in ../mm/swap.c:996:11 >> [ 1.561986] load of value 221 is not a valid value for type '_Bool' > > Ooh. This one's mine. Randy, does it repeat easily? This should > fix it: Yes, 100% of the time (for N = 3). Reported-by: Randy Dunlap <rdunlap@infradead.org> Tested-by: Randy Dunlap <rdunlap@infradead.org> Fixed 100% of the time (for N = 3). Thanks. > diff --git a/include/linux/pagevec.h b/include/linux/pagevec.h > index dda8d5868c81..67b1246f136b 100644 > --- a/include/linux/pagevec.h > +++ b/include/linux/pagevec.h > @@ -111,6 +111,7 @@ static_assert(offsetof(struct pagevec, pages) == > static inline void folio_batch_init(struct folio_batch *fbatch) > { > fbatch->nr = 0; > + fbatch->percpu_pvec_drained = false; > } > > static inline unsigned int folio_batch_count(struct folio_batch *fbatch) > -- ~Randy ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: linux-next: Tree for Jan 13 (UBSAN: invalid-load in ../mm/swap.c:996:11) 2022-01-13 21:26 ` Randy Dunlap @ 2022-01-14 0:30 ` Matthew Wilcox 0 siblings, 0 replies; 4+ messages in thread From: Matthew Wilcox @ 2022-01-14 0:30 UTC (permalink / raw) To: Randy Dunlap Cc: Stephen Rothwell, Linux Next Mailing List, Linux Kernel Mailing List, linux-mm, Andrew Morton On Thu, Jan 13, 2022 at 01:26:48PM -0800, Randy Dunlap wrote: > > > On 1/13/22 12:47, Matthew Wilcox wrote: > > On Thu, Jan 13, 2022 at 12:12:52PM -0800, Randy Dunlap wrote: > >> [ 1.561983] UBSAN: invalid-load in ../mm/swap.c:996:11 > >> [ 1.561986] load of value 221 is not a valid value for type '_Bool' > > > > Ooh. This one's mine. Randy, does it repeat easily? This should > > fix it: > > Yes, 100% of the time (for N = 3). > > Reported-by: Randy Dunlap <rdunlap@infradead.org> > Tested-by: Randy Dunlap <rdunlap@infradead.org> > > Fixed 100% of the time (for N = 3). Thanks. It's now at https://git.infradead.org/users/willy/pagecache.git/shortlog/refs/heads/for-next so it'll be part of the next linux-next. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-01-14 0:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <20220113152247.3f7c6c49@canb.auug.org.au>
2022-01-13 20:12 ` linux-next: Tree for Jan 13 (UBSAN: invalid-load in ../mm/swap.c:996:11) Randy Dunlap
2022-01-13 20:47 ` Matthew Wilcox
2022-01-13 21:26 ` Randy Dunlap
2022-01-14 0:30 ` Matthew Wilcox
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox