summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vc4/vc4_perfmon.c
diff options
context:
space:
mode:
authorWaiman Long <longman@redhat.com>2022-06-15 01:03:59 +0300
committerakpm <akpm@linux-foundation.org>2022-06-17 05:48:32 +0300
commit6edda04ccc7cfb281d139e352dbd5dd933bd2751 (patch)
treeb2636bc590cb869ec6ad0ff59daabf2693b8bdc6 /drivers/gpu/drm/vc4/vc4_perfmon.c
parent64977918c2381aaadd544535708294213cc964f6 (diff)
downloadlinux-6edda04ccc7cfb281d139e352dbd5dd933bd2751.tar.xz
mm/kmemleak: prevent soft lockup in first object iteration loop of kmemleak_scan()
The first RCU-based object iteration loop has to modify the object count. So we cannot skip taking the object lock. One way to avoid soft lockup is to insert occasional cond_resched() call into the loop. This cannot be done while holding the RCU read lock which is to protect objects from being freed. However, taking a reference to the object will prevent it from being freed. We can then do a cond_resched() call after every 64k objects safely. Link: https://lkml.kernel.org/r/20220614220359.59282-4-longman@redhat.com Signed-off-by: Waiman Long <longman@redhat.com> Reviewed-by: Catalin Marinas <catalin.marinas@arm.com> Cc: Muchun Song <songmuchun@bytedance.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_perfmon.c')
0 files changed, 0 insertions, 0 deletions