Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752148Ab2HNNiO (ORCPT ); Tue, 14 Aug 2012 09:38:14 -0400 Received: from acsinet15.oracle.com ([141.146.126.227]:25712 "EHLO acsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751226Ab2HNNiM (ORCPT ); Tue, 14 Aug 2012 09:38:12 -0400 Date: Tue, 14 Aug 2012 09:28:03 -0400 From: Konrad Rzeszutek Wilk To: Mel Gorman Cc: David Miller , Ian Campbell , xen-devel@lists.xensource.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, konrad@darnok.org, akpm@linux-foundation.org Subject: Re: [Xen-devel] [PATCH] netvm: check for page == NULL when propogating the skb->pfmemalloc flag Message-ID: <20120814132803.GC10880@phenom.dumpdata.com> References: <20120807085554.GF29814@suse.de> <20120808.155046.820543563969484712.davem@davemloft.net> <20120813154144.GA24868@phenom.dumpdata.com> <20120814100522.GL4177@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120814100522.GL4177@suse.de> User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: acsinet22.oracle.com [141.146.126.238] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1640 Lines: 40 On Tue, Aug 14, 2012 at 11:05:22AM +0100, Mel Gorman wrote: > On Mon, Aug 13, 2012 at 11:41:44AM -0400, Konrad Rzeszutek Wilk wrote: > > On Wed, Aug 08, 2012 at 03:50:46PM -0700, David Miller wrote: > > > From: Mel Gorman > > > Date: Tue, 7 Aug 2012 09:55:55 +0100 > > > > > > > Commit [c48a11c7: netvm: propagate page->pfmemalloc to skb] is responsible > > > > for the following bug triggered by a xen network driver > > > ... > > > > The problem is that the xenfront driver is passing a NULL page to > > > > __skb_fill_page_desc() which was unexpected. This patch checks that > > > > there is a page before dereferencing. > > > > > > > > Reported-and-Tested-by: Konrad Rzeszutek Wilk > > > > Signed-off-by: Mel Gorman > > > > > > That call to __skb_fill_page_desc() in xen-netfront.c looks completely bogus. > > > It's the only driver passing NULL here. > > > > It looks to be passing a valid page pointer (at least by looking > > at the code) so I am not sure how it got turned in a NULL. > > > > Are we looking at different code bases? I see this and I was assuming it > was the source of the bug. > > __skb_fill_page_desc(skb, 0, NULL, 0, 0); Yes! Well, that is embarrassing. I was looking at the first invocation of __skb_fill_page_desc (which is in xennet_alloc_rx_buffers) > > -- > Mel Gorman > SUSE Labs -- 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/