Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1474932

A potential race in drivers/iio/adc/vf610_adc.ko

From Pavel Andrianov <andrianov@ispras.ru>
Newsgroups linux.kernel
Subject A potential race in drivers/iio/adc/vf610_adc.ko
Date 2016-09-02 10:10 +0200
Message-ID <scRHX-5k8-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

A potential race in drivers/iio/adc/vf610_adc.ko Pavel Andrianov <andrianov@ispras.ru> - 2016-09-02 10:10 +0200
  Re: A potential race in drivers/iio/adc/vf610_adc.ko Alison Schofield <amsfield22@gmail.com> - 2016-09-02 20:10 +0200
  Re: A potential race in drivers/iio/adc/vf610_adc.ko Jonathan Cameron <jic23@kernel.org> - 2016-09-03 17:30 +0200
    Re: A potential race in drivers/iio/adc/vf610_adc.ko Vaishali Thakkar <vaishali.thakkar@oracle.com> - 2016-09-05 09:50 +0200
      Re: A potential race in drivers/iio/adc/vf610_adc.ko Jonathan Cameron <jic23@kernel.org> - 2016-09-05 22:20 +0200

csiph-web