Hello,
I think there is a possible issue in the mon_get_event and mon_read
functions:
On Tue, 2006-11-21 at 22:56 -0800, Pete Zaitcev wrote:
[...]
> + mutex_lock(&rp->fetch_lock);
> +
> + add_wait_queue(&rp->b_wait, &waita);
> + set_current_state(TASK_INTERRUPTIBLE);
> +
> + spin_lock_irqsave(&rp->b_lock, flags);
> + while (!MON_RING_EMPTY(rp)) {
> + spin_unlock_irqrestore(&rp->b_lock, flags);
> +
> + if (file->f_flags & O_NONBLOCK) {
> + set_current_state(TASK_RUNNING);
> + remove_wait_queue(&rp->b_wait, &waita);
> + return -EWOULDBLOCK; /* Same as EAGAIN in Linux */
Before returning the mutex 'fetch_lock' is hold, shouldn't it be
released ?!?
The same situation happens a few lines after and in the mon_bin_read
function. Am I missing something ?!?
Best regards,
Paolo
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel