Commit 8398ee5f authored by SeongJae Park's avatar SeongJae Park Committed by Treehugger Robot
Browse files

UPSTREAM: mm/damon/sysfs-schemes: handle tried regions sysfs directory allocation failure

DAMOS tried regions sysfs directory allocation function
(damon_sysfs_scheme_regions_alloc()) is not handling the memory allocation
failure.  In the case, the code will dereference NULL pointer.  Handle the
failure to avoid such invalid access.

Link: https://lkml.kernel.org/r/20231106233408.51159-3-sj@kernel.org


Fixes: 9277d036 ("mm/damon/sysfs-schemes: implement scheme region directory")
Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Cc: <stable@vger.kernel.org>	[6.2+]
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>

(cherry picked from commit 84055688)

Bug: 300502883
Bug: 319753692
Change-Id: I86ecb2f3cf1604199b5567576b1fa583914f7f36
Signed-off-by: default avatarcui yangpei <cuiyangpei@xiaomi.com>
parent bed931fd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment