From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from hd5b91d02.k46641.sta.perspektivbredband.net ([213.185.29.2] helo=fg-dc1.flatfrog.local) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1RqTXA-00053j-6t for linux-mtd@lists.infradead.org; Thu, 26 Jan 2012 17:54:52 +0000 Message-ID: <4F219369.3040208@flatfrog.com> Date: Thu, 26 Jan 2012 18:54:49 +0100 From: Orjan Friberg MIME-Version: 1.0 To: Paul Walmsley Subject: Re: CONFIG_PREEMPT and JFFS2 oops References: <4F206213.9070704@flatfrog.com> <4F2127B8.9000005@flatfrog.com> <4F213ED8.2020500@flatfrog.com> In-Reply-To: Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit Cc: "linux-mtd@lists.infradead.org" , Richard Purdie , "linux-omap@vger.kernel.org" , David Woodhouse , Joakim Tjernlund List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On 01/26/2012 05:57 PM, Paul Walmsley wrote: >> >> You just throw away best_buf here, don't you? > > You're right. It's even worse than that. best_buf will contain the data > from the last compressor used. And it will be prematurely freed. Here's > a fixed version. I've tested this version for a while now with the same result as before. No oopses, no spinlock violations. I copied a 2MB file from the SD/MMC partition to the two JFFS2 partitions and md5summ'ed it a bunch of times. After that I unmounted and remounted both partitions. I do see a steady memory usage increase when doing continuous testing, but whether that's normal I don't know. I see at least some of it being reclaimed when unmounting the JFFS2 partitions (grep jffs2 /proc/slabinfo). -- Orjan Friberg FlatFrog Laboratories AB