public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
From: "Steve Wise" <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>
To: 'Potnuri Bharat Teja'
	<bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>,
	jgg-uk2M96/98Pc@public.gmane.org,
	dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org,
	leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org
Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: RE: [PATCH rdma-core] iwpmd: fix double mutex unlock
Date: Wed, 31 Jan 2018 09:40:33 -0600	[thread overview]
Message-ID: <010901d39aa9$d4d66fd0$7e834f70$@opengridcomputing.com> (raw)
In-Reply-To: <1517413071-20438-1-git-send-email-bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>

> 
> 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 <bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
> ---
>  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);

Good catch.

Reviewed-by: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org>

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2018-01-31 15:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31 15:37 [PATCH rdma-core] iwpmd: fix double mutex unlock Potnuri Bharat Teja
     [not found] ` <1517413071-20438-1-git-send-email-bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org>
2018-01-31 15:40   ` Steve Wise [this message]
2018-01-31 16:04     ` Steve Wise
2018-01-31 21:06       ` Doug Ledford
     [not found]         ` <1517432802.19117.41.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-31 21:12           ` Steve Wise
2018-01-31 21:28             ` Doug Ledford
     [not found]               ` <1517434122.19117.45.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-31 21:56                 ` Steve Wise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='010901d39aa9$d4d66fd0$7e834f70$@opengridcomputing.com' \
    --to=swise-7bpotxp6k4+p2yhjcf5u+vpxobypeauw@public.gmane.org \
    --cc=bharat-ut6Up61K2wZBDgjK7y7TUQ@public.gmane.org \
    --cc=dledford-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=jgg-uk2M96/98Pc@public.gmane.org \
    --cc=leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox