[RHEL7,COMMIT] x86: Add __GFP_ORDER_NOWARN to dma allocations

Submitted by Konstantin Khorenko on Feb. 26, 2019, 10:22 a.m.

Details

Message ID 201902261022.x1QAMUtl003885@finist-ce7.sw.ru
State New
Series "Series without cover letter"
Headers show

Commit Message

Konstantin Khorenko Feb. 26, 2019, 10:22 a.m.
The commit is pushed to "branch-rh7-3.10.0-957.1.3.vz7.83.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-957.1.3.vz7.83.14
------>
commit e26ef84f13062c5848801cb83425e5853b876490
Author: Andrey Ryabinin <aryabinin@virtuozzo.com>
Date:   Tue Feb 26 13:22:29 2019 +0300

    x86: Add __GFP_ORDER_NOWARN to dma allocations
    
    Fix warnings like this:
     WARNING: CPU: 8 PID: 51 at mm/page_alloc.c:3531 __alloc_pages_nodemask+0x311/0x610
     order 9 >= 3, gfp 0x80d0
     CPU: 8 PID: 51 Comm: kworker/8:0 ve: 0 Tainted: G        W      ------------ T 3.10.0-957.1.3.vz7.83.12 #1 83.12
    
     Call Trace:
      [<ffffffff9e391fd8>] dump_stack+0x19/0x1b
      [<ffffffff9dc98778>] __warn+0xd8/0x100
      [<ffffffff9dc987ff>] warn_slowpath_fmt+0x5f/0x80
      [<ffffffff9ddd4371>] __alloc_pages_nodemask+0x311/0x610
      [<ffffffff9de26a78>] alloc_pages_current+0x98/0x110
      [<ffffffff9e21e98f>] intel_alloc_coherent+0x5f/0x150
      [<ffffffffc08f7690>] i40iw_allocate_dma_mem+0xa0/0x100 [i40iw]
      [<ffffffffc08ec62c>] i40iw_add_sd_table_entry+0x5c/0x150 [i40iw]
      [<ffffffffc08ecb07>] i40iw_sc_create_hmc_obj+0x137/0x460 [i40iw]
      [<ffffffffc08f0321>] i40iw_open.part.10+0x921/0x17f0 [i40iw]
      [<ffffffffc08f122b>] i40iw_open+0x3b/0x50 [i40iw]
      [<ffffffffc04f19cd>] i40e_client_subtask+0xbd/0x130 [i40e]
      [<ffffffffc04d408f>] i40e_service_task+0x62f/0x1360 [i40e]
      [<ffffffff9dcbc1e2>] process_one_work+0x182/0x440
      [<ffffffff9dcbd396>] worker_thread+0x126/0x3c0
      [<ffffffff9dcc4401>] kthread+0xd1/0xe0
      [<ffffffff9e3a4cf7>] ret_from_fork_nospec_begin+0x21/0x21
    
    https://pmc.acronis.com/browse/VSTOR-20675
    Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 arch/x86/include/asm/dma-mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/arch/x86/include/asm/dma-mapping.h b/arch/x86/include/asm/dma-mapping.h
index c313ddbaa109..3dc09005e934 100644
--- a/arch/x86/include/asm/dma-mapping.h
+++ b/arch/x86/include/asm/dma-mapping.h
@@ -106,7 +106,7 @@  static inline gfp_t dma_alloc_coherent_gfp_flags(struct device *dev, gfp_t gfp)
 	if (dma_mask <= DMA_BIT_MASK(32) && !(gfp & GFP_DMA))
 		gfp |= GFP_DMA32;
 #endif
-       return gfp;
+       return gfp | __GFP_ORDER_NOWARN;
 }
 
 #endif