Re: [PATCH] dirtylimit: Fix overflow when computing MB

2022-07-29 Thread Peter Maydell
On Fri, 29 Jul 2022 at 16:17, wrote: > > From: Hyman Huang(黄勇) > > Coverity points out a overflow problem when computing MB, > dirty_ring_size and TARGET_PAGE_SIZE are both 32 bits, > multiplication will be done as a 32-bit operation, which > could overflow. Simplify the formula. > > Meanwhile, f

[PATCH] dirtylimit: Fix overflow when computing MB

2022-07-29 Thread huangy81
From: Hyman Huang(黄勇) Coverity points out a overflow problem when computing MB, dirty_ring_size and TARGET_PAGE_SIZE are both 32 bits, multiplication will be done as a 32-bit operation, which could overflow. Simplify the formula. Meanwhile, fix spelling mistake of variable name. Reported-by: Pe