Messages in this thread | | | From | Pavel Andrianov <> | Subject | A potential race in drivers/iio/adc/vf610_adc.ko | Date | Fri, 2 Sep 2016 11:05:09 +0300 |
| |
Hi!
There is a potential race in drivers/iio/adc/vf610_adc.ko. Handlers vf610_set_conversion_mode and vf610_write_raw are called via device_attibute interface, but they are related to different attributes, so may be executed in parallel. vf610_set_conversion_mode acquires the mutex indio_dev->mlock, and vf610_write_raw does not. Thus updating the structure 'info' may be performed simultaneously.
Should vf610_write_raw also acquire the same mutex indio_dev->mlock?
-- Pavel Andrianov Linux Verification Center, ISPRAS web: http://linuxtesting.org e-mail: andrianov@ispras.ru
| |