Skip to content

Commit 8aa51d6

Browse files
Dan Carpenterdavem330
authored andcommitted
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 <[email protected]> Acked-by: Jesse Gross <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent b99215c commit 8aa51d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

net/openvswitch/datapath.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static int queue_userspace_packet(int dp_ifindex, struct sk_buff *skb,
321321
return -ENOMEM;
322322

323323
nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb));
324-
if (!skb)
324+
if (!nskb)
325325
return -ENOMEM;
326326

327327
nskb->vlan_tci = 0;

0 commit comments

Comments
 (0)