diff options
author | Waiman Long <longman@redhat.com> | 2022-10-20 13:56:19 -0400 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2022-10-28 13:37:22 -0700 |
commit | 984a608377cb623351b8a3670b285f32ebeb2d32 (patch) | |
tree | 83d57ad3c8479ecb6048afb0472cd32cfadb7a21 /mm/backing-dev.c | |
parent | e11c4e088be4c39d17f304fcf331670891905f42 (diff) |
mm/kmemleak: prevent soft lockup in kmemleak_scan()'s object iteration loops
Commit 6edda04ccc7c ("mm/kmemleak: prevent soft lockup in first object
iteration loop of kmemleak_scan()") adds cond_resched() in the first
object iteration loop of kmemleak_scan(). However, it turns that the 2nd
objection iteration loop can still cause soft lockup to happen in some
cases. So add a cond_resched() call in the 2nd and 3rd loops as well to
prevent that and for completeness.
Link: https://lkml.kernel.org/r/20221020175619.366317-1-longman@redhat.com
Fixes: 6edda04ccc7c ("mm/kmemleak: prevent soft lockup in first object iteration loop of kmemleak_scan()")
Signed-off-by: Waiman Long <longman@redhat.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Muchun Song <songmuchun@bytedance.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/backing-dev.c')
0 files changed, 0 insertions, 0 deletions