From patchwork Mon Feb 3 13:56:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 316160 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:770:15f::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A86172C0098 for ; Tue, 4 Feb 2014 00:56:57 +1100 (EST) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAK0v-0005pt-F4; Mon, 03 Feb 2014 13:56:41 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAK0t-0001DS-RH; Mon, 03 Feb 2014 13:56:39 +0000 Received: from b.ns.miles-group.at ([95.130.255.144] helo=radon.swed.at) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WAK0s-0001Cn-CW for linux-mtd@lists.infradead.org; Mon, 03 Feb 2014 13:56:38 +0000 Received: (qmail 12333 invoked by uid 89); 3 Feb 2014 13:56:16 -0000 Received: by simscan 1.3.1 ppid: 12325, pid: 12329, t: 0.0860s scanners: attach: 1.3.1 clamav: 0.96.5/m: Received: from unknown (HELO ?10.1.1.199?) (richard@nod.at@91.114.127.102) by radon.swed.at with ESMTPA; 3 Feb 2014 13:56:16 -0000 Message-ID: <52EF9FFE.4020405@nod.at> Date: Mon, 03 Feb 2014 14:56:14 +0100 From: Richard Weinberger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: "Wiedemer, Thorsten (Lawo AG)" Subject: Re: UBI leb_write_unlock NULL pointer Oops (continuation) References: <52EF772D.8080207@nod.at> In-Reply-To: X-Enigmail-Version: 1.6 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140203_085638_646618_8540A827 X-CRM114-Status: GOOD ( 12.30 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: "linux-mtd@lists.infradead.org" X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Am 03.02.2014 13:51, schrieb Wiedemer, Thorsten (Lawo AG): > Hi, > > I can reproduce it fairly regularly, but not really "quickly". At the moment, I can use a setup of about identical 70 devices. > A test over the last weekend resultet In 6 devices showing the bug. > What we have are multiple processes which write in different intervals some data on the device and sync it, because this data should be available after a power cut. > Perhaps I can force the error more often in writing test processes with shorter write/sync intervals. > > If I have further access to the "big" setup for some days, I will try to make a test without preemption. Hmm, ok. Please also apply this patch, just in case... Thanks, //richard diff --git a/drivers/mtd/ubi/eba.c b/drivers/mtd/ubi/eba.c index 0e11671d..48fd2aa 100644 --- a/drivers/mtd/ubi/eba.c +++ b/drivers/mtd/ubi/eba.c @@ -301,6 +301,7 @@ static void leb_write_unlock(struct ubi_device *ubi, int vol_id, int lnum) spin_lock(&ubi->ltree_lock); le = ltree_lookup(ubi, vol_id, lnum); + ubi_assert(le); le->users -= 1; ubi_assert(le->users >= 0); up_write(&le->mutex);