linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Axboe <jaxboe@fusionio.com>
To: Miklos Szeredi <miklos@szeredi.hu>
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
Date: Tue, 08 Jun 2010 20:59:38 +0200	[thread overview]
Message-ID: <4C0E931A.2030509@fusionio.com> (raw)
In-Reply-To: <E1OM0Vn-0003xX-E5@pomaz-ex.szeredi.hu>

On 2010-06-08 17:14, Miklos Szeredi wrote:
> On Tue, 08 Jun 2010, Miklos Szeredi wrote:
>> From: Miklos Szeredi <mszeredi@suse.cz>
>>
>> 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


      reply	other threads:[~2010-06-08 18:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-08 14:28 [PATCH 1/2] pipe: fix pipe buffer resizing Miklos Szeredi
2010-06-08 14:30 ` [PATCH 2/2] pipe: remove bogus check from "set size" fcntl Miklos Szeredi
2010-06-08 15:14   ` Miklos Szeredi
2010-06-08 18:59     ` Jens Axboe [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C0E931A.2030509@fusionio.com \
    --to=jaxboe@fusionio.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=miklos@szeredi.hu \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).