[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1406010613-1893-1-git-send-email-pshelar@nicira.com>
Date: Mon, 21 Jul 2014 23:30:13 -0700
From: Pravin B Shelar <pshelar@...ira.com>
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, Andy Zhou <azhou@...ira.com>,
Pravin B Shelar <pshelar@...ira.com>
Subject: [PATCH net-next v7 6/6] openvswitch: Add skb_clone NULL check for the sampling action.
From: Andy Zhou <azhou@...ira.com>
Fix a bug where skb_clone() NULL check is missing in sample action
implementation.
Signed-off-by: Andy Zhou <azhou@...ira.com>
Signed-off-by: Pravin B Shelar <pshelar@...ira.com>
---
net/openvswitch/actions.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/openvswitch/actions.c b/net/openvswitch/actions.c
index 146f6cb..c6cd247 100644
--- a/net/openvswitch/actions.c
+++ b/net/openvswitch/actions.c
@@ -477,6 +477,8 @@ static int sample(struct datapath *dp, struct sk_buff *skb,
skb_get(skb);
} else {
sample_skb = skb_clone(skb, GFP_ATOMIC);
+ if (!sample_skb) /* Skip sample action when out of memory. */
+ return 0;
}
/* Note that do_execute_actions() never consumes skb.
--
1.9.3
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists