From patchwork Wed Aug 7 07:50:42 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ming Lei X-Patchwork-Id: 2839969 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E5F2FBF535 for ; Wed, 7 Aug 2013 07:51:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8B4C4201ED for ; Wed, 7 Aug 2013 07:51:11 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 676E4201EB for ; Wed, 7 Aug 2013 07:51:10 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V6yWS-0005iB-EW; Wed, 07 Aug 2013 07:51:08 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1V6yWQ-00079w-8N; Wed, 07 Aug 2013 07:51:06 +0000 Received: from mail-ve0-x22c.google.com ([2607:f8b0:400c:c01::22c]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1V6yWO-00079F-4T for linux-arm-kernel@lists.infradead.org; Wed, 07 Aug 2013 07:51:04 +0000 Received: by mail-ve0-f172.google.com with SMTP id oz10so1428309veb.31 for ; Wed, 07 Aug 2013 00:50:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=G3XQzI9H+Hdwb1A3+jW2ScPCBo8eynlv0GuC9n5ohSY=; b=JDszN0Y0DVhodFjgxAFMLjIsFTkXKgo/RsUJGW6lWE+d5PiXWCI7JmrB/8sLkaLWWS mkZlVKYMptN16ibuTzjgr1FIX3woLlJUcRh07+Iq6Kupirm3juJUTcvDFllEo3pPoz9z aKeKkdUb78zKCNYWtmJo1IJp4+N96LkzXcJHWc/uSlEduxMm2W7PATdMT5EDcwOoQYda Ep/HkdDqvqYKm+PWwK8tuJLEpB1IXo5S6JZkstOKF2vTkn+Jk3WI9PZn2h/M8lRV+rPT H+Q01parIlN+f/5oyzKZlKQfG0qs+7DuyMnQDXFxtwekovK7nMLhV7TCmNuKYrORBkRj bobw== MIME-Version: 1.0 X-Received: by 10.58.236.42 with SMTP id ur10mr601909vec.48.1375861842343; Wed, 07 Aug 2013 00:50:42 -0700 (PDT) Received: by 10.220.14.67 with HTTP; Wed, 7 Aug 2013 00:50:42 -0700 (PDT) In-Reply-To: <20130807054111.GQ16694@cbox> References: <20130807054111.GQ16694@cbox> Date: Wed, 7 Aug 2013 15:50:42 +0800 Message-ID: Subject: Re: VM Kernel bug with CONFIG_DEBUG_VM From: Ming Lei To: Christoffer Dall X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130807_035104_217882_98C32B3D X-CRM114-Status: GOOD ( 14.39 ) X-Spam-Score: -2.0 (--) Cc: Catalin Marinas , linux-usb , linux-arm-kernel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Wed, Aug 7, 2013 at 1:41 PM, Christoffer Dall 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? Thanks, 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 */