The patch titled
Subject: mm/damon/paddr: fix missing folio_put()
has been added to the -mm mm-unstable branch. Its filename is
mm-damon-paddr-fix-missing-folio_put.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patche…
This patch will later appear in the mm-unstable branch at
git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
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 via the mm-everything
branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
and is updated there every 2-3 working days
------------------------------------------------------
From: "andrew.yang" <andrew.yang(a)mediatek.com>
Subject: mm/damon/paddr: fix missing folio_put()
Date: Wed, 22 Feb 2023 14:42:20 +0800
damon_get_folio() would always increase folio _refcount and
folio_isolate_lru() would increase folio _refcount if the folio's lru flag
is set.
If an unevictable folio isolated successfully, there will be two more
_refcount. The one from folio_isolate_lru() will be decreased in
folio_puback_lru(), but the other one from damon_get_folio() will be left
behind. This causes a pin page.
Whatever the case, the _refcount from damon_get_folio() should be
decreased.
Link: https://lkml.kernel.org/r/20230222064223.6735-1-andrew.yang@mediatek.com
Fixes: 57223ac29584 ("mm/damon/paddr: support the pageout scheme")
Signed-off-by: andrew.yang <andrew.yang(a)mediatek.com>
Reviewed-by: SeongJae Park <sj(a)kernel.org>
Cc: <stable(a)vger.kernel.org> [5.16.x]
Signed-off-by: Andrew Morton <akpm(a)linux-foundation.org>
---
mm/damon/paddr.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
--- a/mm/damon/paddr.c~mm-damon-paddr-fix-missing-folio_put
+++ a/mm/damon/paddr.c
@@ -250,12 +250,11 @@ static unsigned long damon_pa_pageout(st
folio_put(folio);
continue;
}
- if (folio_test_unevictable(folio)) {
+ if (folio_test_unevictable(folio))
folio_putback_lru(folio);
- } else {
+ else
list_add(&folio->lru, &folio_list);
- folio_put(folio);
- }
+ folio_put(folio);
}
applied = reclaim_pages(&folio_list);
cond_resched();
_
Patches currently in -mm which might be from andrew.yang(a)mediatek.com are
mm-damon-paddr-fix-missing-folio_put.patch
Hi,
for information,
for the batocera.linux distribution,
we have disabled this commit.
https://github.com/torvalds/linux/commit/9a8cc8cabc1e351614fd7f9e774757a514…
while some people with some steam deck models cannot boot anymore
(issue about gpu)
You can find the crash in the attached dmesg file.
[ 8.862600] Call Trace:
[ 8.862604] <TASK>
[ 8.862608] amdgpu_fence_driver_sw_fini+0xc4/0xd0 [amdgpu]
[ 8.863040] amdgpu_device_fini_sw+0x27/0x3c0 [amdgpu]
[ 8.863334] amdgpu_driver_release_kms+0x12/0x30 [amdgpu]
[ 8.863616] devm_drm_dev_init_release+0x42/0x70
[ 8.863625] release_nodes+0x3d/0xb0
[ 8.863631] devres_release_all+0x88/0xc0
[ 8.863636] device_unbind_cleanup+0xe/0x70
Nicolas Adenis-Lamarre
>> Fixes: 0c2c02b ("drm/amdgpu/vcn: add firmware support for dimgrey_cavefish")
>> Signed-off-by: Leo Liu <leo.liu(a)amd.com>
>> Reviewed-by: James Zhu <James.Zhu(a)amd.com>
>> Signed-off-by: Alex Deucher <alexander.deucher(a)amd.com>
>> Cc: stable(a)vger.kernel.org