• Sebastian Ott's avatar
    misc/genwqe: get rid of atomic allocations · 19f7767e
    Sebastian Ott authored
    we received reports of failed allocations in genwqe code:
    
    [  733.550955] genwqe_gzip: page allocation failure: order:1, mode:0x20
    [  733.550964] CPU: 2 PID: 1846 Comm: genwqe_gzip Not tainted 4.3.0-rc3-00042-g3225031f #78
    [  733.550968]        000000002782b830 000000002782b8c0 0000000000000002 0000000000000000
           000000002782b960 000000002782b8d8 000000002782b8d8 00000000001134a0
           0000000000000000 0000000000892b2a 0000000000871d0a 000000000000000b
           000000002782b920 000000002782b8c0 0000000000000000 0000000000000000
           0000000000000000 00000000001134a0 000000002782b8c0 000000002782b920
    [  733.551003] Call Trace:
    [  733.551013] ([<0000000000113388>] show_trace+0xf8/0x158)
    [  733.551018]  [<0000000000113452>] show_stack+0x6a/0xe8
    [  733.551024]  [<00000000004611d4>] dump_stack+0x7c/0xd8
    [  733.551031]  [<000000000024dc22>] warn_alloc_failed+0xda/0x150
    [  733.551036]  [<000000000025268e>] __alloc_pages_nodemask+0x94e/0xbc0
    [  733.551041]  [<000000000012bcd8>] s390_dma_alloc+0x70/0x1a0
    [  733.551054]  [<000003ff804d8e8c>] __genwqe_alloc_consistent+0x84/0xd0 [genwqe_card]
    [  733.551063]  [<000003ff804d90c2>] genwqe_alloc_sync_sgl+0x13a/0x328 [genwqe_card]
    [  733.551066]  [<000003ff804d41a0>] do_execute_ddcb+0x1f8/0x388 [genwqe_card]
    [  733.551069]  [<000003ff804d48c8>] genwqe_ioctl+0x598/0xd50 [genwqe_card]
    [  733.551072]  [<00000000002cc90c>] do_vfs_ioctl+0x3f4/0x590
    [  733.551074]  [<00000000002ccb46>] SyS_ioctl+0x9e/0xb0
    [  733.551078]  [<00000000006c8166>] system_call+0xd6/0x258
    [  733.551080]  [<000003fffd25819a>] 0x3fffd25819a
    [  733.551082] no locks held by genwqe_gzip/1846.
    
    This specific allocation and some others in genwqe are unnecessary flagged
    as atomic.
    
    All of genwqe's atomic allocations happen in a context where it's allowed
    to sleep. Change these to use GFP_KERNEL.
    Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
    Acked-by: default avatarFrank Haverkamp <haver@linux.vnet.ibm.com>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    19f7767e
card_dev.c 34.4 KB