Skip to content

mm/damon/sysfs: fix unhandled return values

SeongJae Park damon linux-mm lkml stable 1 version Applied

Status from this message: [merged mm-hotfixes-stable] mm-damon-sysfs-schemes-handle-tried-regions-sysfs-directory-allocation-failure.patch removed from -mm tree

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 1 replyApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3mm/damon/sysfs: check error from damon_sysfs_update_target()mm/damon/sysfs.c+3 -10 repliesApplied
2/3mm/damon/sysfs-schemes: handle tried regions sysfs directory allocation failuremm/damon/sysfs-schemes.c+3 -00 repliesApplied
3/3mm/damon/sysfs-schemes: handle tried region directory allocation failuremm/damon/sysfs-schemes.c+2 -00 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/3] mm/damon/sysfs: fix unhandled return values

Some of DAMON sysfs interface code is not handling return values from some functions. As a result, confusing user input handling or NULL-dereference is possible. Check those properly.

Please note that these patches are not cleanly applicable on mm-unstable since mm-unstable has dropped the mainline-merged patches and rebased on v6.6, while some DAMON patches that these patches are depend on are merged in the mainline after v6.6. I confirmed these patches can cleanly applied on latest mainline, or mm-stable-2023-11-01-14-33.

SeongJae Park (3):
mm/damon/sysfs: check error from damon_sysfs_update_target() mm/damon/sysfs-schemes: handle tried regions sysfs directory
allocation failure
mm/damon/sysfs-schemes: handle tried region directory allocation
failure

 mm/damon/sysfs-schemes.c | 5 +++++
 mm/damon/sysfs.c         | 4 +++-
 2 files changed, 8 insertions(+), 1 deletion(-)

base-commit: 3496e8e0a1eeabb738105c09e575495fa78914bb

Signature · 1 line
2.34.1