Re: summarize all information again at bottom//reply: reply: [PATCH] mm: fix a race scenario in folio_isolate_lru

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

 



On Tue, Mar 19, 2024 at 08:48:42AM +0800, Zhaoyang Huang wrote:
> BTW, damon_pa_pageout is a potential risk over this race

No it isn't.

               struct folio *folio = damon_get_folio(PHYS_PFN(addr));

                if (!folio)
                        continue;

                if (damos_pa_filter_out(s, folio))
                        goto put_folio;

                folio_clear_referenced(folio);
                folio_test_clear_young(folio);
                if (!folio_isolate_lru(folio))
                        goto put_folio;
                if (folio_test_unevictable(folio))
                        folio_putback_lru(folio);
                else
                        list_add(&folio->lru, &folio_list);
put_folio:
                folio_put(folio);

It clearly has a folio reference when it calls folio_isolate_lru().




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux