diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-08 10:48:57 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 23:03:14 -0400 |
commit | d5f1b01644b6fd5e9eb480a4762cd6b569cb1246 (patch) | |
tree | 817c0b83d2c64e2b5d7f2f5de93ebdbc7d1705b7 /drivers/media/video | |
parent | 5ddff43435394c1c2540fcdeed00cb54862c31bf (diff) |
V4L/DVB (6291): Fix: avoid oops on some SMP machines
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 'drivers/media/video')
-rw-r--r-- | drivers/media/video/videobuf-core.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index 8e4026e6fae3..aa402abc4b0c 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c | |||
@@ -94,6 +94,14 @@ int videobuf_iolock(struct videobuf_queue* q, struct videobuf_buffer *vb, | |||
94 | MAGIC_CHECK(vb->magic,MAGIC_BUFFER); | 94 | MAGIC_CHECK(vb->magic,MAGIC_BUFFER); |
95 | MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS); | 95 | MAGIC_CHECK(q->int_ops->magic,MAGIC_QTYPE_OPS); |
96 | 96 | ||
97 | /* FIXME: This is required to avoid OOPS on some cases, since mmap_mapper() | ||
98 | method should be called before _iolock. | ||
99 | On some cases, the mmap_mapper() is called only after scheduling. | ||
100 | |||
101 | However, this way is just too dirty! Better to wait for some event. | ||
102 | */ | ||
103 | schedule_timeout(HZ); | ||
104 | |||
97 | return CALL(q,iolock,q,vb,fbuf); | 105 | return CALL(q,iolock,q,vb,fbuf); |
98 | } | 106 | } |
99 | 107 | ||