Re: [PATCH linux-wpan] 6lowpan: ensure header compression does not corrupt ipv6 header

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Mon, Sep 22, 2014 at 10:23:03AM +0200, Alexander Aring wrote:
> Hi,
> 
> On Sun, Sep 21, 2014 at 09:31:31AM +0200, Alexander Aring wrote:
> > On Sat, Sep 20, 2014 at 09:26:53PM +0200, Alexander Aring wrote:
> > ...
> > > > > +	/* We must take a copy of the skb before we modify/replace the ipv6
> > > > > +	 * header as the header could be used elsewhere
> > > > > +	 */
> > > > > +	skb = skb_unshare(skb, GFP_KERNEL);
> > > > > +
> > > 
> > > need to be GFP_ATOMIC, xmit callback has atomic context.
> > 
> > also check on return value here.
> 
> We should also do it like while receiving, see [0].
> 
> Only if shared make clone and buffer isn't shared. Do this with
> "skb_share_check".
> 

hmpf, this doesn't work... maybe there is a bigger problem with
refcounting of skb, because I understand that skb_share_check unshare
the buffer when the skb is used twice.

- Alex
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux