netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: pshelar@nicira.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 1/4] openvswitch: refactor ovs flow extract API.
Date: Sat, 13 Sep 2014 16:47:08 -0400 (EDT)	[thread overview]
Message-ID: <20140913.164708.1690675945507354047.davem@davemloft.net> (raw)
In-Reply-To: <1410478084-1436-1-git-send-email-pshelar@nicira.com>

From: Pravin B Shelar <pshelar@nicira.com>
Date: Thu, 11 Sep 2014 16:28:04 -0700

> @@ -250,7 +251,7 @@ void ovs_dp_process_received_packet(struct vport *p, struct sk_buff *skb)
>  	stats = this_cpu_ptr(dp->stats_percpu);
>  
>  	/* Extract flow from 'skb' into 'key'. */
> -	error = ovs_flow_extract(skb, p->port_no, &key);
> +	error = ovs_flow_key_extract(skb, &key);
>  	if (unlikely(error)) {
>  		kfree_skb(skb);
>  		return;
...
> @@ -611,5 +604,35 @@ int ovs_flow_extract(struct sk_buff *skb, u16 in_port, struct sw_flow_key *key)
>  		}
>  	}
>  
> +	OVS_CB(skb)->pkt_key = key;
>  	return 0;

Wow, have you really been putting pointers to kernel stack variables
into the SKB control block all this time?

That's error prone as well as asking for trouble.

Please adjust the code to not do this.

  reply	other threads:[~2014-09-13 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-11 23:28 [PATCH net-next v2 1/4] openvswitch: refactor ovs flow extract API Pravin B Shelar
2014-09-13 20:47 ` David Miller [this message]
2014-09-15 17:23   ` Pravin Shelar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140913.164708.1690675945507354047.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pshelar@nicira.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).