Re: [PATCH 2/2] pipe: remove bogus check from "set size" fcntl

From: Jens Axboe
Date: Tue Jun 08 2010 - 14:59:48 EST


On 2010-06-08 17:14, Miklos Szeredi wrote:
> On Tue, 08 Jun 2010, Miklos Szeredi wrote:
>> From: Miklos Szeredi <mszeredi@xxxxxxx>
>>
>> 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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/