From patchwork Tue Jun 13 08:59:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 9783349 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7153460325 for ; Tue, 13 Jun 2017 08:59:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 66214274D1 for ; Tue, 13 Jun 2017 08:59:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5AF8A2866B; Tue, 13 Jun 2017 08:59:37 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C386227FAE for ; Tue, 13 Jun 2017 08:59:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752565AbdFMI70 (ORCPT ); Tue, 13 Jun 2017 04:59:26 -0400 Received: from mail-lf0-f53.google.com ([209.85.215.53]:36763 "EHLO mail-lf0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752401AbdFMI7Y (ORCPT ); Tue, 13 Jun 2017 04:59:24 -0400 Received: by mail-lf0-f53.google.com with SMTP id o83so65126622lff.3 for ; Tue, 13 Jun 2017 01:59:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=HYHQNaFwIRKkbNEwBmHdU6EwnBABmNK5BdBo3wnmHXI=; b=cNG3mlu2HiowIJjQYA/3pgioh9rs6Q1cjXBOWicJ/T8iN0WFnshf9uBhRjaCBXqJVz xWmy7p7XQrLK1VrOyXPe95Lc5DhLimDf5VNfZeMNk+eeKEogi/AoHTIQQbKBYF7oxJVS oAvBU3O8Xgs/6tYlRrzjtLPQm/FUaVMonKWFA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=HYHQNaFwIRKkbNEwBmHdU6EwnBABmNK5BdBo3wnmHXI=; b=oL4Jofj6jW03P88udwELLWcRellqPRkeWJBrFPVCEYERIKxUJWkpD+c+txjui2rxh0 85XcwMYWlzZn0j1+ccKW6fSr/ri/adHH8/Rf2XuJJb/UQydBrQ8IDXQ1I6gXDQ15UuSD kTwyhTigX1MERzW3xlUc6SCff+V6lwQwPPW5VnMvX/ugincS8M4kK8f7iYrE3y0xuhxk NCy01tcZ+Ueyd3wWeFjt96HhAIQs+e9TcrXRvG/drbfmSMkx/Lo5Y4ItAziOwrOS9gI4 37nGEG7YKdgJLszmECnZTdE5CtE7AXtVLQjVmZRhKlsGjgWas7axPFY0NNuSgiqdrt4e pTgg== X-Gm-Message-State: AODbwcCxsoZNMdTsuF4mRrDLCtSI/RSRJXaEtqKYYRMlaHHHbS6k8g5A CMF0d3B7rqdpRd69huOXRA== X-Received: by 10.46.22.4 with SMTP id w4mr10729660ljd.76.1497344357690; Tue, 13 Jun 2017 01:59:17 -0700 (PDT) Received: from genomnajs.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id 99sm3255284lfr.62.2017.06.13.01.59.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 13 Jun 2017 01:59:16 -0700 (PDT) From: Linus Walleij To: linux-mmc@vger.kernel.org, Ulf Hansson , Heiner Kallweit Cc: Linus Walleij Subject: [PATCH] mmc: queue: Drop call to blk_cleanup_queue() Date: Tue, 13 Jun 2017 10:59:06 +0200 Message-Id: <20170613085906.5726-1-linus.walleij@linaro.org> X-Mailer: git-send-email 2.9.4 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP commit 0d8587376878c8da5a4953025e621c5dceb8b76a "mmc: core: Allocate per-request data using the block layer core" added a call to blk_cleanup_queue() into the mmc_cleanup_queue() call. This might look intutitive (and that is why I made the mistake), since the cleanup is called if we fail in mmc_init_queue(), but due to the nature of the MMC stack we are cleaning up the queue inside the stack once the queue has been started. The actual call to blk_cleanup_queue() is in mmc_blk_put() in block.c, calling it twice wreaks havoc. Fixes: 0d8587376878 ("mmc: core: Allocate per-request data using the block layer core") Reported-by: Heiner Kallweit Signed-off-by: Linus Walleij --- drivers/mmc/core/queue.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/mmc/core/queue.c b/drivers/mmc/core/queue.c index 4bf9978b707a..ba689a2ffc51 100644 --- a/drivers/mmc/core/queue.c +++ b/drivers/mmc/core/queue.c @@ -312,7 +312,6 @@ void mmc_cleanup_queue(struct mmc_queue *mq) q->queuedata = NULL; blk_start_queue(q); spin_unlock_irqrestore(q->queue_lock, flags); - blk_cleanup_queue(mq->queue); mq->card = NULL; }