From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Qingfang Deng <dqfext@gmail.com>
Cc: David Hildenbrand <david@redhat.com>,
Sasha Levin <sashal@kernel.org>,
stable@vger.kernel.org, linux-mm@kvack.org,
Zi Yan <ziy@nvidia.com>, Johannes Weiner <hannes@cmpxchg.org>,
Brendan Jackman <jackmanb@google.com>,
Michal Hocko <mhocko@suse.com>,
Suren Baghdasaryan <surenb@google.com>,
Vlastimil Babka <vbabka@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
Liu Xiang <liu.xiang@zlingsmart.com>
Subject: Re: Please apply d2155fe54ddb to 5.10 and 5.4
Date: Tue, 22 Apr 2025 14:41:07 +0200 [thread overview]
Message-ID: <2025042256-unnerve-doorway-7cb7@gregkh> (raw)
In-Reply-To: <CALW65jaLXR3rjcTZN-uojuym6uCT8pMRnTHoY_OqCWJ+Yq0ggw@mail.gmail.com>
On Tue, Apr 22, 2025 at 05:58:26PM +0800, Qingfang Deng wrote:
> Hi David,
>
>
> On Tue, Apr 22, 2025 at 3:04 PM David Hildenbrand <david@redhat.com> wrote:
> > > Let me post it again:
> > >
> > > Please consider applying d2155fe54ddb ("mm: compaction: remove
> > > duplicate !list_empty(&sublist) check") to 5.10 and 5.4, as it
> > > resolves a -Wdangling-pointer warning in recent GCC versions:
> > >
> > > In function '__list_cut_position',
> > > inlined from 'list_cut_position' at ./include/linux/list.h:400:3,
> > > inlined from 'move_freelist_tail' at mm/compaction.c:1241:3:
> > > ./include/linux/list.h:370:21: warning: storing the address of local
> > > variable 'sublist' in '*&freepage_6(D)->D.15621.D.15566.lru.next'
> > > [-Wdangling-pointer=]
> >
> > The commit looks harmless. But I don't see how it could fix any warning?
> >
> > I mean, we replace two !list_empty() checks by a single one ... and the
> > warning is about list_cut_position() ?
>
> I have no idea, actually. Maybe the double !list_empty() confuses the
> compiler, making it think `sublist` can be referenced out of the
> scope?
That is odd, are you sure this isn't a compiler bug?
next prev parent reply other threads:[~2025-04-22 12:41 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-22 6:04 Please apply d2155fe54ddb to 5.10 and 5.4 Qingfang Deng
2025-04-22 6:06 ` Greg Kroah-Hartman
2025-04-22 6:10 ` Qingfang Deng
2025-04-22 6:27 ` Greg Kroah-Hartman
2025-04-22 6:34 ` Qingfang Deng
2025-04-22 7:04 ` David Hildenbrand
2025-04-22 9:58 ` Qingfang Deng
2025-04-22 12:41 ` Greg Kroah-Hartman [this message]
2025-04-23 7:37 ` Qingfang Deng
2025-04-23 7:39 ` Greg Kroah-Hartman
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=2025042256-unnerve-doorway-7cb7@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=akpm@linux-foundation.org \
--cc=david@redhat.com \
--cc=dqfext@gmail.com \
--cc=hannes@cmpxchg.org \
--cc=jackmanb@google.com \
--cc=linux-mm@kvack.org \
--cc=liu.xiang@zlingsmart.com \
--cc=mhocko@suse.com \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=ziy@nvidia.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 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.