You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mm: prevent derefencing NULL ptr in pfn_section_valid()
[ Upstream commit 82f0b6f ]
Commit 5ec8e8e ("mm/sparsemem: fix race in accessing
memory_section->usage") changed pfn_section_valid() to add a READ_ONCE()
call around "ms->usage" to fix a race with section_deactivate() where
ms->usage can be cleared. The READ_ONCE() call, by itself, is not enough
to prevent NULL pointer dereference. We need to check its value before
dereferencing it.
Link: https://lkml.kernel.org/r/[email protected]
Fixes: 5ec8e8e ("mm/sparsemem: fix race in accessing memory_section->usage")
Signed-off-by: Waiman Long <[email protected]>
Cc: Charan Teja Kalla <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>
(cherry picked from commit bc17f2377818dca643a74499c3f5333500c90503)
FOF: 0924
Signed-off-by: Vijayendra Suman <[email protected]>
0 commit comments