Thread (6 messages) 6 messages, 3 authors, 2021-08-28

Re: [PATCH v3] staging: r8188eu: Remove _enter/_exit_critical_mutex()

From: Pavel Skripkin <hidden>
Date: 2021-08-27 14:32:29
Also in: lkml

On 8/20/21 1:12 AM, Fabio M. De Francesco wrote:
Remove _enter_critical_mutex() and _exit_critical_mutex(). They are
unnecessary wrappers, respectively to mutex_lock_interruptible() and
to mutex_unlock(). They also have an odd interface that takes an unused
argument named pirqL of type unsigned long.
The original code enters the critical section if the mutex API is
interrupted while waiting to acquire the lock; therefore it could lead
to a race condition. Use mutex_lock() because it is uninterruptible and
so avoid that above-mentioned potential race condition.

Signed-off-by: Fabio M. De Francesco <redacted>
Tested-by: Pavel Skripkin <redacted>
Reviewed-by: Pavel Skripkin <redacted>

Thanks!


With regards,
Pavel Skripkin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help