[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20100924142054.GA1634@bnru01.bnr.st.com>
Date: Fri, 24 Sep 2010 19:50:55 +0530
From: Kumar SANGHVI <kumar.sanghvi@...ricsson.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: "remi.denis-courmont@...ia.com" <remi.denis-courmont@...ia.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
STEricsson_nomadik_linux <STEricsson_nomadik_linux@...t.st.com>,
Sudeep DIVAKARAN <sudeep.divakaran@...ricsson.com>,
Gulshan KARMANI <gulshan.karmani@...ricsson.com>,
Linus WALLEIJ <linus.walleij@...ricsson.com>
Subject: Re: [PATCH 1/2] Phonet: Implement Pipe Controller to support Nokia
Slim Modems
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.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists