linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* A potential race in drivers/iio/adc/vf610_adc.ko
@ 2016-09-02  8:05 Pavel Andrianov
  2016-09-02 18:01 ` Alison Schofield
  2016-09-03 15:23 ` Jonathan Cameron
  0 siblings, 2 replies; 5+ messages in thread
From: Pavel Andrianov @ 2016-09-02  8:05 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Hartmut Knaack, Lars-Peter Clausen, Peter Meerwald-Stadler,
	linux-iio, linux-kernel, Vaishali Thakkar, ldv-project


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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-09-08  9:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-02  8:05 A potential race in drivers/iio/adc/vf610_adc.ko Pavel Andrianov
2016-09-02 18:01 ` Alison Schofield
2016-09-03 15:23 ` Jonathan Cameron
2016-09-05  6:49   ` Vaishali Thakkar
2016-09-05 20:15     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).