All of lore.kernel.org
 help / color / mirror / Atom feed
* A potential data race in drivers/media/platform/s5p-mfc/
@ 2021-03-23  6:37 ` Pavel Andrianov
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Andrianov @ 2021-03-23  6:37 UTC (permalink / raw)
  To: Andrzej Hajda
  Cc: Mauro Carvalho Chehab, linux-arm-kernel, linux-media,
	linux-kernel, ldv-project

Hi,

s5p_mfc_probe[1] registers an interrupt handler s5p_mfc_irq before compete initialization. For example, the interrupt handler operates
with mfc_ops, which are set up in [2]. So, potentially, the interrupt handler may be executed in parallel with initialization. The question is if the device can produce the interrupts. Its registers are initialized in [3] and there are nothing like "enabling interrupts". So, likely, they are activated. And if interrupts can come, then this is a data race.

Best regards,
Pavel Andrianov
Linux Verification Center, ISPRAS
web:http://linuxtesting.org

[1]https://elixir.bootlin.com/linux/v5.4.106/source/drivers/media/platform/s5p-mfc/s5p_mfc.c#L1299
[2]https://elixir.bootlin.com/linux/v5.4.106/source/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c#L19
[3]https://elixir.bootlin.com/linux/v5.4.106/source/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c#L2229


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

* A potential data race in drivers/media/platform/s5p-mfc/
@ 2021-03-23  6:37 ` Pavel Andrianov
  0 siblings, 0 replies; 2+ messages in thread
From: Pavel Andrianov @ 2021-03-23  6:37 UTC (permalink / raw)
  To: Andrzej Hajda
  Cc: Mauro Carvalho Chehab, linux-arm-kernel, linux-media,
	linux-kernel, ldv-project

Hi,

s5p_mfc_probe[1] registers an interrupt handler s5p_mfc_irq before compete initialization. For example, the interrupt handler operates
with mfc_ops, which are set up in [2]. So, potentially, the interrupt handler may be executed in parallel with initialization. The question is if the device can produce the interrupts. Its registers are initialized in [3] and there are nothing like "enabling interrupts". So, likely, they are activated. And if interrupts can come, then this is a data race.

Best regards,
Pavel Andrianov
Linux Verification Center, ISPRAS
web:http://linuxtesting.org

[1]https://elixir.bootlin.com/linux/v5.4.106/source/drivers/media/platform/s5p-mfc/s5p_mfc.c#L1299
[2]https://elixir.bootlin.com/linux/v5.4.106/source/drivers/media/platform/s5p-mfc/s5p_mfc_opr.c#L19
[3]https://elixir.bootlin.com/linux/v5.4.106/source/drivers/media/platform/s5p-mfc/s5p_mfc_opr_v6.c#L2229


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-03-23  6:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23  6:37 A potential data race in drivers/media/platform/s5p-mfc/ Pavel Andrianov
2021-03-23  6:37 ` Pavel Andrianov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.