From patchwork Wed Dec 8 19:16:08 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 391772 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 oB8JHgw2005753 for ; Wed, 8 Dec 2010 19:17:42 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756319Ab0LHTRl (ORCPT ); Wed, 8 Dec 2010 14:17:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:28578 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756314Ab0LHTRk (ORCPT ); Wed, 8 Dec 2010 14:17:40 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oB8JHcw8014603 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 8 Dec 2010 14:17:38 -0500 Received: from xavier.bos.redhat.com (xavier.bos.redhat.com [10.16.16.50]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oB8JGoRu010975; Wed, 8 Dec 2010 14:17:38 -0500 From: Jarod Wilson To: linux-media@vger.kernel.org Cc: Dan Carpenter Subject: [PATCH 10/12] lirc_dev: add some __user annotations Date: Wed, 8 Dec 2010 14:16:08 -0500 Message-Id: <1291835770-21592-11-git-send-email-jarod@redhat.com> In-Reply-To: <1291835770-21592-1-git-send-email-jarod@redhat.com> References: <1291835770-21592-1-git-send-email-jarod@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 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, 08 Dec 2010 19:17:43 +0000 (UTC) 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)]; 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