aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/igc
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2024-03-04 15:57:15 -0800
committerChristian Brauner <[email protected]>2024-03-05 10:40:58 +0100
commit961ebd120565cb60cebe21cb634fbc456022db4a (patch)
tree32f131221c73c86159b4be89dcc022f45ebf369b /drivers/net/ethernet/intel/igc
parent28468cbed92ea5eed19e2cbd2d55758c3c7938ca (diff)
fs/aio: Check IOCB_AIO_RW before the struct aio_kiocb conversion
The first kiocb_set_cancel_fn() argument may point at a struct kiocb that is not embedded inside struct aio_kiocb. With the current code, depending on the compiler, the req->ki_ctx read happens either before the IOCB_AIO_RW test or after that test. Move the req->ki_ctx read such that it is guaranteed that the IOCB_AIO_RW test happens first. Reported-by: Eric Biggers <[email protected]> Cc: Benjamin LaHaise <[email protected]> Cc: Eric Biggers <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Avi Kivity <[email protected]> Cc: Sandeep Dhavale <[email protected]> Cc: Jens Axboe <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Kent Overstreet <[email protected]> Cc: [email protected] Fixes: b820de741ae4 ("fs/aio: Restrict kiocb_set_cancel_fn() to I/O submitted via libaio") Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Jens Axboe <[email protected]> Reviewed-by: Eric Biggers <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
Diffstat (limited to 'drivers/net/ethernet/intel/igc')
0 files changed, 0 insertions, 0 deletions