From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: NULL Pointer Deference: NFS & Telnet Date: Tue, 25 May 2010 18:52:36 -0700 (PDT) Message-ID: <20100525.185236.193707791.davem@davemloft.net> References: <27F9C60D11D683428E133F85D2BB4A53043E33A997@dlee03.ent.ti.com> <27F9C60D11D683428E133F85D2BB4A53043E3EDFE6@dlee03.ent.ti.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-nfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org, santosh.shilimkar-l0cyMroinI0@public.gmane.org To: x0066660-l0cyMroinI0@public.gmane.org Return-path: In-Reply-To: <27F9C60D11D683428E133F85D2BB4A53043E3EDFE6-lTKHBJngVwKIQmiDNMet8wC/G2K4zDHf@public.gmane.org> Sender: linux-nfs-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org From: "Arce, Abraham" Date: Tue, 25 May 2010 20:48:02 -0500 > diff --git a/net/core/skbuff.c b/net/core/skbuff.c > index f8abf68..eb81f76 100644 > --- a/net/core/skbuff.c > +++ b/net/core/skbuff.c > @@ -334,7 +334,7 @@ static void skb_release_data(struct sk_buff *skb) > if (!skb->cloned || > !atomic_sub_return(skb->nohdr ? (1 << SKB_DATAREF_SHIFT) + 1 : 1, > &skb_shinfo(skb)->dataref)) { > - if (skb_shinfo(skb)->nr_frags) { > + if (skb_shinfo(skb)->nr_frags && skb_has_frags(skb)) { > int i; > for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) > put_page(skb_shinfo(skb)->frags[i].page); skb_shinfo(skb)->nr_frags counts the number of entries contained in the skb_shinfo(skb)->frags[] array. This has nothing to do with the frag list pointer, skb_shinfo(skb)->frag_list, which is what skb_has_frags() tests. You've got some kind of memory corruption going on and it appears to have nothing to do with the code paths you're playing with here. -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html