* [PATCH] mm: allow __GFP_RETRY_MAYFAIL in vmalloc
@ 2026-02-12 16:33 Mikulas Patocka
2026-02-21 1:19 ` SeongJae Park
0 siblings, 1 reply; 3+ messages in thread
From: Mikulas Patocka @ 2026-02-12 16:33 UTC (permalink / raw)
To: Vishal Moola
Cc: Christoph Hellwig, Uladzislau Rezki (Sony),
SeongJae Park, Andrew Morton, zkabelac, Matthew Sakai, linux-mm,
dm-devel
The commit 07003531e03c8 ("mm/vmalloc: warn on invalid vmalloc gfp
flags") breaks the device mapper VDO target. The VDO target calls vmalloc
with __GFP_RETRY_MAYFAIL and this flag is not in the mask of allowed
flags.
There is no reason why vmalloc couldn't support __GFP_RETRY_MAYFAIL, so
let's add this flag to GFP_VMALLOC_SUPPORTED.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
Fixes: 07003531e03c ("mm/vmalloc: warn on invalid vmalloc gfp flags")
Cc: stable@vger.kernel.org # v6.19
---
mm/vmalloc.c | 1 +
1 file changed, 1 insertion(+)
Index: linux-2.6/mm/vmalloc.c
===================================================================
--- linux-2.6.orig/mm/vmalloc.c
+++ linux-2.6/mm/vmalloc.c
@@ -3928,6 +3928,7 @@ fail:
*/
#define GFP_VMALLOC_SUPPORTED (GFP_KERNEL | GFP_ATOMIC | GFP_NOWAIT |\
__GFP_NOFAIL | __GFP_ZERO | __GFP_NORETRY |\
+ __GFP_RETRY_MAYFAIL |\
GFP_NOFS | GFP_NOIO | GFP_KERNEL_ACCOUNT |\
GFP_USER | __GFP_NOLOCKDEP)
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mm: allow __GFP_RETRY_MAYFAIL in vmalloc
2026-02-12 16:33 [PATCH] mm: allow __GFP_RETRY_MAYFAIL in vmalloc Mikulas Patocka
@ 2026-02-21 1:19 ` SeongJae Park
2026-02-23 5:48 ` Anshuman Khandual
0 siblings, 1 reply; 3+ messages in thread
From: SeongJae Park @ 2026-02-21 1:19 UTC (permalink / raw)
To: Mikulas Patocka
Cc: SeongJae Park, Vishal Moola, Christoph Hellwig,
Uladzislau Rezki (Sony),
Andrew Morton, zkabelac, Matthew Sakai, linux-mm, dm-devel
On Thu, 12 Feb 2026 17:33:30 +0100 (CET) Mikulas Patocka <mpatocka@redhat.com> wrote:
> The commit 07003531e03c8 ("mm/vmalloc: warn on invalid vmalloc gfp
> flags") breaks the device mapper VDO target. The VDO target calls vmalloc
> with __GFP_RETRY_MAYFAIL and this flag is not in the mask of allowed
> flags.
>
> There is no reason why vmalloc couldn't support __GFP_RETRY_MAYFAIL, so
> let's add this flag to GFP_VMALLOC_SUPPORTED.
>
> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
> Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
> Fixes: 07003531e03c ("mm/vmalloc: warn on invalid vmalloc gfp flags")
> Cc: stable@vger.kernel.org # v6.19
Acked-by: SeongJae Park <sj@kernel.org>
>
> ---
> mm/vmalloc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> Index: linux-2.6/mm/vmalloc.c
> ===================================================================
> --- linux-2.6.orig/mm/vmalloc.c
> +++ linux-2.6/mm/vmalloc.c
> @@ -3928,6 +3928,7 @@ fail:
> */
> #define GFP_VMALLOC_SUPPORTED (GFP_KERNEL | GFP_ATOMIC | GFP_NOWAIT |\
> __GFP_NOFAIL | __GFP_ZERO | __GFP_NORETRY |\
> + __GFP_RETRY_MAYFAIL |\
> GFP_NOFS | GFP_NOIO | GFP_KERNEL_ACCOUNT |\
> GFP_USER | __GFP_NOLOCKDEP)
By the way, I think this list might better to be alphabetically sorted in
future. Obviously just a trivial and random thought that never required for
this patch.
Thanks,
SJ
[...]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] mm: allow __GFP_RETRY_MAYFAIL in vmalloc
2026-02-21 1:19 ` SeongJae Park
@ 2026-02-23 5:48 ` Anshuman Khandual
0 siblings, 0 replies; 3+ messages in thread
From: Anshuman Khandual @ 2026-02-23 5:48 UTC (permalink / raw)
To: SeongJae Park, Mikulas Patocka
Cc: Vishal Moola, Christoph Hellwig, Uladzislau Rezki (Sony),
Andrew Morton, zkabelac, Matthew Sakai, linux-mm, dm-devel
On 21/02/26 6:49 AM, SeongJae Park wrote:
> On Thu, 12 Feb 2026 17:33:30 +0100 (CET) Mikulas Patocka <mpatocka@redhat.com> wrote:
>
>> The commit 07003531e03c8 ("mm/vmalloc: warn on invalid vmalloc gfp
>> flags") breaks the device mapper VDO target. The VDO target calls vmalloc
>> with __GFP_RETRY_MAYFAIL and this flag is not in the mask of allowed
>> flags.
>>
>> There is no reason why vmalloc couldn't support __GFP_RETRY_MAYFAIL, so
>> let's add this flag to GFP_VMALLOC_SUPPORTED.
>>
>> Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
>> Reported-by: Zdenek Kabelac <zkabelac@redhat.com>
>> Fixes: 07003531e03c ("mm/vmalloc: warn on invalid vmalloc gfp flags")
>> Cc: stable@vger.kernel.org # v6.19
>
> Acked-by: SeongJae Park <sj@kernel.org>
>
>>
>> ---
>> mm/vmalloc.c | 1 +
>> 1 file changed, 1 insertion(+)
>>
>> Index: linux-2.6/mm/vmalloc.c
>> ===================================================================
>> --- linux-2.6.orig/mm/vmalloc.c
>> +++ linux-2.6/mm/vmalloc.c
>> @@ -3928,6 +3928,7 @@ fail:
>> */
>> #define GFP_VMALLOC_SUPPORTED (GFP_KERNEL | GFP_ATOMIC | GFP_NOWAIT |\
>> __GFP_NOFAIL | __GFP_ZERO | __GFP_NORETRY |\
>> + __GFP_RETRY_MAYFAIL |\
>> GFP_NOFS | GFP_NOIO | GFP_KERNEL_ACCOUNT |\
>> GFP_USER | __GFP_NOLOCKDEP)
>
> By the way, I think this list might better to be alphabetically sorted in
Agreed.
> future. Obviously just a trivial and random thought that never required for
> this patch.
Reviewed-by: Anshuman Khandual <anshuman.khandual@arm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-02-23 5:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-02-12 16:33 [PATCH] mm: allow __GFP_RETRY_MAYFAIL in vmalloc Mikulas Patocka
2026-02-21 1:19 ` SeongJae Park
2026-02-23 5:48 ` Anshuman Khandual
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox