Commit 719bfeaae8104fca4ca5d47c02592b08682f14fa
Committed by
David S. Miller
1 parent
cbea270714
Exists in
master
and in
7 other branches
packet: avoid warnings when high-order page allocation fails
Latest tcpdump/libpcap triggers annoying messages because of high order page allocation failures (when lowmem exhausted or fragmented) These allocation errors are correctly handled so could be silent. [22660.208901] tcpdump: page allocation failure. order:5, mode:0xc0d0 [22660.208921] Pid: 13866, comm: tcpdump Not tainted 2.6.30-rc2 #170 [22660.208936] Call Trace: [22660.208950] [<c04e2b46>] ? printk+0x18/0x1a [22660.208965] [<c02760f7>] __alloc_pages_internal+0x357/0x460 [22660.208980] [<c0276251>] __get_free_pages+0x21/0x40 [22660.208995] [<c04cc835>] packet_set_ring+0x105/0x3d0 [22660.209009] [<c04ccd1d>] packet_setsockopt+0x21d/0x4d0 [22660.209025] [<c0270400>] ? filemap_fault+0x0/0x450 [22660.209040] [<c0449e34>] sys_setsockopt+0x54/0xa0 [22660.209053] [<c044b97f>] sys_socketcall+0xef/0x270 [22660.209067] [<c0202e34>] sysenter_do_call+0x12/0x26 Signed-off-by: Eric Dumazet <dada1@cosmosbay.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 3 additions and 2 deletions Side-by-side Diff
net/packet/af_packet.c
... | ... | @@ -1758,8 +1758,9 @@ |
1758 | 1758 | |
1759 | 1759 | static inline char *alloc_one_pg_vec_page(unsigned long order) |
1760 | 1760 | { |
1761 | - return (char *) __get_free_pages(GFP_KERNEL | __GFP_COMP | __GFP_ZERO, | |
1762 | - order); | |
1761 | + gfp_t gfp_flags = GFP_KERNEL | __GFP_COMP | __GFP_ZERO | __GFP_NOWARN; | |
1762 | + | |
1763 | + return (char *) __get_free_pages(gfp_flags, order); | |
1763 | 1764 | } |
1764 | 1765 | |
1765 | 1766 | static char **alloc_pg_vec(struct tpacket_req *req, int order) |