Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
kernel/relay.c: fix read_pos error when multiple readers
When reading, read_pos should start with bytes_consumed, not file->f_pos. Because when there is more than one reader, the read_pos corresponding to file->f_pos may have been consumed, which will cause the data that has been consumed to be read and the bytes_consumed update error. Signed-off-by: Pengcheng Yang <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Reviewed-by: Jens Axboe <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Jann Horn <[email protected]> Cc: Al Viro <[email protected]>e Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information