Matthew Wilcox (Oracle) 69a37a8ba1 mm/huge_memory: Fix xarray node memory leak
If xas_split_alloc() fails to allocate the necessary nodes to complete the
xarray entry split, it sets the xa_state to -ENOMEM, which xas_nomem()
then interprets as "Please allocate more memory", not as "Please free
any unnecessary memory" (which was the intended outcome).  It's confusing
to use xas_nomem() to free memory in this context, so call xas_destroy()
instead.

Reported-by: syzbot+9e27a75a8c24f3fe75c1@syzkaller.appspotmail.com
Fixes: 6b24ca4a1a8d ("mm: Use multi-index entries in the page cache")
Cc: stable@vger.kernel.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
2022-06-09 16:24:25 -04:00
..
2022-05-19 14:08:55 -07:00
2021-05-05 11:27:24 -07:00
2022-03-24 19:06:45 -07:00
2022-06-09 16:24:25 -04:00
2022-05-13 07:20:09 -07:00
2022-02-14 19:51:47 +01:00
2022-05-25 10:47:48 -07:00
2022-03-23 18:03:08 -07:00
2022-05-19 14:08:53 -07:00
2022-05-13 07:20:09 -07:00
2022-05-28 11:27:17 -07:00
2022-03-22 17:03:12 -07:00
2022-05-26 16:57:20 -07:00
2021-05-07 00:26:35 -07:00
2022-05-09 23:12:53 -04:00
2022-05-25 10:24:04 -07:00
2022-05-25 10:24:04 -07:00
2022-03-22 18:26:56 -07:00
2022-05-28 11:27:17 -07:00
2022-06-04 14:04:27 -07:00
2022-01-15 16:30:31 +02:00
2022-05-19 14:08:53 -07:00