Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp251158yba; Mon, 20 May 2019 08:08:15 -0700 (PDT) X-Google-Smtp-Source: APXvYqxl3ZcHamdfQa0WqWD5PiO3OAeyPAsf7eVJ19Rqgwf2qMafL/rwBSSNRqweUJqSVNwek2ZM X-Received: by 2002:a17:902:2883:: with SMTP id f3mr50615176plb.26.1558364895445; Mon, 20 May 2019 08:08:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558364895; cv=none; d=google.com; s=arc-20160816; b=QNxNpWtEB8VWs3/u/9QBCBbfWkjzF5vl1Qstu2hMDlDlzP3QLolI9JPurny2cGS5Ir 8LOy9XRM2USPgDhU4JYcmLxqfuk/riFFyy6HckKnFQytVf9o/OA5qo5ovAgs5SLkPeW/ RFF0Ay6J+U4XMpITbKpyyt8QHyts7itkOBjB+n0phWOlZsLSrJ2wEitk58TEAJ+BrliW Vf5FEN9Ia/w+jCO1yLNh3gveHSoGzTmrkmJD60DlXFU2llof6AkKOFNway5ig38ujPRD NcVO0M1F1E1OEm6a/IfR/HPZ+h1FUWT2RYHwCvsQUgK4AD4JoNmu9oq/VlNNB2JWnNyQ oSuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=znM9l4Q2Uf3m9zaLTq0Lwjjn3vfM6PD2RDHO0s7KWDA=; b=otiqTGZfFBvC+SzW7N7Fm3O4N6Dapqg5+rZZUlTO4hQOtVHZZby2qXyeSVY6rS2RY/ V2ILZDfJZjGJ46saNNUpTBUExHKzEfywShqiYclvccfrudaZFPDUxGYK6aWV4AqcKP+O 7cfkdzcqTMEGUH9jf9Mo0qiW28AV5kEq80HlsfaUafaHMqILa7N45srG8N15TXa5qXN5 T46ZTMxPXY3M6uUG03z6zrn/c0NqvgwpuailogIHU8b7S15cnWB2SyaYY8YPlBkQ4XTi OQrYCcOpmQ/YXigBaSUbokzY4v7lO0Z9KP3b+kggrTe3rV8cV2RTQyAn40edxNmboLw/ PSXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="pMMRsp/G"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m34si18302013pgb.324.2019.05.20.08.07.59; Mon, 20 May 2019 08:08:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="pMMRsp/G"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388363AbfETMWO (ORCPT + 99 others); Mon, 20 May 2019 08:22:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:36156 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388355AbfETMWM (ORCPT ); Mon, 20 May 2019 08:22:12 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1584621019; Mon, 20 May 2019 12:22:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558354932; bh=BNMAL5BQel9VBIquhmcC/3N4kEa6RuB+goYw1Elgy9Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pMMRsp/GUFQ2GtV2cgMSKiUm424TeAOVfY8gc/x98r3u/NbTUTn8qf2aNlYnng4vT 466TtlRjQ3su2dPlJ30YPWsNFJsgACgceYzZ6ipRi9+EhmNQyAIcW5q20FNjy4lzb7 XzzOU40ioi4RBrKyp7wCAX/Fn3j2IfpPurTEYuvY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Raul E Rangel , Jens Axboe , Adrian Hunter , Ulf Hansson Subject: [PATCH 4.19 032/105] mmc: core: Fix tag set memory leak Date: Mon, 20 May 2019 14:13:38 +0200 Message-Id: <20190520115249.274436542@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520115247.060821231@linuxfoundation.org> References: <20190520115247.060821231@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Raul E Rangel commit 43d8dabb4074cf7f3b1404bfbaeba5aa6f3e5cfc upstream. The tag set is allocated in mmc_init_queue but never freed. This results in a memory leak. This change makes sure we free the tag set when the queue is also freed. Signed-off-by: Raul E Rangel Reviewed-by: Jens Axboe Acked-by: Adrian Hunter Fixes: 81196976ed94 ("mmc: block: Add blk-mq support") Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/queue.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/mmc/core/queue.c +++ b/drivers/mmc/core/queue.c @@ -494,6 +494,7 @@ void mmc_cleanup_queue(struct mmc_queue blk_mq_unquiesce_queue(q); blk_cleanup_queue(q); + blk_mq_free_tag_set(&mq->tag_set); /* * A request can be completed before the next request, potentially