* + mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch added to mm-hotfixes-unstable branch
@ 2023-03-04 19:52 Andrew Morton
2023-03-06 7:01 ` Kefeng Wang
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2023-03-04 19:52 UTC (permalink / raw)
To: mm-commits, willy, wangkefeng.wang, vishal.moola, stable, sj, akpm
The patch titled
Subject: mm/damon/paddr: fix folio_nr_pages() after folio_put() in damon_pa_mark_accessed_or_deactivate()
has been added to the -mm mm-hotfixes-unstable branch. Its filename is
mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch
This patch will shortly appear at
https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch
This patch will later appear in the mm-hotfixes-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: SeongJae Park <sj@kernel.org>
Subject: mm/damon/paddr: fix folio_nr_pages() after folio_put() in damon_pa_mark_accessed_or_deactivate()
Date: Sat, 4 Mar 2023 19:39:49 +0000
damon_pa_mark_accessed_or_deactivate() is accessing a folio via
folio_nr_pages() after folio_put() for the folio has invoked. Fix it.
Link: https://lkml.kernel.org/r/20230304193949.296391-3-sj@kernel.org
Fixes: f70da5ee8fe1 ("mm/damon: convert damon_pa_mark_accessed_or_deactivate() to use folios")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
Cc: <stable@vger.kernel.org> [6.2.x]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
--- a/mm/damon/paddr.c~mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate
+++ a/mm/damon/paddr.c
@@ -280,8 +280,8 @@ static inline unsigned long damon_pa_mar
folio_mark_accessed(folio);
else
folio_deactivate(folio);
- folio_put(folio);
applied += folio_nr_pages(folio);
+ folio_put(folio);
}
return applied * PAGE_SIZE;
}
_
Patches currently in -mm which might be from sj@kernel.org are
mm-damon-paddr-fix-folio_size-call-after-folio_put-in-damon_pa_young.patch
mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: + mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch added to mm-hotfixes-unstable branch
2023-03-04 19:52 + mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch added to mm-hotfixes-unstable branch Andrew Morton
@ 2023-03-06 7:01 ` Kefeng Wang
2023-03-06 21:13 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Kefeng Wang @ 2023-03-06 7:01 UTC (permalink / raw)
To: Andrew Morton, mm-commits, willy, vishal.moola, stable, sj
On 2023/3/5 3:52, Andrew Morton wrote:
>
> The patch titled
> Subject: mm/damon/paddr: fix folio_nr_pages() after folio_put() in damon_pa_mark_accessed_or_deactivate()
> has been added to the -mm mm-hotfixes-unstable branch. Its filename is
> mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch
>
> This patch will shortly appear at
> https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch
>
> This patch will later appear in the mm-hotfixes-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: SeongJae Park <sj@kernel.org>
> Subject: mm/damon/paddr: fix folio_nr_pages() after folio_put() in damon_pa_mark_accessed_or_deactivate()
> Date: Sat, 4 Mar 2023 19:39:49 +0000
>
> damon_pa_mark_accessed_or_deactivate() is accessing a folio via
> folio_nr_pages() after folio_put() for the folio has invoked. Fix it.
>
> Link: https://lkml.kernel.org/r/20230304193949.296391-3-sj@kernel.org
> Fixes: f70da5ee8fe1 ("mm/damon: convert damon_pa_mark_accessed_or_deactivate() to use folios")
This is accepted in v6.3-rc1,
> Signed-off-by: SeongJae Park <sj@kernel.org>
> Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
> Cc: Matthew Wilcox <willy@infradead.org>
> Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
> Cc: <stable@vger.kernel.org> [6.2.x]
so no need to stable ?
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
> ---
>
>
> --- a/mm/damon/paddr.c~mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate
> +++ a/mm/damon/paddr.c
> @@ -280,8 +280,8 @@ static inline unsigned long damon_pa_mar
> folio_mark_accessed(folio);
> else
> folio_deactivate(folio);
> - folio_put(folio);
> applied += folio_nr_pages(folio);
> + folio_put(folio);
> }
> return applied * PAGE_SIZE;
> }
> _
>
> Patches currently in -mm which might be from sj@kernel.org are
>
> mm-damon-paddr-fix-folio_size-call-after-folio_put-in-damon_pa_young.patch
> mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: + mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch added to mm-hotfixes-unstable branch
2023-03-06 7:01 ` Kefeng Wang
@ 2023-03-06 21:13 ` Andrew Morton
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Morton @ 2023-03-06 21:13 UTC (permalink / raw)
To: Kefeng Wang; +Cc: mm-commits, willy, vishal.moola, stable, sj
On Mon, 6 Mar 2023 15:01:39 +0800 Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
> > Link: https://lkml.kernel.org/r/20230304193949.296391-3-sj@kernel.org
> > Fixes: f70da5ee8fe1 ("mm/damon: convert damon_pa_mark_accessed_or_deactivate() to use folios")
>
> This is accepted in v6.3-rc1,
>
> > Signed-off-by: SeongJae Park <sj@kernel.org>
> > Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
> > Cc: Matthew Wilcox <willy@infradead.org>
> > Cc: Vishal Moola (Oracle) <vishal.moola@gmail.com>
> > Cc: <stable@vger.kernel.org> [6.2.x]
> so no need to stable ?
Yup, I'll remove that, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-06 21:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-04 19:52 + mm-damon-paddr-fix-folio_nr_pages-after-folio_put-in-damon_pa_mark_accessed_or_deactivate.patch added to mm-hotfixes-unstable branch Andrew Morton
2023-03-06 7:01 ` Kefeng Wang
2023-03-06 21:13 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).