mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
io_uring/dma-buf: don't fail fixed buffers without dma-buf support
io_attach_dmabuf_map() is called for every fixed read/write, but returns
-EOPNOTSUPP when CONFIG_DMA_SHARED_BUFFER is disabled before checking
whether the request uses a dma-buf at all. So READ_FIXED and WRITE_FIXED
fail for ordinary registered buffers. Check REQ_F_DMABUF first.
Fixes: 62e4bf5b25 ("io_uring/rsrc: add dmabuf backed registered buffers")
Signed-off-by: Anuj Gupta <anuj20.g@samsung.com>
Link: https://patch.msgid.link/20261022132027.2293931-1-anuj1072538@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
fd13f31ac6
commit
45b716456d
|
|
@ -34,10 +34,10 @@ static inline int io_attach_dmabuf_map(struct io_kiocb *req,
|
|||
struct dma_buf_io_map *map;
|
||||
struct io_buf_dma *bd;
|
||||
|
||||
if (!IS_ENABLED(CONFIG_DMA_SHARED_BUFFER))
|
||||
return -EOPNOTSUPP;
|
||||
if (!(req->flags & REQ_F_DMABUF))
|
||||
return 0;
|
||||
if (!IS_ENABLED(CONFIG_DMA_SHARED_BUFFER))
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
bd = req->buf_node->buf->priv;
|
||||
map = dma_buf_io_get_map(bd->ctx, nowait);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user