From patchwork Mon Apr 22 14:03:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 2472051 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 366CADF23A for ; Mon, 22 Apr 2013 14:06:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754316Ab3DVOGf (ORCPT ); Mon, 22 Apr 2013 10:06:35 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:63085 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751719Ab3DVOGe (ORCPT ); Mon, 22 Apr 2013 10:06:34 -0400 Received: from epcpsbgm1.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MLN00CO9TUILVJ0@mailout2.samsung.com>; Mon, 22 Apr 2013 23:06:33 +0900 (KST) X-AuditID: cbfee61a-b7f156d000002a55-46-517543e98d93 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 72.97.10837.9E345715; Mon, 22 Apr 2013 23:06:33 +0900 (KST) Received: from amdc1344.digital.local ([106.116.147.32]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MLN004L3TQD2V50@mmp1.samsung.com>; Mon, 22 Apr 2013 23:06:33 +0900 (KST) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: kyungmin.park@samsung.com, sw0312.kim@samsung.com, a.hajda@samsung.com, Sylwester Nawrocki , stable@vger.kernel.org Subject: [PATCH 08/12] exynos4-is: Set fimc-lite subdev subdev owner module Date: Mon, 22 Apr 2013 16:03:43 +0200 Message-id: <1366639427-14253-9-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.9.5 In-reply-to: <1366639427-14253-1-git-send-email-s.nawrocki@samsung.com> References: <1366639427-14253-1-git-send-email-s.nawrocki@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpgluLIzCtJLcpLzFFi42I5/e+xgO5L59JAg6P9aha31p1jtTjb9Ibd omfDVlaLw2/aWS0WbHzEaDFj8ks2BzaPvi2rGD0+b5ILYIrisklJzcksSy3St0vgyjj17zt7 wUaOir4nJ9kbGGezdzFyckgImEicP/6SBcIWk7hwbz1bFyMXh5DAIkaJ6f9OMEM4HUwSp46d ZwapYhMwlOg92scIYosIyEs86b0B1sEsMJFR4tSSY2CjhAW8JRY2XQWzWQRUJVZ83wXWwCvg JjFx8iXWLkYOoHUKEnMm2YCEOQXcJb4sucEKYgsBlWxaeYN9AiPvAkaGVYyiqQXJBcVJ6bmG esWJucWleel6yfm5mxjB4fJMagfjygaLQ4wCHIxKPLwrzUoDhVgTy4orcw8xSnAwK4nw3n1d EijEm5JYWZValB9fVJqTWnyIUZqDRUmc90CrdaCQQHpiSWp2ampBahFMlomDU6qBsTbOUnd+ 9p2o5XO5nzq3H5bIuqT/4gNz3+51vSHJUpOto07l9xz1n5Ysy7vg3b/PGtWCpi8zNhxXe7dx Q/U1VRZug/rD31NPh83/+J3vu8x+509HlxRknP+/f8bJPVsiwpUX6Vf9zUgNjWyct5719dxr qmvbP/ufV0ntYPjwaq77ncDGqFbdx0osxRmJhlrMRcWJAB5HU64TAgAA Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org 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. Cc: stable@vger.kernel.org Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park --- drivers/media/platform/exynos4-is/fimc-lite.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index 7ecf4e7..14bb7bc 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -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;