Netdev List
 help / color / mirror / Atom feed
* [patch] openvswitch: checking wrong variable in queue_userspace_packet()
@ 2012-05-13 18:44 Dan Carpenter
       [not found] ` <20120513184418.GB16541-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Dan Carpenter @ 2012-05-13 18:44 UTC (permalink / raw)
  To: Jesse Gross; +Cc: David S. Miller, dev, netdev, kernel-janitors

"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>

diff --git a/net/openvswitch/datapath.c b/net/openvswitch/datapath.c
index fe28562..2c74daa 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,
 			return -ENOMEM;
 
 		nskb = __vlan_put_tag(nskb, vlan_tx_tag_get(nskb));
-		if (!skb)
+		if (!nskb)
 			return -ENOMEM;
 
 		nskb->vlan_tci = 0;

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-05-13 19:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-13 18:44 [patch] openvswitch: checking wrong variable in queue_userspace_packet() Dan Carpenter
     [not found] ` <20120513184418.GB16541-mgFCXtclrQlZLf2FXnZxJA@public.gmane.org>
2012-05-13 19:22   ` Jesse Gross
     [not found]     ` <CAEP_g=_LojOio0E5K_vYBkO3BKdW9F=dDam4zwffyZPbSZJd2Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-05-13 19:47       ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox