netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kumar SANGHVI <kumar.sanghvi@stericsson.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "remi.denis-courmont@nokia.com" <remi.denis-courmont@nokia.com>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	STEricsson_nomadik_linux <STEricsson_nomadik_linux@list.st.com>,
	Sudeep DIVAKARAN <sudeep.divakaran@stericsson.com>,
	Gulshan KARMANI <gulshan.karmani@stericsson.com>,
	Linus WALLEIJ <linus.walleij@stericsson.com>
Subject: Re: [PATCH 1/2] Phonet: Implement Pipe Controller to support Nokia Slim Modems
Date: Fri, 24 Sep 2010 19:50:55 +0530	[thread overview]
Message-ID: <20100924142054.GA1634@bnru01.bnr.st.com> (raw)
In-Reply-To: <1285336333.2503.153.camel@edumazet-laptop>

Hi Eric,

On Fri, Sep 24, 2010 at 15:52:13 +0200, Eric Dumazet wrote:
> Le vendredi 24 septembre 2010 à 17:53 +0530, Kumar A Sanghvi a écrit :
> 
> > +static int pipe_get_flow_info(struct sock *sk, struct sk_buff *skb,
> > +		u8 *pref_rx_fc, u8 *req_tx_fc)
> > +{
> > +	struct pnpipehdr *hdr = pnp_hdr(skb);
> > +	u8 n_sb;
> > +
> > +	if (!pskb_may_pull(skb, sizeof(*hdr) + 4))
> > +		return -EINVAL;
> 
> This is wrong.
> 
> pskb_may_pull() might change skb->data, so you should do
> 
> {
> 	struct pnpipehdr *hdr;
> 	u8 n_sb;
> 
> 	if (!pskb_may_pull(skb, sizeof(*hdr) + 4))
> 		return -EINVAL;
> 
> 	hdr = pnp_hdr(skb);
> 
Thanks for pointing this out.
I will correct this and post a v2 version of patch.

I will also post a fix for similar problem which now I noticed, based on
your above comment, in pipe_rcv_status function in net/phonet/pep.c

Best regards,
Kumar.

  reply	other threads:[~2010-09-24 14:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-24 12:23 [PATCH 0/2] Phonet: Implement Pipe Controller to support Nokia Slim Modems Kumar A Sanghvi
2010-09-24 12:23 ` [PATCH 1/2] " Kumar A Sanghvi
2010-09-24 13:52   ` Eric Dumazet
2010-09-24 14:20     ` Kumar SANGHVI [this message]
2010-09-24 12:23 ` [PATCH 2/2] Documentation: Update Phonet doc for Pipe Controller implementation Kumar A Sanghvi

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=20100924142054.GA1634@bnru01.bnr.st.com \
    --to=kumar.sanghvi@stericsson.com \
    --cc=STEricsson_nomadik_linux@list.st.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=gulshan.karmani@stericsson.com \
    --cc=linus.walleij@stericsson.com \
    --cc=netdev@vger.kernel.org \
    --cc=remi.denis-courmont@nokia.com \
    --cc=sudeep.divakaran@stericsson.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).