Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752110Ab3D2HBz (ORCPT ); Mon, 29 Apr 2013 03:01:55 -0400 Received: from plane.gmane.org ([80.91.229.3]:58107 "EHLO plane.gmane.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780Ab3D2HBy (ORCPT ); Mon, 29 Apr 2013 03:01:54 -0400 X-Injected-Via-Gmane: http://gmane.org/ To: linux-kernel@vger.kernel.org From: Cong Wang Subject: Re: [PATCH net v2 2/3] unix/dgram: fix peeking with an offset larger than data in queue Date: Mon, 29 Apr 2013 07:01:39 +0000 (UTC) Message-ID: References: <1366915736.8964.171.camel@edumazet-glaptop> <1367001312-6719-1-git-send-email-bpoirier@suse.de> <1367001312-6719-2-git-send-email-bpoirier@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 182.241.5.213 User-Agent: slrn/0.9.9p1 (Linux) Cc: netdev@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 965 Lines: 19 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 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/