Re: snd_mixart_send_msg / snd_mixart_send_msg_wait_notif

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

 



On 09/18/2007 01:54 PM, Rene Herman wrote:

People just _make_ me reply to myself:

  alsa@xxxxxxxxxxxx
     SMTP error from remote mailer after RCPT TO:<alsa@xxxxxxxxxxxx>:
     host mail.digigram.com [213.30.172.230]: 550 5.1.1 <alsa@xxxxxxxxxxxx>:
     Recipient address rejected: User unknown in relay recipient table

> While looking through ALSA for schedule_timeout() calls, I ran into:
> 
> int snd_mixart_send_msg(...)
> {
> 
>     [ ... ]
> 
>         set_current_state(TASK_UNINTERRUPTIBLE);
>         add_wait_queue(&mgr->msg_sleep, &wait);
>         spin_unlock_irq(&mgr->msg_lock);
>         timeout = schedule_timeout(MSG_TIMEOUT_JIFFIES);
>         remove_wait_queue(&mgr->msg_sleep, &wait);
> 
>         if (! timeout) {
>                 /* error - no ack */
>                 mutex_unlock(&mgr->msg_mutex);
>                 snd_printk(KERN_ERR "error: no reponse on msg %x\n", 
> msg_frame);
>                 return -EIO;
>         }
> 
>     [ ... ]
> 
> }
> 
> and the same in snd_mixart_send_msg_wait_notif().
> 
> I believe there to be  something wrong with this code. A 
> schedule_timeout() in TASK_UNINTERRUPTIBLE is always going to return 0. 
> Didn't you intend to use a wait_event_timeout() or something like that? 
> Puzzled, since you err out on !timeout, and it seems every run through 
> this would end up there.

Rene.

_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux