[lkml]   [2019]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH 0/2] pipe: Fixes [ver #2]

Hi Linus, Eric,

Here are a couple of patches to fix bugs syzbot found in the pipe changes:

(1) An assertion check will sometimes trip when polling a pipe because the
ring size and indices used are approximate and may be being changed

An equivalent approximate calculation was done previously, but without
the assertion check, so I've just dropped the check. To make it
accurate, the pipe mutex would need to be taken or the spin lock could
be used - but usage of the spinlock would need to be rolled out into
splice, iov_iter and other places for that.

(2) The index mask and the max_usage values cannot be cached across
pipe_wait() as F_SETPIPE_SZ could have been called during the wait.
This can cause pipe_write() to break.

David Howells (2):
pipe: Remove assertion from pipe_poll()
pipe: Fix missing mask update after pipe_wait()

fs/pipe.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)

 \ /
  Last update: 2019-12-05 23:30    [W:0.096 / U:1.936 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site