* Possible bug on libv4l read() emulation @ 2009-10-15 22:00 Pablo Baena 2009-10-16 17:42 ` Hans de Goede 0 siblings, 1 reply; 3+ messages in thread From: Pablo Baena @ 2009-10-15 22:00 UTC (permalink / raw) To: linux-media; +Cc: Pablo Baena I have a program where I use libv4l's read() emulation for simplicity. But with most v4l2 webcams I've tried, I get kernel panics. I have pics of the message if anyone cares to see them, I don't want to flood the mailing list. Basically, the names I see in the kernel panic from a uvcvideo card is: uvc_queue_next_buffer __bad_area_no_semaphore do_page_fault And a lot more. TIA. ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Possible bug on libv4l read() emulation 2009-10-15 22:00 Possible bug on libv4l read() emulation Pablo Baena @ 2009-10-16 17:42 ` Hans de Goede 2009-10-16 18:23 ` Pablo Baena 0 siblings, 1 reply; 3+ messages in thread From: Hans de Goede @ 2009-10-16 17:42 UTC (permalink / raw) To: Pablo Baena; +Cc: linux-media Hi, On 10/16/2009 12:00 AM, Pablo Baena wrote: > I have a program where I use libv4l's read() emulation for simplicity. > But with most v4l2 webcams I've tried, I get kernel panics. > > I have pics of the message if anyone cares to see them, I don't want > to flood the mailing list. > > Basically, the names I see in the kernel panic from a uvcvideo card is: > > uvc_queue_next_buffer > __bad_area_no_semaphore > do_page_fault > > And a lot more. > A panic should never happen, no matter what libv4l does (as libv4l is 100% userspace). Please submit a bug report with as much detail as possible to the driver author. Regards, Hans ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Possible bug on libv4l read() emulation 2009-10-16 17:42 ` Hans de Goede @ 2009-10-16 18:23 ` Pablo Baena 0 siblings, 0 replies; 3+ messages in thread From: Pablo Baena @ 2009-10-16 18:23 UTC (permalink / raw) To: Hans de Goede; +Cc: linux-media I think I identified the problem, I used code extracted from: http://www.saillard.org/linux/pwc/files/capture.c, and the code was like: total_read_bytes = 0; do { read_bytes = read(fd, buffers[0].start, buffers[0].length); if (read_bytes < 0) { switch (errno) { case EIO: case EAGAIN: continue; default: errno_exit("read"); } } total_read_bytes += read_bytes; } while (total_read_bytes < buffers[0].length); I changed the read() call to a v4l2_read() and used libv4l, and that piece of code was triggering the kernel panic. To fix it, I just removed the do..while loop. I'm still trying to figure out what's the problem with that though. Thanks for the reply. On Fri, Oct 16, 2009 at 2:42 PM, Hans de Goede <hdegoede@redhat.com> wrote: > Hi, > > On 10/16/2009 12:00 AM, Pablo Baena wrote: >> >> I have a program where I use libv4l's read() emulation for simplicity. >> But with most v4l2 webcams I've tried, I get kernel panics. >> >> I have pics of the message if anyone cares to see them, I don't want >> to flood the mailing list. >> >> Basically, the names I see in the kernel panic from a uvcvideo card is: >> >> uvc_queue_next_buffer >> __bad_area_no_semaphore >> do_page_fault >> >> And a lot more. >> > > A panic should never happen, no matter what libv4l does (as libv4l is 100% > userspace). Please submit a bug report with as much detail as possible to > the > driver author. > > Regards, > > Hans > -- "Not possessing the gift of reflection, a dog does not know that he does not know, and does not understand that he understands nothing; we, on the other hand, are aware of both. If we behave otherwise, it is from stupidity, or else from self-deception, to preserve our peace of mind." ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-10-16 18:23 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2009-10-15 22:00 Possible bug on libv4l read() emulation Pablo Baena 2009-10-16 17:42 ` Hans de Goede 2009-10-16 18:23 ` Pablo Baena
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.