From: Dan Carpenter <dan.carpenter@oracle.com>
To: Lauro Ramos Venancio <lauro.venancio@openbossa.org>
Cc: Aloisio Almeida Jr <aloisio.almeida@openbossa.org>,
Samuel Ortiz <sameo@linux.intel.com>,
"John W. Linville" <linville@tuxdriver.com>,
linux-wireless@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [patch 1/2] NFC: double unlock in nfc_llcp_recv_connect()
Date: Fri, 16 Dec 2011 20:25:29 +0000 [thread overview]
Message-ID: <20111216202529.GA18570@elgon.mountain> (raw)
We unlock inside the if block on the other side of this if else
statement. It could result in calling mutex_unlock() twice.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
diff --git a/net/nfc/llcp/llcp.c b/net/nfc/llcp/llcp.c
index 67756b2..f99d6b4 100644
--- a/net/nfc/llcp/llcp.c
+++ b/net/nfc/llcp/llcp.c
@@ -554,11 +554,9 @@ static void nfc_llcp_recv_connect(struct nfc_llcp_local *local,
goto enqueue;
}
}
-
+ mutex_unlock(&local->socket_lock);
}
- mutex_unlock(&local->socket_lock);
-
reason = LLCP_DM_NOBOUND;
goto fail;
next reply other threads:[~2011-12-16 20:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-16 20:25 Dan Carpenter [this message]
2011-12-18 20:42 ` [patch 1/2] NFC: double unlock in nfc_llcp_recv_connect() Samuel Ortiz
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=20111216202529.GA18570@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=aloisio.almeida@openbossa.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=lauro.venancio@openbossa.org \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
--cc=sameo@linux.intel.com \
/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