git://git.onelab.eu
/
sliver-openvswitch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: Check IS_ERR() in do_execute().
[sliver-openvswitch.git]
/
datapath
/
datapath.c
diff --git
a/datapath/datapath.c
b/datapath/datapath.c
index
5ee9157
..
fe37ec1
100644
(file)
--- a/
datapath/datapath.c
+++ b/
datapath/datapath.c
@@
-1326,10
+1326,11
@@
static int do_execute(struct datapath *dp, const struct odp_execute *execute)
if (execute->length < ETH_HLEN || execute->length > 65535)
goto error;
if (execute->length < ETH_HLEN || execute->length > 65535)
goto error;
- err = -ENOMEM;
actions = flow_actions_alloc(execute->n_actions);
actions = flow_actions_alloc(execute->n_actions);
- if (!actions)
+ if (IS_ERR(actions)) {
+ err = PTR_ERR(actions);
goto error;
goto error;
+ }
err = -EFAULT;
if (copy_from_user(actions->actions, execute->actions,
err = -EFAULT;
if (copy_from_user(actions->actions, execute->actions,