projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
651887b
)
openvswitch: Add skb_clone NULL check for the sampling action.
author
Andy Zhou
<azhou@nicira.com>
Thu, 17 Jul 2014 22:17:54 +0000
(15:17 -0700)
committer
Pravin B Shelar
<pshelar@nicira.com>
Thu, 24 Jul 2014 16:37:22 +0000
(09:37 -0700)
Fix a bug where skb_clone() NULL check is missing in sample action
implementation.
Signed-off-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
net/openvswitch/actions.c
patch
|
blob
|
blame
|
history
diff --git
a/net/openvswitch/actions.c
b/net/openvswitch/actions.c
index 794a96f6b8d9668bd53025f637f3a0fc2f03a1a8..fe5cda0deb395db1d6a619e2145c22945ea05d74 100644
(file)
--- 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.