aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-05-13 04:44:18 -0400
committerDavid S. Miller <davem@davemloft.net>2012-05-13 15:47:34 -0400
commit8aa51d64c1f526e43b1e7f89fb8b98c2fd583f4b (patch)
tree8444efa46bbd8dbe4e01655aaa719d8d5257928e
parentb99215cdc6e191f5649687536d4fb0faa3d7f56e (diff)
openvswitch: checking wrong variable in queue_userspace_packet()
"skb" is non-NULL here, for example we dereference it in skb_clone(). The intent was to test "nskb" which was just set. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Jesse Gross <jesse@nicira.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/openvswitch/datapath.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index 777716bc80f7..e66341ec455c 100644
--- a/net/openvswitch/datapath.c
+++ b/net/openvswitch/datapath.c
@@ -321,7 +321,7 @@ static int queue_userspace_packet(int dp_ifindex, struct sk_buff *skb,
321 return -ENOMEM; 321 return -ENOMEM;
322 322
323 nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb)); 323 nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb));
324 if (!skb) 324 if (!nskb)
325 return -ENOMEM; 325 return -ENOMEM;
326 326
327 nskb->vlan_tci = 0; 327 nskb->vlan_tci = 0;