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

From: Mauro Carvalho Chehab
Date: Wed Apr 27 2011 - 10:30:38 EST


Em 27-04-2011 03:39, Hans Verkuil escreveu:
> On Saturday, April 02, 2011 10:05:57 Hans Verkuil wrote:
>> On Friday, April 01, 2011 19:12:02 Herton Ronaldo Krzesinski wrote:
>>> 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 45f6f84,
>>> 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@xxxxxxxxxx>
>>> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@xxxxxxxxxxxxx>
>>
>> Acked-by: Hans Verkuil <hverkuil@xxxxxxxxx>
>
> Mauro,
>
> Please get this patch upstream! It's a nasty 2.6.38 regression that needs to
> be upstreamed urgently. The fix is simple and solves oopses in several
> drivers. 2.6.38 can't be fixed as long as this fix isn't in 2.6.39.

(11:18:42) hverkuil: mchehab: ping
(11:21:01) hverkuil: mchehab: please add the 'make sure drivers supply a zeroed struct v4l2_subdev' patch to the 2.6.39 pull request!
(11:21:53) hverkuil: It fixes a 2.6.38 regression and it really needs to be upstreamed asap.


I intend to add it on the next series. As you know, patches need to go first to -next
tree before being merged. Unfortunately, patchwork is broken for about one week. A mysql
replication error damaged the database, and about 270 patches got lost. kernel.org
maintainer is working on a way to re-add the missing patches.

Mauro.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/