linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: "Yin, Fengwei" <nh26223@qq.com>
To: Matthew Wilcox <willy@infradead.org>
Cc: syzbot <syzbot+55cc72f8cc3a549119df@syzkaller.appspotmail.com>,
	akpm@linux-foundation.org, fengwei.yin@intel.com,
	linux-kernel@vger.kernel.org, linux-mm@kvack.org,
	syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] [mm?] BUG: Bad page map (7)
Date: Sun, 10 Sep 2023 11:40:13 +0800	[thread overview]
Message-ID: <tencent_EE68E90E38E77951204487CEC5F23F26C608@qq.com> (raw)
In-Reply-To: <ZP0xyFnnghM42GcW@casper.infradead.org>

Hi Matthew,

On Sun, Sep 10, 2023 at 04:02:32AM +0100, Matthew Wilcox wrote:
> On Sat, Sep 09, 2023 at 10:12:48AM -0700, syzbot wrote:
> > commit 617c28ecab22d98a3809370eb6cb50fa24b7bfe1
> > Author: Yin Fengwei <fengwei.yin@intel.com>
> > Date:   Wed Aug 2 15:14:05 2023 +0000
> > 
> >     filemap: batch PTE mappings
> 
> Hmm ... I don't know if this is the bug, but ...
This is Fengwei. Sorry for replying with my private email. I can't access
my compony email now.
Yes. This is a bug. But I think it just impact the performance.

I will look at this regression. Thanks and sorry for the trouble.


Regards
Yin, Fengwei

> 
> #syz test
> 
> diff --git a/mm/filemap.c b/mm/filemap.c
> index 582f5317ff71..580d0b2b1a7c 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -3506,7 +3506,7 @@ static vm_fault_t filemap_map_folio_range(struct vm_fault *vmf,
>  		if (count) {
>  			set_pte_range(vmf, folio, page, count, addr);
>  			folio_ref_add(folio, count);
> -			if (in_range(vmf->address, addr, count))
> +			if (in_range(vmf->address, addr, count * PAGE_SIZE))
>  				ret = VM_FAULT_NOPAGE;
>  		}
>  
> @@ -3520,7 +3520,7 @@ static vm_fault_t filemap_map_folio_range(struct vm_fault *vmf,
>  	if (count) {
>  		set_pte_range(vmf, folio, page, count, addr);
>  		folio_ref_add(folio, count);
> -		if (in_range(vmf->address, addr, count))
> +		if (in_range(vmf->address, addr, count * PAGE_SIZE))
>  			ret = VM_FAULT_NOPAGE;
>  	}
>  
> 
> 



  parent reply	other threads:[~2023-09-10  3:49 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-09 17:12 syzbot
2023-09-10  3:02 ` Matthew Wilcox
2023-09-10  3:29   ` syzbot
2023-09-10  3:40   ` Yin, Fengwei [this message]
2023-09-11  7:24   ` Yin Fengwei
2023-09-11  7:32     ` Yin Fengwei
2023-09-11  7:12 ` Yin Fengwei
2023-09-11  7:48   ` syzbot
2023-09-11 13:26   ` Matthew Wilcox
2023-09-11 14:00     ` syzbot
2023-09-11 15:34     ` Dave Hansen
2023-09-11 16:44       ` Matthew Wilcox
2023-09-11 16:55         ` Dave Hansen
2023-09-11 19:12           ` Matthew Wilcox
2023-09-11 20:22             ` Dave Hansen
2023-09-12  4:59               ` Matthew Wilcox
2023-09-12 16:07                 ` Dave Hansen
2023-09-12 18:01                 ` Dave Hansen
2023-09-14  7:33                 ` Yin Fengwei
2023-09-14  8:37                   ` Yin Fengwei
2023-09-19  1:11                   ` Yin Fengwei
2023-09-19 16:11                     ` Dave Hansen
2023-09-20  1:29                       ` Yin Fengwei
2023-09-20  1:47                         ` Matthew Wilcox

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=tencent_EE68E90E38E77951204487CEC5F23F26C608@qq.com \
    --to=nh26223@qq.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengwei.yin@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=syzbot+55cc72f8cc3a549119df@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=willy@infradead.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