From patchwork Wed Jan 31 15:37:51 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Potnuri Bharat Teja X-Patchwork-Id: 10194149 X-Patchwork-Delegate: leon@leon.nu Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6AA2B601A0 for ; Wed, 31 Jan 2018 15:38:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4852428734 for ; Wed, 31 Jan 2018 15:38:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C58C28762; Wed, 31 Jan 2018 15:38:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 33E5228734 for ; Wed, 31 Jan 2018 15:38:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752865AbeAaPiJ (ORCPT ); Wed, 31 Jan 2018 10:38:09 -0500 Received: from stargate.chelsio.com ([12.32.117.8]:28636 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751447AbeAaPiI (ORCPT ); Wed, 31 Jan 2018 10:38:08 -0500 Received: from localhost ([10.193.186.242]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id w0VFburQ017410; Wed, 31 Jan 2018 07:37:57 -0800 From: Potnuri Bharat Teja To: jgg@ziepe.ca, dledford@redhat.com, leon@kernel.org Cc: linux-rdma@vger.kernel.org, swise@opengridcomputing.com, bharat@chelsio.com Subject: [PATCH rdma-core] iwpmd: fix double mutex unlock Date: Wed, 31 Jan 2018 21:07:51 +0530 Message-Id: <1517413071-20438-1-git-send-email-bharat@chelsio.com> X-Mailer: git-send-email 2.5.3 Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP pthread_mutex_unlock() is used twice and this patch fixes it. Fixes: be3fbf85b ("iwpmd: use ccan list.h for pending_messages") Signed-off-by: Potnuri Bharat Teja Reviewed-by: Steve Wise --- iwpmd/iwarp_pm_helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/iwpmd/iwarp_pm_helper.c b/iwpmd/iwarp_pm_helper.c index bebc151f329b..b8c230189d50 100644 --- a/iwpmd/iwarp_pm_helper.c +++ b/iwpmd/iwarp_pm_helper.c @@ -578,7 +578,6 @@ int add_iwpm_pending_msg(iwpm_send_msg *send_msg) pthread_mutex_lock(&pending_msg_mutex); list_add(&pending_messages, &pending_msg->entry); - pthread_mutex_unlock(&pending_msg_mutex); pthread_mutex_unlock(&pending_msg_mutex); /* signal the thread that a new message has been posted */ pthread_cond_signal(&cond_pending_msg);