Skip to content

Commit

Permalink
V4L/DVB (6291): Fix: avoid oops on some SMP machines
Browse files Browse the repository at this point in the history
This workaround fix a bug that happens on some SMP machines. On those machines,
videobuf_iolock is called too soon, before file .mmap handler. This patch calls
the scheduler before iolocking, allowing it to properly call the pending mmap.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Mauro Carvalho Chehab committed Oct 10, 2007
1 parent 5ddff43 commit d5f1b01
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/media/video/videobuf-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@ int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb,
MAGIC_CHECK(vb->magic,MAGIC_BUFFER);
MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS);

/* FIXME: This is required to avoid OOPS on some cases, since mmap_mapper()
method should be called before _iolock.
On some cases, the mmap_mapper() is called only after scheduling.
However, this way is just too dirty! Better to wait for some event.
*/
schedule_timeout(HZ);

return CALL(q,iolock,q,vb,fbuf);
}

Expand Down

0 comments on commit d5f1b01

Please sign in to comment.