mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-19 13:11:14 +00:00
missing bits of "splice: fix racy pipe->buffers uses"
that commit has fixed only the parts of that mess in fs/splice.c itself; there had been more in several other ->splice_read() instances... Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
19dfc1f5f2
commit
a786c06d9f
3 changed files with 4 additions and 4 deletions
|
@ -1251,7 +1251,7 @@ static ssize_t subbuf_splice_actor(struct file *in,
|
|||
subbuf_pages = rbuf->chan->alloc_size >> PAGE_SHIFT;
|
||||
pidx = (read_start / PAGE_SIZE) % subbuf_pages;
|
||||
poff = read_start & ~PAGE_MASK;
|
||||
nr_pages = min_t(unsigned int, subbuf_pages, pipe->buffers);
|
||||
nr_pages = min_t(unsigned int, subbuf_pages, spd.nr_pages_max);
|
||||
|
||||
for (total_len = 0; spd.nr_pages < nr_pages; spd.nr_pages++) {
|
||||
unsigned int this_len, this_end, private;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue