A potential data race in drivers/iio/adc/berlin2-adc.ko

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

berlin2_adc_probe [1] registers two interrupt handlers: berlin2_adc_irq [2]
and berlin2_adc_tsen_irq [3]. The interrupt handlers operate with the same data, for example, modify
priv->data with different masks:

priv->data &= BERLIN2_SM_ADC_MASK;
and
priv->data &= BERLIN2_SM_TSEN_MASK;

If the two interrupt handlers are executed simultaneously, a potential data race takes place. So, the question is if the situation is possible. For example, in the case of the handlers are executed on different CPU cores.

Best regards,
Pavel

[1] https://elixir.bootlin.com/linux/latest/source/drivers/iio/adc/berlin2-adc.c#L283 [2] https://elixir.bootlin.com/linux/latest/source/drivers/iio/adc/berlin2-adc.c#L239 [3] https://elixir.bootlin.com/linux/latest/source/drivers/iio/adc/berlin2-adc.c#L259




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux