mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-14 15:54:15 +08:00
d501d37841
The quad8_action_read() function checks the Count function mode and
Count direction without first acquiring a lock. This is a race condition
because the function mode could change by the time the direction is
checked.
Because the quad8_function_read() already acquires a lock internally,
the quad8_function_read() is refactored to spin out the no-lock code to
a new quad8_function_get() function.
To resolve the race condition in quad8_action_read(), a lock is acquired
before calling quad8_function_get() and quad8_direction_read() in order
to get both function mode and direction atomically.
Fixes:
|
||
---|---|---|
.. | ||
104-quad-8.c | ||
counter-chrdev.c | ||
counter-chrdev.h | ||
counter-core.c | ||
counter-sysfs.c | ||
counter-sysfs.h | ||
ftm-quaddec.c | ||
intel-qep.c | ||
interrupt-cnt.c | ||
Kconfig | ||
Makefile | ||
microchip-tcb-capture.c | ||
stm32-lptimer-cnt.c | ||
stm32-timer-cnt.c | ||
ti-ecap-capture.c | ||
ti-eqep.c |