]> git.baikalelectronics.ru Git - kernel.git/commit
pipe: Allow pipes to have kernel-reserved slots
authorDavid Howells <dhowells@redhat.com>
Wed, 16 Oct 2019 15:47:32 +0000 (16:47 +0100)
committerDavid Howells <dhowells@redhat.com>
Fri, 15 Nov 2019 16:22:54 +0000 (16:22 +0000)
commitec4bea24f1819050efcd5f5a5ee71680e2923525
tree39d5e543cf914b26bdf4937b15d167c66c615f45
parent8dccd127be7672b085a19fad305935e9e4f0b6ef
pipe: Allow pipes to have kernel-reserved slots

Split pipe->ring_size into two numbers:

 (1) pipe->ring_size - indicates the hard size of the pipe ring.

 (2) pipe->max_usage - indicates the maximum number of pipe ring slots that
     userspace orchestrated events can fill.

This allows for a pipe that is both writable by the general kernel
notification facility and by userspace, allowing plenty of ring space for
notifications to be added whilst preventing userspace from being able to
pin too much unswappable kernel space.

Signed-off-by: David Howells <dhowells@redhat.com>
fs/fuse/dev.c
fs/pipe.c
fs/splice.c
include/linux/pipe_fs_i.h
lib/iov_iter.c