From: Dan Carpenter <dan.carpenter@linaro.org>
To: Vishal Moola <vishal.moola@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH 2/2] mm/khugepaged: Fix a NULL vs IS_ERR() bug in collapse_pte_mapped_thp()
Date: Mon, 23 Oct 2023 17:16:33 +0300 [thread overview]
Message-ID: <0003b576-e63f-440a-ab24-739c0557dfb8@kadam.mountain> (raw)
In-Reply-To: <183a70ee-cf95-4101-b89b-e274c210229f@kadam.mountain>
On Mon, Oct 23, 2023 at 07:59:12AM +0300, Dan Carpenter wrote:
> On Fri, Oct 20, 2023 at 09:49:15AM -0700, Vishal Moola wrote:
> > On Fri, Oct 20, 2023 at 9:36 AM Andrew Morton <akpm@linux-foundation.org> wrote:
> > >
> > > On Fri, 20 Oct 2023 17:14:36 +0300 Dan Carpenter <dan.carpenter@linaro.org> wrote:
> > >
> > > > This was changed from find_lock_page() which returns NULL to
> > > > filemap_lock_folio() which returns error pointers. Update the
> > > > error checking to match.
> > > >
> > > > --- a/mm/khugepaged.c
> > > > +++ b/mm/khugepaged.c
> > > > @@ -1508,7 +1508,7 @@ int collapse_pte_mapped_thp(struct mm_struct *mm, unsigned long addr,
> > > >
> > > > folio = filemap_lock_folio(vma->vm_file->f_mapping,
> > > > linear_page_index(vma, haddr));
> > > > - if (!folio)
> > > > + if (IS_ERR(folio))
> > > > return SCAN_PAGE_NULL;
> > > >
> > > > if (folio_order(folio) != HPAGE_PMD_ORDER) {
> > >
> > > Also doesn't appear applicable to current kernels?
> >
> > Thanks for these. Both these fix patches address issues introduced by my
> > khugepaged folio conversion patchset:
> > https://lore.kernel.org/linux-mm/20231018203213.50224-1-vishal.moola@gmail.com/T/#t
> >
> > Andrew already dropped the patchset from current kernels so I can fix a
> > couple issues, v3 will include all these fixes.
>
>
> Only this one was introduced by your patchset. The other bug is older.
> I don't know why it only showed up as a new bug now. I had guessed that
> it was other changes I had made to Smatch which affected this.
Heh. Nope. I was wrong. These were both introduces as part of the
folio conversion patchset.
Thanks for taking care of this, Vishal.
regards,
dan carpenter
next prev parent reply other threads:[~2023-10-23 14:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-20 14:13 [PATCH 1/2] mm/khugepaged: Fix an uninitialized variable bug Dan Carpenter
2023-10-20 14:14 ` [PATCH 2/2] mm/khugepaged: Fix a NULL vs IS_ERR() bug in collapse_pte_mapped_thp() Dan Carpenter
2023-10-20 16:36 ` Andrew Morton
2023-10-20 16:49 ` Vishal Moola
2023-10-23 4:59 ` Dan Carpenter
2023-10-23 14:16 ` Dan Carpenter [this message]
2023-10-20 16:34 ` [PATCH 1/2] mm/khugepaged: Fix an uninitialized variable bug Andrew Morton
2023-10-23 4:57 ` Dan Carpenter
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=0003b576-e63f-440a-ab24-739c0557dfb8@kadam.mountain \
--to=dan.carpenter@linaro.org \
--cc=akpm@linux-foundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vishal.moola@gmail.com \
/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