Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp873698imm; Tue, 5 Jun 2018 05:58:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJvO3/ChoCTrlI5u0HvN6ZuOpBanNaauljh6j2pm0NEy433VA/Q8Sf9oOzdPC4eoLmmzw1E X-Received: by 2002:a62:f407:: with SMTP id r7-v6mr16023728pff.47.1528203482465; Tue, 05 Jun 2018 05:58:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528203482; cv=none; d=google.com; s=arc-20160816; b=S1hpefpLWXTMErHRMf+TCIgvKO6nJQ4/pT8dR6eVifmuduWML62cfw8QBkYibF9RRu 70G4qIZxSGyNN2hsYzRRAf/gHFyC5qK/CeyWIwbXE080XxaDBvU+KEZaLBadymltIpNi N5y/zvPkEoh7PASs9gP58hqHh5/7iKwixLUBtyyQkHO49dvIMAnjiT3rlxxLd+kfDngh E5LfzuLQ3k6xDXxuA/YjMgRVsuHxC7IgLjVHJabS1Duqn/xcWoErLjB9PKlV5ndSWdES UNqp3Z+62bPr+ZHbFkqOa/iA5qz7Yt/AaA20ZhomNv/RoIgkzRvSgHYFKgOzSQpdLoX0 WQ3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date:from :references:cc:to:subject:arc-authentication-results; bh=2BiT+GP2k3KErpGtXsD+mSXHtjmsZnWLaTlL73N1NP8=; b=jhDn7cBxRSJrrornMtGJyUWGa7dhN5DdBxDgfBCOiXjeiLxcDsO7I2oStpZQQhHBJx LkqYAeLhLn3L6Q+vF1v+MSUbIR0kktnYXFgVnFSfSf0Vu65ge1cajX0R52BUDdt8A3Np pgZ/C9J+0uHKMf5tkzylOEj5lQ9RyFKjJYIFZ3n9Dt5zCCvV+xiBcJ72cpTqrekTRDW9 a6A58z6FBQhS5rUd+4vKY3joau44US37DXSA9mobhuO4kXrKUvXtj37RGW82RTsPMGCl YA8mOhx5NYNHtJZWJwUK4rEAHVW8kJhLy/65A5+wuePpTirUR7QLunDbEOVZ7eHaDOON MU3w== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n10-v6si10416441pgs.485.2018.06.05.05.57.48; Tue, 05 Jun 2018 05:58:02 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751901AbeFEM5L (ORCPT + 99 others); Tue, 5 Jun 2018 08:57:11 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:33190 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622AbeFEM5J (ORCPT ); Tue, 5 Jun 2018 08:57:09 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w55CsLkq119152 for ; Tue, 5 Jun 2018 08:57:08 -0400 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100] (may be forged)) by mx0a-001b2d01.pphosted.com with ESMTP id 2jdtbgss43-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 05 Jun 2018 08:57:08 -0400 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 5 Jun 2018 13:57:06 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 5 Jun 2018 13:57:02 +0100 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w55Cv1we26083374 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 5 Jun 2018 12:57:01 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0A60E4C040; Tue, 5 Jun 2018 13:48:23 +0100 (BST) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 9D1C84C052; Tue, 5 Jun 2018 13:48:22 +0100 (BST) Received: from [9.143.107.66] (unknown [9.143.107.66]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 5 Jun 2018 13:48:22 +0100 (BST) Subject: Re: [PATCH -next] ocxl: Fix missing unlock on error in afu_ioctl_enable_p9_wait() To: Wei Yongjun , Frederic Barrat , Andrew Donnellan , Arnd Bergmann , Greg Kroah-Hartman , "Alastair D'Silva" Cc: linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org References: <1528190181-15745-1-git-send-email-weiyongjun1@huawei.com> From: Frederic Barrat Date: Tue, 5 Jun 2018 14:57:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <1528190181-15745-1-git-send-email-weiyongjun1@huawei.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 x-cbid: 18060512-0016-0000-0000-000001D85A2B X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18060512-0017-0000-0000-0000322B6020 Message-Id: X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-05_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806050150 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 05/06/2018 à 11:16, Wei Yongjun a écrit : > Add the missing unlock before return from function > afu_ioctl_enable_p9_wait() in the error handling case. > > Fixes: e948e06fc63a ("ocxl: Expose the thread_id needed for wait on POWER9") > Signed-off-by: Wei Yongjun > --- > drivers/misc/ocxl/file.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/misc/ocxl/file.c b/drivers/misc/ocxl/file.c > index 33ae46c..e6a6074 100644 > --- a/drivers/misc/ocxl/file.c > +++ b/drivers/misc/ocxl/file.c > @@ -139,8 +139,10 @@ static long afu_ioctl_enable_p9_wait(struct ocxl_context *ctx, > // Locks both status & tidr > mutex_lock(&ctx->status_mutex); > if (!ctx->tidr) { > - if (set_thread_tidr(current)) > + if (set_thread_tidr(current)) { > + mutex_unlock(&ctx->status_mutex); > return -ENOENT; > + } O_o Thanks for fixing it Acked-by: Frederic Barrat > ctx->tidr = current->thread.tidr; > } >