aboutsummaryrefslogtreecommitdiff
path: root/scripts/documentation-file-ref-check
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2023-01-06 11:07:18 +0100
committerMark Brown <[email protected]>2023-01-11 14:15:10 +0000
commita720416d94634068951773cb9e9d6f1b73769e5b (patch)
treeb793e5cfbf2e810155721e0433865257edf0de6c /scripts/documentation-file-ref-check
parente8bb8f19e73a1e855e54788f8673b9b49e46b5cd (diff)
spi: spidev: fix a race condition when accessing spidev->spi
There's a spinlock in place that is taken in file_operations callbacks whenever we check if spidev->spi is still alive (not null). It's also taken when spidev->spi is set to NULL in remove(). This however doesn't protect the code against driver unbind event while one of the syscalls is still in progress. To that end we need a lock taken continuously as long as we may still access spidev->spi. As both the file ops and the remove callback are never called from interrupt context, we can replace the spinlock with a mutex. Signed-off-by: Bartosz Golaszewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
Diffstat (limited to 'scripts/documentation-file-ref-check')
0 files changed, 0 insertions, 0 deletions