diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-08 11:48:57 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-08 11:48:57 -0300 |
commit | 058682061fb91c532ddeab61b5889c64b31472e0 (patch) | |
tree | 24b87981682e48d199b2a50802c58b9b98bf3929 /linux/drivers/media/video/videobuf-core.c | |
parent | ed125248d5e3b3b468befa39596c4bf7fb66fb0c (diff) | |
download | mediapointer-dvb-s2-058682061fb91c532ddeab61b5889c64b31472e0.tar.gz mediapointer-dvb-s2-058682061fb91c532ddeab61b5889c64b31472e0.tar.bz2 |
Fix: avoid oops on some SMP machines
From: Mauro Carvalho Chehab <mchehab@infradead.org>
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>
Diffstat (limited to 'linux/drivers/media/video/videobuf-core.c')
-rw-r--r-- | linux/drivers/media/video/videobuf-core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/videobuf-core.c b/linux/drivers/media/video/videobuf-core.c index 5066c2d88..013b60f48 100644 --- a/linux/drivers/media/video/videobuf-core.c +++ b/linux/drivers/media/video/videobuf-core.c @@ -95,6 +95,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); } |