This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/v4l-dvb.git tree:

Subject: V4L/DVB: pvrusb2: Avoid using stack allocated buffers when performing 
USB I/O
Author:  Mike Isely <[email protected]>
Date:    Sat May 15 00:09:47 2010 -0300

Drivers shouldn't assume that the stack is DMA-safe.

[[email protected]: fix patch description]

Signed-off-by: Mike Isely <[email protected]>
Cc: [email protected]
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/pvrusb2/pvrusb2-hdw.c |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/v4l-dvb.git?a=commitdiff;h=e6f537434b06cbd2a8e00cd5da1e9350cd858797

diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw.c 
b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index 301ef19..d13232d 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -4084,12 +4084,20 @@ void pvr2_hdw_device_reset(struct pvr2_hdw *hdw)
 
 void pvr2_hdw_cpureset_assert(struct pvr2_hdw *hdw,int val)
 {
-       char da[1];
+       char *da;
        unsigned int pipe;
        int ret;
 
        if (!hdw->usb_dev) return;
 
+       da = kmalloc(16, GFP_KERNEL);
+
+       if (da == NULL) {
+               pvr2_trace(PVR2_TRACE_ERROR_LEGS,
+                          "Unable to allocate memory to control CPU reset");
+               return;
+       }
+
        pvr2_trace(PVR2_TRACE_INIT,"cpureset_assert(%d)",val);
 
        da[0] = val ? 0x01 : 0x00;
@@ -4103,6 +4111,8 @@ void pvr2_hdw_cpureset_assert(struct pvr2_hdw *hdw,int 
val)
                           "cpureset_assert(%d) error=%d",val,ret);
                pvr2_hdw_render_useless(hdw);
        }
+
+       kfree(da);
 }
 
 

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to