Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266115AbUJEWSp (ORCPT ); Tue, 5 Oct 2004 18:18:45 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266200AbUJEWSp (ORCPT ); Tue, 5 Oct 2004 18:18:45 -0400 Received: from fw.osdl.org ([65.172.181.6]:25222 "EHLO mail.osdl.org") by vger.kernel.org with ESMTP id S266181AbUJEWRh (ORCPT ); Tue, 5 Oct 2004 18:17:37 -0400 Date: Tue, 5 Oct 2004 15:21:26 -0700 From: Andrew Morton To: Jesper Juhl Cc: linux-kernel@vger.kernel.org, markus.lidel@shadowconnect.com, alan@lxorguk.ukuu.org.uk Subject: Re: [PATCH] add missing checks of __copy_to_user return value in i2o_config.c Message-Id: <20041005152126.6de415dc.akpm@osdl.org> In-Reply-To: References: X-Mailer: Sylpheed version 0.9.7 (GTK+ 1.2.10; i586-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: 482 Lines: 15 Jesper Juhl wrote: > > - __copy_to_user(kxfer.buf, buffer.virt, fragsize); > + if (__copy_to_user(kxfer.buf, buffer.virt, fragsize)) > + return -EFAULT; > + > i2o_dma_free(&c->pdev->dev, &buffer); > Obvious leak. - 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/