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: 104347 Delivered-To: patch@linaro.org Received: by 10.140.91.77 with SMTP id y71csp301661qgd; Tue, 13 Jun 2017 01:59:40 -0700 (PDT) X-Received: by 10.98.28.74 with SMTP id c71mr35117939pfc.154.1497344380199; Tue, 13 Jun 2017 01:59:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497344380; cv=none; d=google.com; s=arc-20160816; b=yG49F/CGJGTG5Z+26Di/ZX7syWR/U+G5QQPYoqbyg1RDEa8LlSnIimvL3Vg+YyUvB+ HPysnDP0rFmk+AKt2z1MoH6yTL+QIQLLaAJ/sMB06L5KLNT/3CzZyhQKVPZip3jJrfON 1JEbMX5HMWf5PJDJOvbJImMkIJ6N11OOCWmqVfF5VKeraLiFhdoRp8FNRv3HsBXrAzSj h7VWB3klBMD6Di8EW0MJInwrIqN10AaIj6NAB+iKi4NLO0DCtvkGM0cBnJTO6HPWY982 nIwu6iY0bo4DIrNfVYAXY9YMzOSzU89Tjzo3GXcl0JlaGmtqu4NbKyQfTkfg9QVsl/ej /JqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=hs4L657ED2p0rdS5a1qkAb0XtWRGcKBEJdrMYa3bO7A=; b=cFYRu4TzyNLH9J1NKJfSay87473eg9+8ubhWeV+e9562VzVIAeFKVmiEr/sQ2k6BPX xXj3F3dvPXm67soGy6xwlUnU4VaRXPDH+M7jb250KbyyEFNxI9bYKM0e0RSxLlWUeZ0+ fcvn93kJGrQ7X5jxl5f+CZHzv+/74HrOhLtkz8GodpOLNVTINAx4DgGiLn9X1KT9Um0f LEmWHtxxpVLPlmEdPvJdte3irvHZZV3dnuBAyNmGz34Ws+ac84eeVmkFW/xjy8EkuWY7 NN0H70+gsffKp+C6bKYIgYDpujhPmBAIzqm7nUqWCUL4bturkFAKMXGtlq3uEP5CT3oT 9B6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a187si966725pge.160.2017.06.13.01.59.39; Tue, 13 Jun 2017 01:59:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752565AbdFMI70 (ORCPT + 6 others); 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 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(-) -- 2.9.4 -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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; }