[PATCH net-next] nfnetlink_log: Use GFP_NOWARN for skb allocation

Subsystems: netfilter, networking [general], the rest

STALE3610d

2 messages, 2 authors, 2016-10-21 · open the first message on its own page

[PATCH net-next] nfnetlink_log: Use GFP_NOWARN for skb allocation

From: Calvin Owens <hidden>
Date: 2016-10-07 21:02:42

Since the code explicilty falls back to a smaller allocation when the
large one fails, we shouldn't complain when that happens.

Signed-off-by: Calvin Owens <redacted>
---
 net/netfilter/nfnetlink_log.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nfnetlink_log.c b/net/netfilter/nfnetlink_log.c
index eb086a1..7435505 100644
--- a/net/netfilter/nfnetlink_log.c
+++ b/net/netfilter/nfnetlink_log.c
@@ -330,7 +330,7 @@ nfulnl_alloc_skb(struct net *net, u32 peer_portid, unsigned int inst_size,
 	 * message.  WARNING: has to be <= 128k due to slab restrictions */
 
 	n = max(inst_size, pkt_size);
-	skb = alloc_skb(n, GFP_ATOMIC);
+	skb = alloc_skb(n, GFP_ATOMIC | __GFP_NOWARN);
 	if (!skb) {
 		if (n > pkt_size) {
 			/* try to allocate only as much as we need for current
-- 
2.9.3

Re: [PATCH net-next] nfnetlink_log: Use GFP_NOWARN for skb allocation

From: Pablo Neira Ayuso <pablo@netfilter.org>
Date: 2016-10-21 10:38:58

On Fri, Oct 07, 2016 at 02:02:16PM -0700, Calvin Owens wrote:
Since the code explicilty falls back to a smaller allocation when the
large one fails, we shouldn't complain when that happens.
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help