VM Kernel bug with CONFIG_DEBUG_VM

Ming Lei tom.leiming at gmail.com
Wed Aug 7 03:50:42 EDT 2013


On Wed, Aug 7, 2013 at 1:41 PM, Christoffer Dall
<christoffer.dall at linaro.org> wrote:
> Hi all,
>
> I've found that booting a recent kernel (and as far back as 3.9 at
> least) I get a kernel bug during boot with VM debugging enabled.  I
> haven't had time to dig further into it, but wanted to check if this is
> a known issue?

Remember Catalin introduced the flush_dcache_page() to fix
cache incoherency problem when PIO reading from USB mass
storage device to mapped page, so the flush should not need
for pages not in page cache.

Care to test below patch to see if the problem can be fixed?

diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
index 2facee5..9d47c71 100644
--- a/drivers/usb/host/isp1760-hcd.c
+++ b/drivers/usb/host/isp1760-hcd.c
@@ -707,8 +707,12 @@ __acquires(priv->lock)
 		void *ptr;
 		for (ptr = urb->transfer_buffer;
 		     ptr < urb->transfer_buffer + urb->transfer_buffer_length;
-		     ptr += PAGE_SIZE)
-			flush_dcache_page(virt_to_page(ptr));
+		     ptr += PAGE_SIZE) {
+			struct page *page = virt_to_page(ptr);
+			if (PageSlab(page))
+				break;
+			flush_dcache_page(page);
+		}
 	}

 	/* complete() can reenter this HCD */


Thanks,
-- 
Ming Lei



More information about the linux-arm-kernel mailing list