From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2vWK-0003uf-5m for linux-mtd@lists.infradead.org; Sat, 05 Nov 2016 07:36:09 +0000 Received: by mail-wm0-x243.google.com with SMTP id c17so7123034wmc.3 for ; Sat, 05 Nov 2016 00:35:47 -0700 (PDT) Subject: Re: [PATCH] mtd: Allocate bdi objects dynamically To: Sandeep Jain , Richard Weinberger References: <1470319275-9465-1-git-send-email-Sandeep_Jain@mentor.com> <20161103113421.GA4873@mentor.com> Cc: Steve Longerbeam , LKML , Jim Baxter , "linux-mtd@lists.infradead.org" , Brian Norris , David Woodhouse From: Marek Vasut Message-ID: <4055a3ed-c024-4c29-45e1-e600cdc5902e@gmail.com> Date: Sat, 5 Nov 2016 08:22:31 +0100 MIME-Version: 1.0 In-Reply-To: <20161103113421.GA4873@mentor.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 11/03/2016 12:34 PM, Sandeep Jain wrote: > Dear Maintainers, > This patch is reviewed by Richard. > Requesting for Maintainer's attention for patch merge. > > Thanks & Regards, > Sandeep Jain > > On Sat, Sep 17, 2016 at 04:41:47PM +0200, Richard Weinberger wrote: >> On Thu, Aug 4, 2016 at 4:01 PM, Sandeep Jain wrote: >>> From: Steve Longerbeam >>> >>> The MTD backing dev info objects mtd_bdi was statically allocated. >>> So when MTD is built as a loadable module, this object fall in the >>> vmalloc address space. >>> >>> The problem with that, is that the BDI APIs use wake_up_bit(), which calls >>> virt_to_page() to retrieve the memory zone of the page containing the >>> wait_queue to wake up, and virt_to_page() is not valid for vmalloc or >>> highmem addresses. >>> >>> Fix this by allocating the BDI objects dynamically with kmalloc. The >>> objects now fall in the logical address space so that BDI APIs will >>> work in all cases (mtd builtin or module). >>> >>> Signed-off-by: Steve Longerbeam >>> Signed-off-by: Jim Baxter >>> Signed-off-by: Sandeep Jain >> >> Reviewed-by: Richard Weinberger I don't see any obvious problem either: Reviewed-by: Marek Vasut -- Best regards, Marek Vasut