Re: 2.6.7+BK bad: scheduling while atomic! (ALSA?)

From: Wen-chien Jesse Sung
Date: Tue Jul 06 2004 - 21:42:26 EST


> Alsamixergui aslo still segfaults (with double
> segfault as it actually did before):
>
> bad: scheduling while atomic!
> [<c02989a3>] schedule+0x463/0x470
> [<c014a984>] vfs_write+0xe4/0x120
> [<c014aa58>] sys_write+0x38/0x60
> [<c0103eee>] work_resched+0x5/0x16

Hi,

I got similar output here when I try to run xmms with alsa plugin.
Solved with modified sound/core/control.c. Maybe you can try this tiny
patch. :)

--
Best Regards,
Wen-chien Jesse Sung

--- linux/sound/core/control.c.orig 2004-07-06 18:38:55.000000000 +0800
+++ linux/sound/core/control.c 2004-07-06 18:39:30.000000000 +0800
@@ -1114,7 +1114,7 @@ static ssize_t snd_ctl_read(struct file
wait_queue_t wait;
if ((file->f_flags & O_NONBLOCK) != 0 || result > 0) {
err = -EAGAIN;
- goto out;
+ goto __end;
}
init_waitqueue_entry(&wait, current);
add_wait_queue(&ctl->change_sleep, &wait);
@@ -1135,7 +1135,7 @@ static ssize_t snd_ctl_read(struct file
kfree(kev);
if (copy_to_user(buffer, &ev, sizeof(snd_ctl_event_t))) {
err = -EFAULT;
- goto __end;
+ goto out;
}
spin_lock_irq(&ctl->read_lock);
buffer += sizeof(snd_ctl_event_t);

Attachment: signature.asc
Description: =?UTF-8?Q?=E9=80=99=E6=98=AF=E6=95=B8=E4=BD=8D=E5=8A=A0=E7=B0=BD?==?UTF-8?Q?=E7=9A=84=E9=83=B5?= =?UTF-8?Q?=E4=BB=B6?=