linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH Fix 0/2] Fix out-of-bounds maple tree isue
@ 2022-07-22 16:06 Liam Howlett
  2022-07-22 16:06 ` [PATCH Fix 2/2] kernel/fork: Detect mas_store() failure in dup_mmap() Liam Howlett
  2022-07-22 16:06 ` [PATCH Fix 1/2] maple_tree: Fix mas_expected_entries() off by one Liam Howlett
  0 siblings, 2 replies; 3+ messages in thread
From: Liam Howlett @ 2022-07-22 16:06 UTC (permalink / raw)
  To: maple-tree@lists.infradead.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org, Andrew Morton, Yu Zhao
  Cc: Hugh Dickins

The out of bounds maple tree issue was actually a maple tree error being
treated as a node.  This was caused by the requested allocation of more
nodes than was available while forking, but there was no memory
available.  This series adds one node to the calculated
mas_expected_entries() to ensure there is enough nodes, adds a flag to
WARN_ON() if a request for nodes is hit with zero nodes available during
a preallocated operation, and also adds the necessary check in the fork
operation to fail.

Liam R. Howlett (2):
  maple_tree: Fix mas_expected_entries() off by one
  kernel/fork: Detect mas_store() failure in dup_mmap()

 include/linux/maple_tree.h |  1 +
 kernel/fork.c              |  5 +++++
 lib/maple_tree.c           | 26 +++++++++++++++++++++-----
 3 files changed, 27 insertions(+), 5 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-22 16:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-07-22 16:06 [PATCH Fix 0/2] Fix out-of-bounds maple tree isue Liam Howlett
2022-07-22 16:06 ` [PATCH Fix 2/2] kernel/fork: Detect mas_store() failure in dup_mmap() Liam Howlett
2022-07-22 16:06 ` [PATCH Fix 1/2] maple_tree: Fix mas_expected_entries() off by one Liam Howlett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).