From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S269166AbUJFKn5 (ORCPT ); Wed, 6 Oct 2004 06:43:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S269193AbUJFKn5 (ORCPT ); Wed, 6 Oct 2004 06:43:57 -0400 Received: from imladris.demon.co.uk ([193.237.130.41]:7176 "EHLO phoenix.infradead.org") by vger.kernel.org with ESMTP id S269166AbUJFKnu (ORCPT ); Wed, 6 Oct 2004 06:43:50 -0400 Date: Wed, 6 Oct 2004 11:43:42 +0100 From: Christoph Hellwig To: Jesper Juhl Cc: linux-kernel , "David A. Hinds" , linux-pcmcia Subject: Re: [PATCH] check the return value of __copy_to_user in drivers/pcmcia/ds.c::ds_ioctl and return -EFAULT if it fails Message-ID: <20041006114342.B29243@infradead.org> Mail-Followup-To: Christoph Hellwig , Jesper Juhl , linux-kernel , "David A. Hinds" , linux-pcmcia References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from juhl-lkml@dif.dk on Wed, Oct 06, 2004 at 12:21:58AM +0200 X-SRS-Rewrite: SMTP reverse-path rewritten from by phoenix.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 06, 2004 at 12:21:58AM +0200, Jesper Juhl wrote: > > CC drivers/pcmcia/ds.o > include/asm/uaccess.h: In function `ds_ioctl': > drivers/pcmcia/ds.c:1049: warning: ignoring return value of `__copy_to_user', declared with attribute warn_unused_result > > Patch adds a check of the return value and returns -EFAULT if > __copy_to_user fails. I think this function should use the non-__ prefix version and remove access_ok again