Re: VM Kernel bug with CONFIG_DEBUG_VM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 7, 2013 at 1:41 PM, Christoffer Dall
<christoffer.dall@xxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux