aboutsummaryrefslogtreecommitdiffstats
path: root/net/openvswitch/flow.c
diff options
context:
space:
mode:
authorThomas Graf <[email protected]>2013-03-29 13:46:48 +0000
committerJesse Gross <[email protected]>2013-03-30 00:53:46 +0000
commit32686a9d2988516788cfcc402e1355c1eba1186a (patch)
tree1dddb07c73f7e8ece015c414ea517b51eddfa182 /net/openvswitch/flow.c
parentopenvswitch: Specify the minimal length of OVS_PACKET_ATTR_PACKET in the policy (diff)
downloadkernel-32686a9d2988516788cfcc402e1355c1eba1186a.tar.gz
kernel-32686a9d2988516788cfcc402e1355c1eba1186a.zip
openvswitch: Use nla_memcpy() to memcpy() data from attributes
Less error prone as it takes into account the length of both the destination buffer and the source attribute and documents when data is copied from an attribute. Signed-off-by: Thomas Graf <[email protected]> Signed-off-by: Jesse Gross <[email protected]>
Diffstat (limited to 'net/openvswitch/flow.c')
-rw-r--r--net/openvswitch/flow.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/flow.c b/net/openvswitch/flow.c
index 332486839347..cf9328be75e9 100644
--- a/net/openvswitch/flow.c
+++ b/net/openvswitch/flow.c
@@ -211,7 +211,7 @@ struct sw_flow_actions *ovs_flow_actions_alloc(const struct nlattr *actions)
return ERR_PTR(-ENOMEM);
sfa->actions_len = actions_len;
- memcpy(sfa->actions, nla_data(actions), actions_len);
+ nla_memcpy(sfa->actions, actions, actions_len);
return sfa;
}