From patchwork Mon Feb 22 20:47:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sakari Ailus X-Patchwork-Id: 8382931 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 76DFCC0554 for ; Mon, 22 Feb 2016 20:47:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A69AD202DD for ; Mon, 22 Feb 2016 20:47:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C34C72040F for ; Mon, 22 Feb 2016 20:47:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755511AbcBVUrL (ORCPT ); Mon, 22 Feb 2016 15:47:11 -0500 Received: from nblzone-211-213.nblnetworks.fi ([83.145.211.213]:49822 "EHLO hillosipuli.retiisi.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754052AbcBVUrI (ORCPT ); Mon, 22 Feb 2016 15:47:08 -0500 Received: from lanttu.localdomain (lanttu-e.localdomain [192.168.1.64]) by hillosipuli.retiisi.org.uk (Postfix) with ESMTP id 2C3F5600A2; Mon, 22 Feb 2016 22:47:05 +0200 (EET) From: Sakari Ailus To: linux-media@vger.kernel.org Cc: mchehab@osg.samsung.com, hverkuil@xs4all.nl, shuahkh@osg.samsung.com, laurent.pinchart@ideasonboard.com Subject: [PATCH v2 3/4] media: Properly handle user pointers Date: Mon, 22 Feb 2016 22:47:03 +0200 Message-Id: <1456174024-11389-4-git-send-email-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456174024-11389-1-git-send-email-sakari.ailus@linux.intel.com> References: <1456174024-11389-1-git-send-email-sakari.ailus@linux.intel.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Mark pointers containing user pointers as such. Signed-off-by: Sakari Ailus Acked-by: Laurent Pinchart --- drivers/media/media-device.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 5ebb3cd..f001c27 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -245,10 +245,10 @@ static long __media_device_get_topology(struct media_device *mdev, struct media_interface *intf; struct media_pad *pad; struct media_link *link; - struct media_v2_entity kentity, *uentity; - struct media_v2_interface kintf, *uintf; - struct media_v2_pad kpad, *upad; - struct media_v2_link klink, *ulink; + struct media_v2_entity kentity, __user *uentity; + struct media_v2_interface kintf, __user *uintf; + struct media_v2_pad kpad, __user *upad; + struct media_v2_link klink, __user *ulink; unsigned int i; int ret = 0;