Re: [staging-testing] drivers/staging/wfx/hif_tx.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 10 June 2020 08:53:13 CEST Mohamed Dawod wrote:
> Hello,
> 
> I read this point in  staging/wfx/TODO file
> 
> - In wfx_cmd_send(), "async" allow to send command without waiting the reply.
>     It may help in some situation, but it is not yet used. In add, it may cause
>     some trouble:
>       https://lore.kernel.org/driverdev-devel/alpine.DEB.2.21.1910041317381.2992@hadrien/
>     So, fix it (by replacing the mutex with a semaphore) or drop it.
> 
> I think that this issue has already been fixed in hif_shutdown() function, hasn't it ?

Indeed, when I wrote the TODO file, the function hif_shutdown() didn't
exist yet.

> I have another question. How can (replacing the mutex with a semaphore) solve the problem?

My understanding is that a mutex aims to be acquired and released from the
same context. In some specific usages (RT-mutex? lock proving?), acquire
mutex from a context and release it from another can produce some errors.
In contrary a boolean semaphore does not have this restriction. 

(can anyone confirm that?)



-- 
Jérôme Pouiller



_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies




[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]

  Powered by Linux