All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Hubbard <jhubbard@nvidia.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	kernel test robot <oliver.sang@intel.com>
Cc: Christoph Hellwig <hch@lst.de>,
	Matthew Wilcox <willy@infradead.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	LKML <linux-kernel@vger.kernel.org>,
	lkp@lists.01.org, kernel test robot <lkp@intel.com>
Subject: Re: [mm/gup] 9857a17f20: kernel_BUG_at_include/linux/pagemap.h
Date: Tue, 7 Sep 2021 12:10:51 -0700	[thread overview]
Message-ID: <513d8734-7156-f3b6-b149-4d2cd83b5742@nvidia.com> (raw)
In-Reply-To: <CAHk-=wh=4TJ3yN0+qpzDPJcH3KFkVsHcHO1FJjKHjaPTx8UCdQ@mail.gmail.com>

On 9/7/21 11:14 AM, Linus Torvalds wrote:
> On Tue, Sep 7, 2021 at 8:20 AM kernel test robot <oliver.sang@intel.com> wrote:
>>
>> FYI, we noticed the following commit (built with clang-14):
>>
>> commit: 9857a17f206f ("mm/gup: remove try_get_page(), call try_get_compound_head() directly")
>> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>>
>> [  143.908513][ T3260] kernel BUG at include/linux/pagemap.h:223!
> 
> Ahh, well, yes.
> 
> That commit is clearly buggy, in that the try_get_compound_head() code
> really doesn't work at all for us.
> 
> __page_cache_add_speculative() is not at all the same as
> try_get_page(), and I should have caught on to this as I applied it. I
> just read the explanation, and it sounded believable, but it was
> entirely wrong.
> 
> try_get_page() is literally about that "page ref overflow" case, but
> try_get_compound_head() uses page_cache_add_speculative() which has
> different logic and has those extra "this only works in RCU context"
> logic.
> 
> So that commit was completely bogus, and the "lack of maintenance" was
> not lack of maintenance at all, it was all about entirely different
> semantics.
> 
> Reverted.
> 
>                   Linus

Apologies for the bug! There is a lesson in here, somewhere...


thanks,
-- 
John Hubbard
NVIDIA

WARNING: multiple messages have this Message-ID (diff)
From: John Hubbard <jhubbard@nvidia.com>
To: lkp@lists.01.org
Subject: Re: [mm/gup] 9857a17f20: kernel_BUG_at_include/linux/pagemap.h
Date: Tue, 07 Sep 2021 12:10:51 -0700	[thread overview]
Message-ID: <513d8734-7156-f3b6-b149-4d2cd83b5742@nvidia.com> (raw)
In-Reply-To: <CAHk-=wh=4TJ3yN0+qpzDPJcH3KFkVsHcHO1FJjKHjaPTx8UCdQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1367 bytes --]

On 9/7/21 11:14 AM, Linus Torvalds wrote:
> On Tue, Sep 7, 2021 at 8:20 AM kernel test robot <oliver.sang@intel.com> wrote:
>>
>> FYI, we noticed the following commit (built with clang-14):
>>
>> commit: 9857a17f206f ("mm/gup: remove try_get_page(), call try_get_compound_head() directly")
>> caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
>>
>> [  143.908513][ T3260] kernel BUG at include/linux/pagemap.h:223!
> 
> Ahh, well, yes.
> 
> That commit is clearly buggy, in that the try_get_compound_head() code
> really doesn't work at all for us.
> 
> __page_cache_add_speculative() is not at all the same as
> try_get_page(), and I should have caught on to this as I applied it. I
> just read the explanation, and it sounded believable, but it was
> entirely wrong.
> 
> try_get_page() is literally about that "page ref overflow" case, but
> try_get_compound_head() uses page_cache_add_speculative() which has
> different logic and has those extra "this only works in RCU context"
> logic.
> 
> So that commit was completely bogus, and the "lack of maintenance" was
> not lack of maintenance at all, it was all about entirely different
> semantics.
> 
> Reverted.
> 
>                   Linus

Apologies for the bug! There is a lesson in here, somewhere...


thanks,
-- 
John Hubbard
NVIDIA

  reply	other threads:[~2021-09-07 19:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-07 15:37 [mm/gup] 9857a17f20: kernel_BUG_at_include/linux/pagemap.h kernel test robot
2021-09-07 15:37 ` kernel test robot
2021-09-07 18:14 ` Linus Torvalds
2021-09-07 18:14   ` Linus Torvalds
2021-09-07 19:10   ` John Hubbard [this message]
2021-09-07 19:10     ` John Hubbard

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=513d8734-7156-f3b6-b149-4d2cd83b5742@nvidia.com \
    --to=jhubbard@nvidia.com \
    --cc=akpm@linux-foundation.org \
    --cc=borntraeger@de.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=hch@lst.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=lkp@lists.01.org \
    --cc=oliver.sang@intel.com \
    --cc=torvalds@linux-foundation.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.