Thread (13 messages) read the whole thread 13 messages, 6 authors, 2012-08-30

Re: [Xen-devel] [PATCH] netvm: check for page == NULL when propogating the skb->pfmemalloc flag

From: Konrad Rzeszutek Wilk <hidden>
Date: 2012-08-14 13:38:14
Also in: linux-mm, lkml, xen-devel

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:
quoted
On Wed, Aug 08, 2012 at 03:50:46PM -0700, David Miller wrote:
quoted
From: Mel Gorman <mgorman@suse.de>
Date: Tue, 7 Aug 2012 09:55:55 +0100
quoted
Commit [c48a11c7: netvm: propagate page->pfmemalloc to skb] is responsible
for the following bug triggered by a xen network driver
 ...
quoted
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 <redacted>
Signed-off-by: Mel Gorman <mgorman@suse.de>
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) <sigh>
-- 
Mel Gorman
SUSE Labs
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help