linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Ivan Babrou <ivan@cloudflare.com>
To: Hillf Danton <hdanton@sina.com>
Cc: Minchan Kim <minchan@kernel.org>, Linux MM <linux-mm@kvack.org>,
	 linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: zram corruption due to uninitialized do_swap_page fault
Date: Mon, 14 Mar 2022 21:54:06 -0700	[thread overview]
Message-ID: <CABWYdi1zbc5pN28AKA31cGkD---7ODAOKQ7Tp=d=jhYScHDNFw@mail.gmail.com> (raw)
In-Reply-To: <20220315043422.1846-1-hdanton@sina.com>

On Mon, Mar 14, 2022 at 9:34 PM Hillf Danton <hdanton@sina.com> wrote:
> Can you test if the race comes from the diff below wrt zram_free_page?
>
> Hillf
>
> --- upstream/mm/page_io.c
> +++ b/mm/page_io.c
> @@ -392,11 +392,6 @@ int swap_readpage(struct page *page, boo
>         if (sis->flags & SWP_SYNCHRONOUS_IO) {
>                 ret = bdev_read_page(sis->bdev, swap_page_sector(page), page);
>                 if (!ret) {
> -                       if (trylock_page(page)) {
> -                               swap_slot_free_notify(page);
> -                               unlock_page(page);
> -                       }
> -
>                         count_vm_event(PSWPIN);
>                         goto out;
>                 }

I tried it without the previous patch (the one commenting out
swap_slot_free_notify in end_swap_bio_read) and it still fails.


  reply	other threads:[~2022-03-15  4:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-11 19:51 Ivan Babrou
2022-03-11 22:30 ` Yu Zhao
2022-03-11 22:36   ` Ivan Babrou
2022-03-14 22:40 ` Minchan Kim
2022-03-15  0:24   ` Ivan Babrou
2022-03-15  4:34     ` Hillf Danton
2022-03-15  4:54       ` Ivan Babrou [this message]
2022-03-15  4:18 ` Ivan Babrou
2022-03-15  6:57   ` Minchan Kim
2022-03-15  8:30     ` David Hildenbrand
2022-03-15 22:09     ` Minchan Kim
2022-03-16 18:26       ` Ivan Babrou
2022-03-18 16:30         ` Ivan Babrou
2022-03-18 17:32           ` Minchan Kim
2022-03-18 18:54             ` Minchan Kim
2022-03-25  2:10               ` Ivan Babrou
2022-03-25  8:33                 ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CABWYdi1zbc5pN28AKA31cGkD---7ODAOKQ7Tp=d=jhYScHDNFw@mail.gmail.com' \
    --to=ivan@cloudflare.com \
    --cc=hdanton@sina.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox