[media] exynos4-is: Set fimc-lite subdev owner module
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 18 Apr 2013 16:40:42 +0000 (13:40 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 25 Apr 2013 12:36:09 +0000 (09:36 -0300)
The FIMC-LITE.n subdevs have currently sd->owner field not set,
the exynos-fimc-lite module can be removed at any time, regardless
it is in use by other modules. When this module is unloaded the
kernel can crash easily by accessing video or media device nodes.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/platform/exynos4-is/fimc-lite.c

index 7ecf4e7ff5fc4c950d4e88a6f3ecad984f762b46..14bb7bc8adbeccc9adb4cf896a9c83f48899af95 100644 (file)
@@ -1399,6 +1399,7 @@ static int fimc_lite_create_capture_subdev(struct fimc_lite *fimc)
        sd->ctrl_handler = handler;
        sd->internal_ops = &fimc_lite_subdev_internal_ops;
        sd->entity.ops = &fimc_lite_subdev_media_ops;
+       sd->owner = THIS_MODULE;
        v4l2_set_subdevdata(sd, fimc);
 
        return 0;