Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755474Ab0FHS7p (ORCPT ); Tue, 8 Jun 2010 14:59:45 -0400 Received: from 0122700014.0.fullrate.dk ([95.166.99.235]:46789 "EHLO kernel.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754320Ab0FHS7n (ORCPT ); Tue, 8 Jun 2010 14:59:43 -0400 Message-ID: <4C0E931A.2030509@fusionio.com> Date: Tue, 08 Jun 2010 20:59:38 +0200 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100423 Thunderbird/3.0.4 MIME-Version: 1.0 To: Miklos Szeredi CC: akpm@linux-foundation.org, torvalds@linux-foundation.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] pipe: remove bogus check from "set size" fcntl References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 928 Lines: 27 On 2010-06-08 17:14, Miklos Szeredi wrote: > On Tue, 08 Jun 2010, Miklos Szeredi wrote: >> From: Miklos Szeredi >> >> As it stands this check compares the number of pages to the page size. >> This makes no sense and makes the fcntl fail in almost any sane case. >> >> Fix it by removing the check completely, round_pipe_size() will make >> sure that nr_pages >= 1 anyway. > > Hmm, not quite true. It can actually return zero if round_pipe_size() > overflows unsigned int. > > Updated patch below. Thanks, I'll get these tested and merged asap. The copy code apparently wasn't well tested. And this fcntl() bug snuck in with the API changes :/ -- Jens Axboe -- 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/