Thread (3 messages) 3 messages, 3 authors, 2016-09-29

Re: [PATCH v2 2/8] pipe: move limit checking logic into pipe_set_size()

flat view

From: Vegard Nossum <hidden>
Date: 2016-09-29 11:27:08
Also in: lkml

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()
quoted hunk ↗ jump to hunk
+	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.

Otherwise looks fine to me.


Vegard
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help