Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp6267059imu; Mon, 21 Jan 2019 06:06:45 -0800 (PST) X-Google-Smtp-Source: ALg8bN68dWVmOFl2MIlEi0k+qxxSHiVSTY+RS0XaJjenIJ7b2h3WdOCpbSZXGVtkjYRVkgaypY1/ X-Received: by 2002:a17:902:830a:: with SMTP id bd10mr30346363plb.321.1548079605100; Mon, 21 Jan 2019 06:06:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548079605; cv=none; d=google.com; s=arc-20160816; b=0cwoix146R0/vWh/Gdj2qzyNkm9ujb+4M0Fx5kCNTGRHZcHELGxokWHR72GffN8u8S LlY1NV25Ltgu1zFVnw2bKXoDEt9TeIAneV4JOAiN0mOLgCRDWyZHQgZIyhGLpMZvdFVz wGUnGD21mqeyPNuE40rdubATTzU400sCxCuHr+/fdw0mplcBQKFFW9BtyOPboYhsPrWd V9hJCLFSy7OOYVz6UhR6w6mWNSONISjsUvO12vOXQORPhEyNI4X8nhuELXP8FabCj9s2 jvPbV2jHrrpvxGsbWX3XKODqtI8Y3XXqtO2a1RrTAgIVMc0STrbWhB4jfqX02frzwnrU HxPQ== 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=b87WHGSngbgcs7FJegQJ8w9NZQagtZKEBdd7OgQ1m2Y=; b=L3GY+EmQnfuWxlxAYJDdUaE0Zz31I3zraDNxYJOX+suQ8yL2NWPg2J1yR6YNBa2Pe/ p7X59MG53O41GTLyskh4bQIIS+FkPmW+K1eRYQVXS7K5IFDATCO5SvZHFStTlWDDEALU Sxr7GyXOqCqZsWplnawRRVbijJU1wGMJ9j8QReem/DL6auLEgZuVMC4gv0VsnRytRdD+ KjSy6NaOxLNIk9zbKdi89Q7JkcLFfzpYY7StZ8Ga2Niz4pIHjLn/sD8pu5yaCzef/QMx ZyPcmMy/9cWErwqxA4b9HrFyK0f48GAi20LVP6pW6Dmt2/8arW8MSjoWlbeTyghY6gTV UPSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=LQP256p9; 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 63si12917782pfv.38.2019.01.21.06.06.29; Mon, 21 Jan 2019 06:06:45 -0800 (PST) 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=LQP256p9; 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 S1732842AbfAUOCj (ORCPT + 99 others); Mon, 21 Jan 2019 09:02:39 -0500 Received: from mail.kernel.org ([198.145.29.99]:50258 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731860AbfAUOCf (ORCPT ); Mon, 21 Jan 2019 09:02:35 -0500 Received: from localhost (5356596B.cm-6-7b.dynamic.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 D4A7C2089F; Mon, 21 Jan 2019 14:02:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548079354; bh=j5TUYuMAxUwgwysHUcHNI22cICAIxBgOktklSF7C2NA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LQP256p9R9xml+2WPEV+0LXVJ+MiX4e+xQYIQ5YQ+3+k6F/88Q2ahGiwydzra1KBR P8jqb+pLpNIWzJMvySz8ohM57av6ebdXlrEr6U0EaCOcjEn16gnSOOy1l1+8QrF70Y 0rheemdSENVUe2M+PpnfZjPQWMpdaHtsi91s/cPM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, syzbot , Ming Lei , Jan Kara , Tetsuo Handa , Jens Axboe Subject: [PATCH 4.19 96/99] loop: Fix double mutex_unlock(&loop_ctl_mutex) in loop_control_ioctl() Date: Mon, 21 Jan 2019 14:49:28 +0100 Message-Id: <20190121134919.830966841@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190121134913.924726465@linuxfoundation.org> References: <20190121134913.924726465@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review X-Patchwork-Hint: ignore 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 4.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tetsuo Handa commit 628bd85947091830a8c4872adfd5ed1d515a9cf2 upstream. Commit 0a42e99b58a20883 ("loop: Get rid of loop_index_mutex") forgot to remove mutex_unlock(&loop_ctl_mutex) from loop_control_ioctl() when replacing loop_index_mutex with loop_ctl_mutex. Fixes: 0a42e99b58a20883 ("loop: Get rid of loop_index_mutex") Reported-by: syzbot Reviewed-by: Ming Lei Reviewed-by: Jan Kara Signed-off-by: Tetsuo Handa Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/block/loop.c | 2 -- 1 file changed, 2 deletions(-) --- a/drivers/block/loop.c +++ b/drivers/block/loop.c @@ -2075,12 +2075,10 @@ static long loop_control_ioctl(struct fi break; if (lo->lo_state != Lo_unbound) { ret = -EBUSY; - mutex_unlock(&loop_ctl_mutex); break; } if (atomic_read(&lo->lo_refcnt) > 0) { ret = -EBUSY; - mutex_unlock(&loop_ctl_mutex); break; } lo->lo_disk->private_data = NULL;