]> git.baikalelectronics.ru Git - kernel.git/commit
Revert "packet: switch kvzalloc to allocate memory"
authorEric Dumazet <edumazet@google.com>
Wed, 29 Aug 2018 18:50:12 +0000 (11:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Sat, 1 Sep 2018 06:00:28 +0000 (23:00 -0700)
commit0505b1742f2a09a1f479c31a268abd2a20e6e07a
treef64aca1c92187b15255c3da45bf0e6df95193c2c
parentd50262c4b0faa21e288f5e93c4ade55b8531d6e9
Revert "packet: switch kvzalloc to allocate memory"

This reverts commit cad8a71ab1d4a45030c079f71964c2ad45e6baa2.

mmap()/munmap() can not be backed by kmalloced pages :

We fault in :

    VM_BUG_ON_PAGE(PageSlab(page), page);

    unmap_single_vma+0x8a/0x110
    unmap_vmas+0x4b/0x90
    unmap_region+0xc9/0x140
    do_munmap+0x274/0x360
    vm_munmap+0x81/0xc0
    SyS_munmap+0x2b/0x40
    do_syscall_64+0x13e/0x1c0
    entry_SYSCALL_64_after_hwframe+0x42/0xb7

Fixes: cad8a71ab1d4 ("packet: switch kvzalloc to allocate memory")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: John Sperbeck <jsperbeck@google.com>
Bisected-by: John Sperbeck <jsperbeck@google.com>
Cc: Zhang Yu <zhangyu31@baidu.com>
Cc: Li RongQing <lirongqing@baidu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/packet/af_packet.c
net/packet/internal.h