Hi Roel,
thanks for noticing the problem and providing a patch. Some comments inlined.
On Saturday 19 September 2009 03:13:37 Roel Kluin wrote:
Produce an error if kmalloc() fails.
Signed-off-by: Roel Kluin roel.kl...@gmail.com
---
Found with sed: http://kernelnewbies.org/roelkluin
Laurent,
That's not enough to prevent a kernel crash. The driver can try to dereference
ctrl-data if ctrl-info isn't NULL. You should only set ctrl-info if
allocationg succeeds. Something like
ctrl-data = kmalloc(ctrl-info-size * UVC_CTRL_NDATA, GFP_KERNEL);
if (ctrl-data ==
Produce an error if kmalloc() fails.
Signed-off-by: Roel Kluin roel.kl...@gmail.com
---
Found with sed: http://kernelnewbies.org/roelkluin
Build tested. Please review
diff --git a/drivers/media/video/uvc/uvc_ctrl.c
b/drivers/media/video/uvc/uvc_ctrl.c
index c3225a5..dda80b5 100644
---