Message ID | 20221121080049.3850133-3-yebin@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1438198wrr; Sun, 20 Nov 2022 23:40:55 -0800 (PST) X-Google-Smtp-Source: AA0mqf5nd/zpWeaNiwDUm9Skh9+F1jts3riUO+ttVOR+jER9aqmyO9GfizjdopCYlU+A+Glo8+0F X-Received: by 2002:a62:7b47:0:b0:56c:7b59:5137 with SMTP id w68-20020a627b47000000b0056c7b595137mr4667798pfc.74.1669016454940; Sun, 20 Nov 2022 23:40:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669016454; cv=none; d=google.com; s=arc-20160816; b=rIYxXvXZu3Vdlx8A2SkQROGxHNpoAAkLLr7LXhp03iAjSA1Z6HcV2cTN9oObr1HJYO DjHOA5szPHi3pV5fD41jXJHfNelCKpfa7D2/K1RNqBVSJCKGR9nkekM+0lasgbMCITUa faaH1RJ6li2OA9z4jnBF1vxZPinVjKZkao2TmNprWRJxPPMZpn3bjc0eMRJDHIqq1Gru mN4Rmd3oOifmDVwA7EeIo+jzGDeYR5acLxGEE9vLcunQQ8cLW6edUFgHINg6vLIRN7jn 04wHnVdPf2tetrsGNeuRojSV9nuYxiK6465redXTGojlJrLqk3Fqq4KyLIK5iw4TwCg1 ME5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=1wVFyNh4TdQIJ6vBzCWbE7nqdKPoS4uC8UM8dvKf2QI=; b=bPaoUIaVQ/zDd0o8LF4vBA6PfOpXpoC5plECP6IZ0w9PU+WlEIHeVrbVMb7sj7DlrG 9QmrMd19nFJ0rYY3TN2l9tI2NGi/b4mTKkizhjHJI+MKhWmo62PH04s7qOzp4XcCmL/a bZ2okk7rsqvXU9+r8bF8IXIlIBqUg2JCudnmWqMMi9BLMDnDQ3gVJCI9hVT62enDUi12 7qKRS4GrWEAU3Symd8EBMpNzXbDLkXFEu/K08dkxEi0IFnP0xF7ThTPaPnuRSDlTVMPm Oc+MeBATN6oY8R5ZLMS9Qs8nRsynHV2f3xyhglg7QNw2MvnTtBZ3RcOqUdi/S/bryYAi pZKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c17-20020a6566d1000000b00476e63cf8a4si11050103pgw.129.2022.11.20.23.40.41; Sun, 20 Nov 2022 23:40:54 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229826AbiKUHjm (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Mon, 21 Nov 2022 02:39:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51302 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229519AbiKUHji (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 21 Nov 2022 02:39:38 -0500 Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 754582D1DE; Sun, 20 Nov 2022 23:39:37 -0800 (PST) Received: from mail02.huawei.com (unknown [172.30.67.153]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4NFzmg6YCHz4f3jZb; Mon, 21 Nov 2022 15:39:31 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.127.227]) by APP4 (Coremail) with SMTP id gCh0CgC329g0K3tj2M2XAw--.53628S6; Mon, 21 Nov 2022 15:39:34 +0800 (CST) From: Ye Bin <yebin@huaweicloud.com> To: ericvh@gmail.com, lucho@ionkov.net, asmadeus@codewreck.org, linux_oss@crudebyte.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, v9fs-developer@lists.sourceforge.net, netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, yebin10@huawei.com Subject: [PATCH 2/5] 9p: fix miss release semaphore in 'rdma_request()' Date: Mon, 21 Nov 2022 16:00:46 +0800 Message-Id: <20221121080049.3850133-3-yebin@huaweicloud.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20221121080049.3850133-1-yebin@huaweicloud.com> References: <20221121080049.3850133-1-yebin@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgC329g0K3tj2M2XAw--.53628S6 X-Coremail-Antispam: 1UD129KBjvdXoW7Gw45Wr4kCw45JF43tF1fWFg_yoW3XwbE9F 4fGan3Xas7Jry7KFWjka1Fvr1kCFWxWr1xurn0ya4jkwn8Xr97Gw1jgr98Ar47CF4DCrW8 Jwn8X3yfWFy3ZjkaLaAFLSUrUUUUUb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUbfxYFVCjjxCrM7AC8VAFwI0_Wr0E3s1l1xkIjI8I6I8E6xAIw20E Y4v20xvaj40_Wr0E3s1l1IIY67AEw4v_Jr0_Jr4l82xGYIkIc2x26280x7IE14v26r15M2 8IrcIa0xkI8VCY1x0267AKxVW5JVCq3wA2ocxC64kIII0Yj41l84x0c7CEw4AK67xGY2AK 021l84ACjcxK6xIIjxv20xvE14v26F1j6w1UM28EF7xvwVC0I7IYx2IY6xkF7I0E14v26r 4UJVWxJr1l84ACjcxK6I8E87Iv67AKxVW0oVCq3wA2z4x0Y4vEx4A2jsIEc7CjxVAFwI0_ GcCE3s1le2I262IYc4CY6c8Ij28IcVAaY2xG8wAqx4xG64xvF2IEw4CE5I8CrVC2j2WlYx 0E2Ix0cI8IcVAFwI0_Jr0_Jr4lYx0Ex4A2jsIE14v26r1j6r4UMcvjeVCFs4IE7xkEbVWU JVW8JwACjcxG0xvY0x0EwIxGrwACI402YVCY1x02628vn2kIc2xKxwCF04k20xvY0x0EwI xGrwCFx2IqxVCFs4IE7xkEbVWUJVW8JwC20s026c02F40E14v26r1j6r18MI8I3I0E7480 Y4vE14v26r106r1rMI8E67AF67kF1VAFwI0_Jw0_GFylIxkGc2Ij64vIr41lIxAIcVC0I7 IYx2IY67AKxVWUJVWUCwCI42IY6xIIjxv20xvEc7CjxVAFwI0_Gr0_Cr1lIxAIcVCF04k2 6cxKx2IYs7xG6r1j6r1xMIIF0xvEx4A2jsIE14v26r1j6r4UMIIF0xvEx4A2jsIEc7CjxV AFwI0_Gr0_Gr1UYxBIdaVFxhVjvjDU0xZFpf9x07UC9aPUUUUU= X-CM-SenderInfo: p1hex046kxt4xhlfz01xgou0bp/ X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750090598261724286?= X-GMAIL-MSGID: =?utf-8?q?1750090598261724286?= |
Series |
Fix error handle in 'rdma_request()'
|
|
Commit Message
Ye Bin
Nov. 21, 2022, 8 a.m. UTC
From: Ye Bin <yebin10@huawei.com> If send request failed will not call 'send_done()', but already get '(&rdma->sq_sem'. So add release '(&rdma->sq_sem' after send request failed. Signed-off-by: Ye Bin <yebin10@huawei.com> --- net/9p/trans_rdma.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/9p/trans_rdma.c b/net/9p/trans_rdma.c index e498208ed72b..ae2bac9bf510 100644 --- a/net/9p/trans_rdma.c +++ b/net/9p/trans_rdma.c @@ -509,8 +509,10 @@ static int rdma_request(struct p9_client *client, struct p9_req_t *req) */ req->status = REQ_STATUS_SENT; err = ib_post_send(rdma->qp, &wr, NULL); - if (err) + if (err) { + up(&rdma->sq_sem); goto mapping_error; + } /* Success */ return 0;