diff options
| author | Al Viro <[email protected]> | 2023-08-28 22:47:31 +0000 |
|---|---|---|
| committer | Al Viro <[email protected]> | 2023-10-28 00:14:11 +0000 |
| commit | 1939316bf988f3e49a07d9c4dd6f660bf4daa53d (patch) | |
| tree | 41ba99310df374f9125e15ee15f2a8e08dec6dd0 /drivers/fpga/tests/fpga-bridge-test.c | |
| parent | sparc32: fix a braino in fault handling in csum_and_copy_..._user() (diff) | |
| download | kernel-1939316bf988f3e49a07d9c4dd6f660bf4daa53d.tar.gz kernel-1939316bf988f3e49a07d9c4dd6f660bf4daa53d.zip | |
io_uring: kiocb_done() should *not* trust ->ki_pos if ->{read,write}_iter() failed
->ki_pos value is unreliable in such cases. For an obvious example,
consider O_DSYNC write - we feed the data to page cache and start IO,
then we make sure it's completed. Update of ->ki_pos is dealt with
by the first part; failure in the second ends up with negative value
returned _and_ ->ki_pos left advanced as if sync had been successful.
In the same situation write(2) does not advance the file position
at all.
Reviewed-by: Christian Brauner <[email protected]>
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Al Viro <[email protected]>
Diffstat (limited to 'drivers/fpga/tests/fpga-bridge-test.c')
0 files changed, 0 insertions, 0 deletions
