[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220512174247.c4e178334879fb6b10134c2c@linux-foundation.org>
Date: Thu, 12 May 2022 17:42:47 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Miaohe Lin <linmiaohe@...wei.com>
Cc: HORIGUCHI NAOYA (堀口 直也) <naoya.horiguchi@....com>,
"willy@...radead.org" <willy@...radead.org>,
"vbabka@...e.cz" <vbabka@...e.cz>,
"dhowells@...hat.com" <dhowells@...hat.com>,
"neilb@...e.de" <neilb@...e.de>,
"david@...hat.com" <david@...hat.com>,
"apopple@...dia.com" <apopple@...dia.com>,
"surenb@...gle.com" <surenb@...gle.com>,
"minchan@...nel.org" <minchan@...nel.org>,
"peterx@...hat.com" <peterx@...hat.com>,
"sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/3] mm/swapfile: unuse_pte can map random data if
swap read fails
On Tue, 10 May 2022 14:58:05 +0800 Miaohe Lin <linmiaohe@...wei.com> wrote:
> >> Signed-off-by: Miaohe Lin <linmiaohe@...wei.com>
> >> Acked-by: David Hildenbrand <david@...hat.com>
> >
> > 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.
Powered by blists - more mailing lists