Re: [PATCH] mm/kmemleak: Move up cond_resched() call in page scanning loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 25, 2023 at 12:49:47PM -0400, Waiman Long wrote:
> Commit bde5f6bc68db ("kmemleak: add scheduling point to kmemleak_scan()")
> added a cond_resched() call to the struct page scanning loop to prevent
> soft lockup from happening. However, soft lockup can still happen in
> that loop in some corner cases when the pages that satisfy the "!(pfn &
> 63)" check are skipped for some reasons.
> 
> Fix this corner case by moving up the cond_resched() check so that it
> will be called every 64 pages unconditionally.
> 
> Fixes: bde5f6bc68db ("kmemleak: add scheduling point to kmemleak_scan()")
> Signed-off-by: Waiman Long <longman@xxxxxxxxxx>

Acked-by: Catalin Marinas <catalin.marinas@xxxxxxx>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux