Re: [PATCH] v4l: Reset subdev v4l2_dev field to NULL if registration fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sylwester,

On Tuesday 27 November 2012 23:54:40 Sylwester Nawrocki wrote:
> On 11/25/2012 01:41 AM, Laurent Pinchart wrote:
> > When subdev registration fails the subdev v4l2_dev field is left to a
> > non-NULL value. Later calls to v4l2_device_unregister_subdev() will
> > consider the subdev as registered and will module_put() the subdev
> > module without any matching module_get().
> > 
> > Fix this by setting the subdev v4l2_dev field to NULL in
> > v4l2_device_register_subdev() when the function fails.
> > 
> > Signed-off-by: Laurent Pinchart<laurent.pinchart@xxxxxxxxxxxxxxxx>
> 
> Acked-by: Sylwester Nawrocki <s.nawrocki@xxxxxxxxxxx>

Thank you.

> I'm just wondering whether including this patch in stable kernel releases
> could potentially break anything.

I don't think it would, the patch only touches error paths, and clearly fixes 
a bug. So

Cc: stable@xxxxxxxxxxxxxxx

looks like a good idea.

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux