projects
/
cascardo
/
ovs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
37dfe52
)
datapath: add skb_clone NULL check for the sampling action.
author
Andy Zhou
<azhou@nicira.com>
Thu, 10 Jul 2014 07:49:06 +0000
(
00:49
-0700)
committer
Andy Zhou
<azhou@nicira.com>
Thu, 10 Jul 2014 21:58:56 +0000
(14:58 -0700)
Fix a bug where skb_clone() NULL check is missing in sample action
implementation.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Pravin B Shelar <pshelar@nicira.com>
datapath/actions.c
patch
|
blob
|
history
diff --git
a/datapath/actions.c
b/datapath/actions.c
index
caf432e
..
5c0e2b7
100644
(file)
--- a/
datapath/actions.c
+++ b/
datapath/actions.c
@@
-576,6
+576,9
@@
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 the sample action when out of memory. */
+ return 0;
}
/* Note that do_execute_actions() never consumes skb.