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

From: Cong Wang
Date: Mon Apr 29 2013 - 03:01:58 EST


On Fri, 26 Apr 2013 at 18:35 GMT, Benjamin Poirier <bpoirier@xxxxxxx> 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 sk_buff *skb;
> + struct sk_buff *skb, *last;
> long timeo;
> /*
> * Caller is allowed not to check sk->sk_err before skb_recv_datagram()
> @@ -182,14 +183,17 @@ struct sk_buff *__skb_recv_datagram(struct sock *sk, unsigned int flags,
> */
> unsigned long cpu_flags;
> struct sk_buff_head *queue = &sk->sk_receive_queue;
> + int off = *_off;
>

Name the local variable '_off', not the function argument.
Or pick another name, e.g. 'offset'.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/