+ mm-damon-introduce-damon-based-reclamation-damon_reclaim-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm/damon: fix error return code in damon_reclaim_turn()
has been added to the -mm tree.  Its filename is
     mm-damon-introduce-damon-based-reclamation-damon_reclaim-fix.patch

This patch should soon appear at
    https://ozlabs.org/~akpm/mmots/broken-out/mm-damon-introduce-damon-based-reclamation-damon_reclaim-fix.patch
and later at
    https://ozlabs.org/~akpm/mmotm/broken-out/mm-damon-introduce-damon-based-reclamation-damon_reclaim-fix.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Subject: mm/damon: fix error return code in damon_reclaim_turn()

If damon_reclaim_new_scheme() fails, it should return error code in
damon_reclaim_turn()

Link: https://lkml.kernel.org/r/20211025124500.2758060-1-yangyingliang@xxxxxxxxxx
Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
Reported-by: Hulk Robot <hulkci@xxxxxxxxxx>
Reviewed-by: SeongJae Park <sj@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/damon/reclaim.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/mm/damon/reclaim.c~mm-damon-introduce-damon-based-reclamation-damon_reclaim-fix
+++ a/mm/damon/reclaim.c
@@ -292,8 +292,10 @@ static int damon_reclaim_turn(bool on)
 
 	/* Will be freed by 'damon_set_schemes()' below */
 	scheme = damon_reclaim_new_scheme();
-	if (!scheme)
+	if (!scheme) {
+		err = -ENOMEM;
 		goto free_region_out;
+	}
 	err = damon_set_schemes(ctx, &scheme, 1);
 	if (err)
 		goto free_scheme_out;
_

Patches currently in -mm which might be from yangyingliang@xxxxxxxxxx are

mm-damon-introduce-damon-based-reclamation-damon_reclaim-fix.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux