Received: by 10.223.176.5 with SMTP id f5csp995938wra; Fri, 2 Feb 2018 09:25:50 -0800 (PST) X-Google-Smtp-Source: AH8x224V8ShgXPZoVi3vAIKTqvwwebSqKqy9jsBj598aR/fweLyWX69OZimCm4GuqxB+d6JwOs8r X-Received: by 10.99.136.200 with SMTP id l191mr644796pgd.384.1517592350784; Fri, 02 Feb 2018 09:25:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517592350; cv=none; d=google.com; s=arc-20160816; b=kV28Z+TKuBE2nQCgOP9Xy/KZDAqQEBYcqyYwhKCdp9W2k5j3jbNEKfqFQYyduQAhAM NMzZk6GZ6tYJ3Wsah0huOic3+h8duXW1QXQOthh6BUJvtH2i7wvH1uhpSjIkiqCCVNJI WhsnDz+at2JDwLFNlP2E+fMfcm9U4Mx26ohH8876lxOdydJNtnJd081A49+dQJRHheV9 8MlJqyiH0ImNXUIYTmz6KxrPuQwGzEYTc+4+zdS3NaVIhUUKA4l1OXMamFyKv6aBgwqG JNRIe1AAGsZhgSwBcBI1eEA/z9CsO+yY5Vr/gzfA25oZCnfohnvUJ/Xd2a3qcBXaPxLz PAVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=EY+5m2+u6p9C4WuvCbuyf9kSPM4+GNLN3Y0xyeO1WFg=; b=I1DdnQdFjk4BJnnzqfHf/5WE3puXZ848UvlZc89s9lyI3b55ijzgnn6xV22REf/9lV XSVyPSkTy5/og4hvVCEyMZEk67w17j49g8tJALuXMqLl56fCu8xN9v5T6hCWDjE5BRxh Q0OqKJiX1oQ6JDzAwxFtdhI+MaF+eOJlV3zAQA/0gQ/rdbLnESJ8rRIihsTHH1+ZRmiN s9XksClvDM1fur8QbFVfNtB3ZrxSvbHjATE64HEEdx0MvpESU3Dd+anbjdELY/QgrbHs WuVLViSPSIf1cIczrgqfuTZcBM/liIyU5OXG2MN0OXzkRWD6imMDCdZ/O4SINSqHpCRl EL9w== ARC-Authentication-Results: i=1; mx.google.com; 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 a81si1589317pfc.258.2018.02.02.09.25.35; Fri, 02 Feb 2018 09:25:50 -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; 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 S1752022AbeBBRXQ (ORCPT + 99 others); Fri, 2 Feb 2018 12:23:16 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:40430 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753588AbeBBROO (ORCPT ); Fri, 2 Feb 2018 12:14:14 -0500 Received: from localhost (LFbn-1-12258-90.w90-92.abo.wanadoo.fr [90.92.71.90]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id DF85EED5; Fri, 2 Feb 2018 17:14:09 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wei Yongjun Subject: [PATCH 4.14 153/156] test_firmware: fix missing unlock on error in config_num_requests_store() Date: Fri, 2 Feb 2018 17:58:54 +0100 Message-Id: <20180202140847.315236310@linuxfoundation.org> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180202140840.242829545@linuxfoundation.org> References: <20180202140840.242829545@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Wei Yongjun commit a5e1923356505e46476c2fb518559b7a4d9d25b1 upstream. Add the missing unlock before return from function config_num_requests_store() in the error handling case. Fixes: c92316bf8e94 ("test_firmware: add batched firmware tests") Signed-off-by: Wei Yongjun Signed-off-by: Greg Kroah-Hartman --- lib/test_firmware.c | 1 + 1 file changed, 1 insertion(+) --- a/lib/test_firmware.c +++ b/lib/test_firmware.c @@ -371,6 +371,7 @@ static ssize_t config_num_requests_store if (test_fw_config->reqs) { pr_err("Must call release_all_firmware prior to changing config\n"); rc = -EINVAL; + mutex_unlock(&test_fw_mutex); goto out; } mutex_unlock(&test_fw_mutex);