Skip to content
Commit 80845a33 authored by Herton Ronaldo Krzesinski's avatar Herton Ronaldo Krzesinski Committed by Mauro Carvalho Chehab
Browse files

[media] v4l: make sure drivers supply a zeroed struct v4l2_subdev

Some v4l drivers currently don't initialize their struct v4l2_subdev
with zeros, and this is a problem since some of the v4l2 code expects
this. One example is the addition of internal_ops in commit 45f6f84a,
after that we are at risk of random oopses with these drivers when code
in v4l2_device_register_subdev tries to dereference sd->internal_ops->*,
as can be shown by the report at http://bugs.launchpad.net/bugs/745213
and analysis of its crash at https://lkml.org/lkml/2011/4/1/168

Use kzalloc within problematic drivers to ensure we have a zeroed struct
v4l2_subdev.

BugLink: http://bugs.launchpad.net/bugs/745213


Cc: <stable@kernel.org>
Signed-off-by: default avatarHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 2b5cb549
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment