]> git.baikalelectronics.ru Git - kernel.git/commit
hysdn: fix to a race condition in put_log_buffer
authorAnton Volkov <avolkov@ispras.ru>
Mon, 7 Aug 2017 12:54:14 +0000 (15:54 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 7 Aug 2017 18:25:14 +0000 (11:25 -0700)
commitf678d37e6c6bdd98d44675895f494dd965b7fb43
treeae634920cf42835cad86baddf89b06be3662510a
parent1d477c29a022db19a1170c048ff595ec7ea267b0
hysdn: fix to a race condition in put_log_buffer

The synchronization type that was used earlier to guard the loop that
deletes unused log buffers may lead to a situation that prevents any
thread from going through the loop.

The patch deletes previously used synchronization mechanism and moves
the loop under the spin_lock so the similar cases won't be feasible in
the future.

Found by by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Anton Volkov <avolkov@ispras.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/isdn/hysdn/hysdn_proclog.c