Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964970AbVLQUjQ (ORCPT ); Sat, 17 Dec 2005 15:39:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S964975AbVLQUjP (ORCPT ); Sat, 17 Dec 2005 15:39:15 -0500 Received: from smtp.osdl.org ([65.172.181.4]:46049 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S964956AbVLQUjB (ORCPT ); Sat, 17 Dec 2005 15:39:01 -0500 Date: Sat, 17 Dec 2005 12:38:38 -0800 From: Andrew Morton To: Roland Dreier Cc: linux-kernel@vger.kernel.org, openib-general@openib.org Subject: Re: [PATCH 04/13] [RFC] ipath LLD core, part 1 Message-Id: <20051217123838.7732c201.akpm@osdl.org> In-Reply-To: <200512161548.20XjmmxDHjOZRXcz@cisco.com> References: <200512161548.lRw6KI369ooIXS9o@cisco.com> <200512161548.20XjmmxDHjOZRXcz@cisco.com> X-Mailer: Sylpheed version 2.1.8 (GTK+ 2.8.7; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 615 Lines: 15 Roland Dreier wrote: > > + if ((ret = copy_from_user(&rpkt, p, sizeof rpkt))) { > + _IPATH_DBG("Failed to copy in pkt struct (%d)\n", ret); > + return ret; > + } The driver does this quite a lot. copy_from_user() will return the number of bytes remaining to copy. So I think we'll be wanting `return -EFAULT;' in lots of places rather than this. - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/