[lkml]   [2017]   [Sep]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH RFC 0/3] A few round_pipe_size() and pipe-max-size fixups
On 09/14/17 06:26, Michael Kerrisk (man-pages) wrote:
> Hello Joe,
> On 5 September 2017 at 16:44, Joe Lawrence <> wrote:
>> While backporting Michael's "pipe: fix limit handling" [1] patchset to a
>> distro-kernel, Mikulas noticed that current upstream pipe limit handling
>> contains a few problems:
>> 1 - round_pipe_size() nr_pages overflow on 32bit: this would
>> subsequently try roundup_pow_of_two(0), which is undefined.

Sorry I missed the initial posting of this.

The man page for F_SETPIPE_SZ (
"Attempts to set the pipe capacity below the page size are
silently rounded up to the page size."

That implies to me that setting pipe size to 0 would round up to PAGE_SIZE.
Doesn't patch 1/3 change that to return -EINVAL?

Otherwise all 3 patches look good to me.


 \ /
  Last update: 2017-09-14 19:29    [W:0.197 / U:0.852 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site