public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [BUG] sound: pci: trident: a possible data race
@ 2018-10-03 12:50 Jia-Ju Bai
  2018-10-03 15:54 ` Takashi Iwai
  0 siblings, 1 reply; 5+ messages in thread
From: Jia-Ju Bai @ 2018-10-03 12:50 UTC (permalink / raw)
  To: perex, tiwai, keescook; +Cc: alsa-devel, Linux Kernel Mailing List

CPU0:
snd_trident_hw_free
     snd_trident_free_voice
             line 3870: spin_lock_irqsave()
             line 3881: voice->substream = NULL; [WRITE]
CPU1:
snd_trident_interrupt
     line 3798: snd_pcm_period_elapsed(voice->substream);  [READ]

As for voice->substream, the WRITE operation in CPU0 is performed
with holding a spinlock, but the READ operation in CPU1 is performed
without holding this spinlock, so there may exist a data race.


Best wishes,
Jia-Ju Bai

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

end of thread, other threads:[~2018-10-04  9:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-03 12:50 [BUG] sound: pci: trident: a possible data race Jia-Ju Bai
2018-10-03 15:54 ` Takashi Iwai
2018-10-04  3:08   ` Jia-Ju Bai
2018-10-04  5:24     ` Takashi Iwai
2018-10-04  9:17       ` Jia-Ju Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox