Hi Greg and Sasha,
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=]
Regards, Qingfang
On Tue, Apr 22, 2025 at 02:04:45PM +0800, Qingfang Deng wrote:
Hi Greg and Sasha,
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=]
All mm patches MUST get approval from the mm maintainers/developers before we can apply them to stable kernels.
Can you please do that here?
thanks,
greg k-h
On Tue, Apr 22, 2025 at 2:06 PM Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
All mm patches MUST get approval from the mm maintainers/developers before we can apply them to stable kernels.
Can you please do that here?
Sure. Added to Cc list.
thanks,
greg k-h
On Tue, Apr 22, 2025 at 02:10:53PM +0800, Qingfang Deng wrote:
On Tue, Apr 22, 2025 at 2:06 PM Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
All mm patches MUST get approval from the mm maintainers/developers before we can apply them to stable kernels.
Can you please do that here?
Sure. Added to Cc list.
They have no context here at all :(
On Tue, Apr 22, 2025 at 2:27 PM Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
On Tue, Apr 22, 2025 at 02:10:53PM +0800, Qingfang Deng wrote:
On Tue, Apr 22, 2025 at 2:06 PM Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
All mm patches MUST get approval from the mm maintainers/developers before we can apply them to stable kernels.
Can you please do that here?
Sure. Added to Cc list.
They have no context here at all :(
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=]
On 22.04.25 08:34, Qingfang Deng wrote:
On Tue, Apr 22, 2025 at 2:27 PM Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
On Tue, Apr 22, 2025 at 02:10:53PM +0800, Qingfang Deng wrote:
On Tue, Apr 22, 2025 at 2:06 PM Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
All mm patches MUST get approval from the mm maintainers/developers before we can apply them to stable kernels.
Can you please do that here?
Sure. Added to Cc list.
They have no context here at all :(
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() ?
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?
-- Cheers,
David / dhildenb
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?
On Tue, Apr 22, 2025 at 8:41 PM Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
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?
I think it is a compiler bug. If so, what should we do to fix the warning?
On Wed, Apr 23, 2025 at 03:37:39PM +0800, Qingfang Deng wrote:
On Tue, Apr 22, 2025 at 8:41 PM Greg Kroah-Hartman gregkh@linuxfoundation.org wrote:
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?
I think it is a compiler bug. If so, what should we do to fix the warning?
Fix the compiler :)
linux-stable-mirror@lists.linaro.org