lkml.org 
[lkml]   [2009]   [Jan]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Data corruption issue with splice() on 2.6.27.10
    On Wed, Jan 07, 2009 at 01:22:05PM +0100, Willy Tarreau wrote:
    >
    > > diff --git a/net/core/skbuff.c b/net/core/skbuff.c
    > > index 5110b35..4c080cd 100644
    > > --- a/net/core/skbuff.c
    > > +++ b/net/core/skbuff.c
    > > @@ -73,17 +73,13 @@ static struct kmem_cache *skbuff_fclone_cache __read_mostly;
    > > static void sock_pipe_buf_release(struct pipe_inode_info *pipe,
    > > struct pipe_buffer *buf)
    > > {
    > > - struct sk_buff *skb = (struct sk_buff *) buf->private;
    > > -
    > > - kfree_skb(skb);
    > > + put_page(buf->page);
    > > }
    > >
    > > static void sock_pipe_buf_get(struct pipe_inode_info *pipe,
    > > struct pipe_buffer *buf)
    > > {
    > > - struct sk_buff *skb = (struct sk_buff *) buf->private;
    > > -
    > > - skb_get(skb);
    > > + get_page(buf->page);
    > > }

    Well this patch can only make it worse because not only are you
    still ref counting skb->head with get_page, but you've also
    completely removed the skb ref count which means that the corruption
    can only occur sooner.

    Cheers,
    --
    Visit Openswan at http://www.openswan.org/
    Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
    Home Page: http://gondor.apana.org.au/~herbert/
    PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt


    \
     
     \ /
      Last update: 2009-01-07 13:27    [W:0.023 / U:97.496 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site