Re: + mm-migrate-high-order-folios-in-swap-cache-correctly.patch added to mm-hotfixes-unstable branch

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

 



Hi Andrew,

On 12/15/2023 3:41 AM, Andrew Morton wrote:
> Large folios occupy N consecutive entries in the swap cache instead of
> using multi-index entries like the page cache.  However, if a large folio
> is re-added to the LRU list, it can be migrated.  The migration code was
> not aware of the difference between the swap cache and the page cache and
> assumed that a single xas_store() would be sufficient.
> 
> This leaves potentially many stale pointers to the now-migrated folio in
> the swap cache, which can lead to almost arbitrary data corruption in the
> future.  This can also manifest as infinite loops with the RCU read lock
> held.
> 
> [willy@xxxxxxxxxxxxx: modifications to the changelog & tweaked the fix]
> Fixes: 3417013e0d183be ("mm/migrate: Add folio_migrate_mapping()")
> Link: https://lkml.kernel.org/r/20231214045841.961776-1-willy@xxxxxxxxxxxxx
> Signed-off-by: Charan Teja Kalla <quic_charante@xxxxxxxxxxx>
> Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
> Reported-by: Charan Teja Kalla <quic_charante@xxxxxxxxxxx>
>   Closes: https://lkml.kernel.org/r/1700569840-17327-1-git-send-email-quic_charante@xxxxxxxxxxx
> Cc: David Hildenbrand <david@xxxxxxxxxx>
> Cc: Johannes Weiner <hannes@xxxxxxxxxxx>
> Cc: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> Cc: Naoya Horiguchi <n-horiguchi@xxxxxxxxxxxxx>
> Cc: Shakeel Butt <shakeelb@xxxxxxxxxx>
> Cc: <stable@xxxxxxxxxxxxxxx>
> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>

Errors were reported from checkpatch.pl.

1) Seems we have used 15chars of sha1.
2) space before Closes:

Summary:

WARNING:BAD_FIXES_TAG: Please use correct Fixes: style 'Fixes: <12 chars
of sha1> ("<title line>")' - ie: 'Fixes: 3417013e0d18 ("mm/migrate: Add
folio_migrate_mapping()")'
#21:
--
WARNING:BAD_REPORTED_BY_LINK: Reported-by: should be immediately
followed by Closes: with a URL to the report
#26:




[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