Re: [PATCH net v2 2/3] unix/dgram: fix peeking with an offset larger than data in queue

2013-04-29 Thread Cong Wang
On Fri, 26 Apr 2013 at 18:35 GMT, Benjamin Poirier wrote: > struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned int flags, > - int *peeked, int *off, int *err) > + int *peeked, int *_off, int *err) > { > - struct

Re: [PATCH net v2 2/3] unix/dgram: fix peeking with an offset larger than data in queue

2013-04-29 Thread Cong Wang
On Fri, 26 Apr 2013 at 18:35 GMT, Benjamin Poirier bpoir...@suse.de wrote: struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned int flags, - int *peeked, int *off, int *err) + int *peeked, int *_off, int *err) { -

[PATCH net v2 2/3] unix/dgram: fix peeking with an offset larger than data in queue

2013-04-26 Thread Benjamin Poirier
Currently, peeking on a unix datagram socket with an offset larger than len of the data in the sk receive queue returns immediately with bogus data. That's because *off is not reset between each skb_queue_walk(). This patch fixes this so that the behavior is the same as peeking with no offset on

[PATCH net v2 2/3] unix/dgram: fix peeking with an offset larger than data in queue

2013-04-26 Thread Benjamin Poirier
Currently, peeking on a unix datagram socket with an offset larger than len of the data in the sk receive queue returns immediately with bogus data. That's because *off is not reset between each skb_queue_walk(). This patch fixes this so that the behavior is the same as peeking with no offset on