From patchwork Wed Nov 17 05:13:39 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Carpenter X-Patchwork-Id: 330991 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAH5E8nq007659 for ; Wed, 17 Nov 2010 05:14:08 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751349Ab0KQFOG (ORCPT ); Wed, 17 Nov 2010 00:14:06 -0500 Received: from mail-wy0-f174.google.com ([74.125.82.174]:33082 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751109Ab0KQFOF (ORCPT ); Wed, 17 Nov 2010 00:14:05 -0500 Received: by wyb28 with SMTP id 28so1585234wyb.19 for ; Tue, 16 Nov 2010 21:14:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:mime-version:content-type:content-disposition:user-agent; bh=vAbZ9MchILiydG7BjE0DZHpxFK12wPoJBR8nXksVVUU=; b=Gv4+qBQ6KVCt1AA3LbopiNMTAJq0qmiDH1PtLMhOiKMMASNjLBvT9lUi8JVDLgDvCM tQBMDUvLYa6gFXjdqny5S+MfFEjV1xLem20cGkxdFOdraYq340ViFM0p0XE7ABcLrhLm ba1gOqQtFFtQ5dMbZPlV7Pzw2K+uAKwO23LgU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:mime-version:content-type :content-disposition:user-agent; b=CLQ5JiK3Aoo4HMZcPp+sfNZNvW4JZrnxoFCtvQrkz1hGz3l7xyXIsvww3mZGXtJzH3 5aA0noG4vWN2eJ4qXwvF366w4Rxkiw77mmnk1uQ+taC41qDsTx7FGKD/OR1pi641uapw dmkxY89Hkkp2l09w7JFZx4KZDEX9ojcd8QIcU= Received: by 10.216.93.9 with SMTP id k9mr7161837wef.89.1289970843335; Tue, 16 Nov 2010 21:14:03 -0800 (PST) Received: from bicker (h14ba.n2.ips.mtn.co.ug [212.88.116.186]) by mx.google.com with ESMTPS id w84sm938954weq.20.2010.11.16.21.13.54 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 16 Nov 2010 21:14:02 -0800 (PST) Date: Wed, 17 Nov 2010 08:13:39 +0300 From: Dan Carpenter To: Mauro Carvalho Chehab Cc: Jarod Wilson , Zimny Lech , linux-media@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [patch 2/3] [media] lirc_dev: add some __user annotations Message-ID: <20101117051339.GE31724@bicker> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Wed, 17 Nov 2010 05:14:08 +0000 (UTC) diff --git a/include/media/lirc_dev.h b/include/media/lirc_dev.h index 54780a5..630e702 100644 --- a/include/media/lirc_dev.h +++ b/include/media/lirc_dev.h @@ -217,9 +217,9 @@ int lirc_dev_fop_open(struct inode *inode, struct file *file); int lirc_dev_fop_close(struct inode *inode, struct file *file); unsigned int lirc_dev_fop_poll(struct file *file, poll_table *wait); long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg); -ssize_t lirc_dev_fop_read(struct file *file, char *buffer, size_t length, +ssize_t lirc_dev_fop_read(struct file *file, char __user *buffer, size_t length, loff_t *ppos); -ssize_t lirc_dev_fop_write(struct file *file, const char *buffer, size_t length, - loff_t *ppos); +ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer, + size_t length, loff_t *ppos); #endif diff --git a/drivers/media/IR/lirc_dev.c b/drivers/media/IR/lirc_dev.c index 8ab9d87..fbca94f 100644 --- a/drivers/media/IR/lirc_dev.c +++ b/drivers/media/IR/lirc_dev.c @@ -627,7 +627,7 @@ long lirc_dev_fop_ioctl(struct file *file, unsigned int cmd, unsigned long arg) EXPORT_SYMBOL(lirc_dev_fop_ioctl); ssize_t lirc_dev_fop_read(struct file *file, - char *buffer, + char __user *buffer, size_t length, loff_t *ppos) { @@ -742,7 +742,7 @@ void *lirc_get_pdata(struct file *file) EXPORT_SYMBOL(lirc_get_pdata); -ssize_t lirc_dev_fop_write(struct file *file, const char *buffer, +ssize_t lirc_dev_fop_write(struct file *file, const char __user *buffer, size_t length, loff_t *ppos) { struct irctl *ir = irctls[iminor(file->f_dentry->d_inode)];