All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Vegard Nossum <vegard.nossum@oracle.com>,
	"Michael Kerrisk (man-pages)" <mtk.manpages@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: Willy Tarreau <w@1wt.eu>,
	socketpair@gmail.com,
	Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>,
	Jens Axboe <axboe@fb.com>, Al Viro <viro@zeniv.linux.org.uk>,
	linux-api@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/8] pipe: move limit checking logic into pipe_set_size()
Date: Thu, 29 Sep 2016 07:52:22 -0700	[thread overview]
Message-ID: <1475160742.2027.2.camel@perches.com> (raw)
In-Reply-To: <1e7bdfb3-0772-c152-8da1-3d22b56682b3@oracle.com>

On Thu, 2016-09-29 at 13:26 +0200, Vegard Nossum wrote:
> On 08/29/2016 02:21 AM, Michael Kerrisk (man-pages) wrote:
> > This is a preparatory patch for following work. Move the F_SETPIPE_SZ
> > limit-checking logic from pipe_fcntl() into pipe_set_size().  This
> > simplifies the code a little, and allows for reworking required in
> > a later patch that fixes the limit checking in pipe_set_size()
> 
> > +	if ((too_many_pipe_buffers_hard(pipe->user) ||
> > +			too_many_pipe_buffers_soft(pipe->user)) &&
> > +			capable(CAP_SYS_RESOURCE) && !capable(CAP_SYS_ADMIN))
> > +		return -EPERM;
> Some might say the indentation is off here. Not sure why checkpatch
> didn't care.

Parenthesis alignment is a CHECK not a WARNING.

It's only reported with --strict or if the code is
in drivers/staging, net/, or drivers/net/

  reply	other threads:[~2016-09-29 14:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <ef9ce203-6683-31b1-26dc-e0b823aba73e@gmail.com>
2016-08-29  0:20 ` [PATCH v2 1/8] pipe: relocate round_pipe_size() above pipe_set_size() Michael Kerrisk (man-pages)
2016-08-29  0:21 ` [PATCH v2 2/8] pipe: move limit checking logic into pipe_set_size() Michael Kerrisk (man-pages)
2016-09-29 11:26   ` Vegard Nossum
2016-09-29 14:52     ` Joe Perches [this message]
2016-08-29  0:21 ` [PATCH v2 3/8] pipe: refactor argument for account_pipe_buffers() Michael Kerrisk (man-pages)
     [not found] ` <ef9ce203-6683-31b1-26dc-e0b823aba73e-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-08-29  0:21   ` [PATCH v2 4/8] pipe: fix limit checking in pipe_set_size() Michael Kerrisk (man-pages)
2016-08-29  0:21     ` Michael Kerrisk (man-pages)
2016-08-29  0:21 ` [PATCH v2 5/8] pipe: simplify logic in alloc_pipe_info() Michael Kerrisk (man-pages)
     [not found]   ` <aef030c1-0257-98a9-4988-186efa48530c-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-09-29 11:46     ` Vegard Nossum
2016-09-29 11:46       ` Vegard Nossum
2016-08-29  0:21 ` [PATCH v2 6/8] pipe: fix limit checking " Michael Kerrisk (man-pages)
2016-08-29  0:21 ` [PATCH v2 7/8] pipe: make account_pipe_buffers() return a value, and use it Michael Kerrisk (man-pages)
2016-08-29  0:22 ` [PATCH v2 8/8] pipe: cap initial pipe capacity according to pipe-max-size limit Michael Kerrisk (man-pages)

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=1475160742.2027.2.camel@perches.com \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@fb.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mtk.manpages@gmail.com \
    --cc=penguin-kernel@I-love.SAKURA.ne.jp \
    --cc=socketpair@gmail.com \
    --cc=vegard.nossum@oracle.com \
    --cc=viro@zeniv.linux.org.uk \
    --cc=w@1wt.eu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.