Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Dan Carpenter and committed by
David S. Miller
8aa51d64 b99215cd

+1 -1
+1 -1
net/openvswitch/datapath.c
··· 321 321 return -ENOMEM; 322 322 323 323 nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb)); 324 - if (!skb) 324 + if (!nskb) 325 325 return -ENOMEM; 326 326 327 327 nskb->vlan_tci = 0;