From patchwork Fri Oct 23 20:02:42 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Pitre X-Patchwork-Id: 36824 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [18.85.46.34]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A5710B7BE8 for ; Sat, 24 Oct 2009 07:05:04 +1100 (EST) Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1N1QLc-0006TS-4V; Fri, 23 Oct 2009 20:02:52 +0000 Received: from relais.videotron.ca ([24.201.245.36]) by bombadil.infradead.org with esmtp (Exim 4.69 #1 (Red Hat Linux)) id 1N1QLU-0006Mr-9w for linux-mtd@lists.infradead.org; Fri, 23 Oct 2009 20:02:49 +0000 MIME-version: 1.0 Received: from xanadu.home ([66.130.28.92]) by VL-MO-MR003.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0KRZ00APJH0IGAB0@VL-MO-MR003.ip.videotron.ca> for linux-mtd@lists.infradead.org; Fri, 23 Oct 2009 16:02:42 -0400 (EDT) Date: Fri, 23 Oct 2009 16:02:42 -0400 (EDT) From: Nicolas Pitre X-X-Sender: nico@xanadu.home To: Antonio Ospite Subject: [PATCH] MTD: add missing put_chip() in cfi_intelext_reset() In-reply-to: <20091023000533.57893593.ospite@studenti.unina.it> Message-id: References: <20091023000533.57893593.ospite@studenti.unina.it> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20091023_160244_551004_7FF59D8A X-CRM114-Status: GOOD ( 17.20 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.2.5 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- _SUMMARY_ Cc: openezx-devel@lists.openezx.org, linux-mtd@lists.infradead.org X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-mtd-bounces@lists.infradead.org Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Signed-off-by: Nicolas Pitre --- On Fri, 23 Oct 2009, Antonio Ospite wrote: > Hi, > > I am attaching a trace of a possible recursive locking in > cfi_cmdset_0001.c This patch should fix it. diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index e7563a9..d923a2d 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -2564,6 +2564,7 @@ static int cfi_intelext_reset(struct mtd_info *mtd) if (!ret) { map_write(map, CMD(0xff), chip->start); chip->state = FL_SHUTDOWN; + put_chip(map, chip, chip->start); } spin_unlock(chip->mutex); }