public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* oops in Audiowerk2 ALSA driver
@ 2008-06-22 16:47 Marcin Slusarz
  2008-06-23 12:18 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Marcin Slusarz @ 2008-06-22 16:47 UTC (permalink / raw)
  To: Cedric Bregardis, Jean-Christian Hassler; +Cc: LKML, Takashi Iwai

Hi
There's a race between registration routine and interrupt handler in aw2 driver
which manifested as oops on some box [1].

When snd_aw2_create calls request_irq chip data are not yet fully initialized.
If interrupt raises before snd_aw2_create call snd_aw2_saa7146_setup, driver may
oops or read/write other port than its own. (chip->base_addr is initialized in
snd_aw2_saa7146_setup, but is used in snd_aw2_saa7146_interrupt via READREG/WRITEREG)

The simple fix would be to move call to snd_aw2_saa7146_setup before request_irq,
but snd_aw2_saa7146_setup enables interrupts...

PS: I don't have this hardware.

Marcin

[1] http://kerneloops.org/guilty.php?guilty=snd_aw2_saa7146_interrupt&version=2.6.26-rc&start=1703936&end=1736703&class=oops

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

* Re: oops in Audiowerk2 ALSA driver
  2008-06-22 16:47 oops in Audiowerk2 ALSA driver Marcin Slusarz
@ 2008-06-23 12:18 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2008-06-23 12:18 UTC (permalink / raw)
  To: Marcin Slusarz; +Cc: Cedric Bregardis, Jean-Christian Hassler, LKML

At Sun, 22 Jun 2008 18:47:17 +0200,
Marcin Slusarz wrote:
> 
> Hi
> There's a race between registration routine and interrupt handler in aw2 driver
> which manifested as oops on some box [1].
> 
> When snd_aw2_create calls request_irq chip data are not yet fully initialized.
> If interrupt raises before snd_aw2_create call snd_aw2_saa7146_setup, driver may
> oops or read/write other port than its own. (chip->base_addr is initialized in
> snd_aw2_saa7146_setup, but is used in snd_aw2_saa7146_interrupt via READREG/WRITEREG)
> 
> The simple fix would be to move call to snd_aw2_saa7146_setup before request_irq,
> but snd_aw2_saa7146_setup enables interrupts...
> 
> PS: I don't have this hardware.
> 
> Marcin
> 
> [1] http://kerneloops.org/guilty.php?guilty=snd_aw2_saa7146_interrupt&version=2.6.26-rc&start=1703936&end=1736703&class=oops

Thanks for spotting the bug.
I fixed this on my git tree now and will post a pull request soon
later.


Takashi

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

end of thread, other threads:[~2008-06-23 12:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-22 16:47 oops in Audiowerk2 ALSA driver Marcin Slusarz
2008-06-23 12:18 ` Takashi Iwai

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