lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHv-k_8c8v96G0Uh3qQNkLmKYwh+_8TBF2ORbfMNdvd_YbMK2w@mail.gmail.com>
Date:	Wed, 20 Jul 2016 10:06:08 +0530
From:	Binoy Jayan <binoy.jayan@...aro.org>
To:	Arnd Bergmann <arnd@...db.de>
Cc:	Jiri Slaby <jslaby@...e.cz>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Linux kernel mailing list <linux-kernel@...r.kernel.org>
Subject: Re: staging/wilc1000: wrong conversion to completion?

On 11 July 2016 at 13:38, Arnd Bergmann <arnd@...db.de> wrote:
> On Monday, July 11, 2016 9:41:15 AM CEST Jiri Slaby wrote:
>> Hi,
>>
>> while looking at this commit:
>>
>> commit b27a6d5e636ac80b223a18ca2b3c892f1caef9e3
>> Author: Binoy Jayan <binoy.jayan@...aro.org>
>> Date:   Wed Jun 15 11:00:34 2016 +0530
>>
>>     staging: wilc1000: Replace semaphore txq_event with completion
>>
>>     The semaphore 'txq_event' is used as completion, so convert it
>>     to a struct completion type.
>>
>>     Signed-off-by: Binoy Jayan <binoy.jayan@...aro.org>
>>     Reviewed-by: Arnd Bergmann <arnd@...db.de>
>>     Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
>>
>> diff --git a/drivers/staging/wilc1000/linux_wlan.c
>> b/drivers/staging/wilc1000/linux_wlan.c
>> index 274c390d17cd..baf932681362 100644
>> --- a/drivers/staging/wilc1000/linux_wlan.c
>> +++ b/drivers/staging/wilc1000/linux_wlan.c
>> @@ -316,7 +316,7 @@ static int linux_wlan_txq_task(void *vp)
>>
>>         complete(&wl->txq_thread_started);
>>         while (1) {
>> -               down(&wl->txq_event);
>> +               wait_for_completion(&wl->txq_event);
>>
>>                 if (wl->close) {
>>                         complete(&wl->txq_thread_started);
>> @@ -650,7 +650,7 @@ void wilc1000_wlan_deinit(struct net_device *dev)
>>                         mutex_unlock(&wl->hif_cs);
>>                 }
>>                 if (&wl->txq_event)
>> -                       up(&wl->txq_event);
>> +                       wait_for_completion(&wl->txq_event);
>>
>>
>> I wonder: is this correct? Should that be complete() instead?
>>
>
> Yes, I agree, sorry for missing that in my review.
>
>         Arnd

Sorry for the typo. Just saw the email after coming back from
vacation. Will send the patch soon.

Binoy

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ