[lkml]   [2022]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3 1/3] mm/swapfile: unuse_pte can map random data if swap read fails
On 2022/5/13 8:42, Andrew Morton wrote:
> On Tue, 10 May 2022 14:58:05 +0800 Miaohe Lin <> wrote:
>>>> Signed-off-by: Miaohe Lin <>
>>>> Acked-by: David Hildenbrand <>
>>> When I reproduced the issue (generated read error with dm-dust), I saw
>>> infinite loop in the while loop in shmem_unuse_inode() (and this happens
>>> even with this patch). I confirmed that shmem_swapin_page() returns -EIO,
>>> but shmem_unuse_swap_entries() does not return the error to the callers,
>>> so the while loop in shmem_unuse_inode() seems not break.
>> Many thanks for your report! I didn't test the shmem case because I saw -EIO
>> is returned. So I just focus on the normal page case. Sorry about it. :(
>>> So maybe you need more code around shmem_unuse_inode() to handle the error?
>> I will try to reproduce it and come up a fixup patch asap! And if you like, you
>> can kindly solve this issue too. ;)
> Seems that this patch didn't cause the infinite loop, so as far as I
> can tell it is good to be merged up. But the problem it solves isn't
> urgent and fixing that infinite loop might impact this change so I
> think I'll drop this version.

I will update and resend the corresponding patch series when I fix this infinite loop.


> .

 \ /
  Last update: 2022-05-13 05:14    [W:0.102 / U:0.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site