aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/gspca.c
diff options
context:
space:
mode:
authorJean-Francois Moine <moinejf@free.fr>2008-07-14 08:38:29 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-07-20 06:26:14 -0400
commit739570bb218bb4607df1f197282561e97a98e54a (patch)
tree25555dfe5ac873bc96866c486d6f6c1dcabf24f4 /drivers/media/video/gspca/gspca.c
parent5b77ae7776183d733ec86727bcc34c52a336afd6 (diff)
V4L/DVB (8352): gspca: Buffers for USB exchanges cannot be in the stack.
gspca: Protect dq_callback() against simultaneous USB exchanges. Temporary buffer for USB exchanges added in the device struct. (all) Use a temporary buffer for all USB exchanges. Signed-off-by: Jean-Francois Moine <moinejf@free.fr> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/gspca/gspca.c')
-rw-r--r--drivers/media/video/gspca/gspca.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/video/gspca/gspca.c b/drivers/media/video/gspca/gspca.c
index a566fd394895..242f0fb68d6e 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -1347,9 +1347,11 @@ ok:
1347 gspca_dev->fr_i, 1347 gspca_dev->fr_i,
1348 gspca_dev->fr_o); 1348 gspca_dev->fr_o);
1349 1349
1350 if (gspca_dev->sd_desc->dq_callback) 1350 if (gspca_dev->sd_desc->dq_callback) {
1351 mutex_lock(&gspca_dev->usb_lock);
1351 gspca_dev->sd_desc->dq_callback(gspca_dev); 1352 gspca_dev->sd_desc->dq_callback(gspca_dev);
1352 1353 mutex_unlock(&gspca_dev->usb_lock);
1354 }
1353 return j; 1355 return j;
1354} 1356}
1355 1357