lkml.org 
[lkml]   [2022]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: linux-next: Tree for Jan 13 (UBSAN: invalid-load in ../mm/swap.c:996:11)
From


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

\
 
 \ /
  Last update: 2022-01-13 22:28    [W:0.051 / U:0.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site