lkml.org 
[lkml]   [2016]   [Sep]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectA potential race in drivers/iio/adc/vf610_adc.ko
Date

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

\
 
 \ /
  Last update: 2016-09-17 09:58    [W:0.055 / U:1.428 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site