public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Lidza Louina <lidza.louina@oracle.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ivan Safonov <insafonov@gmail.com>,
	Kyle Kuffermann <kyle.kuffermann@gmail.com>,
	Sandhya Bankar <bankarsandhya512@gmail.com>,
	Geliang Tang <geliangtang@163.com>,
	Bryan Paul <bryan.paul@yahoo.com>,
	Bhaktipriya Shridhar <bhaktipriya96@gmail.com>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] staging/rtl8188eu/core/rtw_cmd: Fixes semaphore locking
Date: Tue, 09 Aug 2016 01:34:57 -0400	[thread overview]
Message-ID: <1470720897.23538.2.camel@oracle.com> (raw)

The code did not lock the &pcmdpriv->terminate_cmdthread_sema before using it.
The code had an up() where a down() should've been. This patch fixes that.

Signed-off-by: Lidza Louina <Lidza.Louina@oracle.com>
---
 drivers/staging/rtl8188eu/core/rtw_cmd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/rtl8188eu/core/rtw_cmd.c b/drivers/staging/rtl8188eu/core/rtw_cmd.c
index 7748523..16f0b19 100644
--- a/drivers/staging/rtl8188eu/core/rtw_cmd.c
+++ b/drivers/staging/rtl8188eu/core/rtw_cmd.c
@@ -162,7 +162,7 @@ int rtw_cmd_thread(void *context)
 	allow_signal(SIGTERM);
 
 	pcmdpriv->cmdthd_running = true;
-	up(&pcmdpriv->terminate_cmdthread_sema);
+	down(&pcmdpriv->terminate_cmdthread_sema);
 
 	RT_TRACE(_module_rtl871x_cmd_c_, _drv_info_, ("start r871x rtw_cmd_thread !!!!\n"));
 
-- 
2.7.4

             reply	other threads:[~2016-08-09 23:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09  5:34 Lidza Louina [this message]
2016-08-21 16:18 ` [PATCH] staging/rtl8188eu/core/rtw_cmd: Fixes semaphore locking Greg Kroah-Hartman

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=1470720897.23538.2.camel@oracle.com \
    --to=lidza.louina@oracle.com \
    --cc=bankarsandhya512@gmail.com \
    --cc=bhaktipriya96@gmail.com \
    --cc=bryan.paul@yahoo.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=geliangtang@163.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=insafonov@gmail.com \
    --cc=kyle.kuffermann@gmail.com \
    --cc=linux-kernel@vger.kernel.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