File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -905,22 +905,22 @@ int io_sendzc_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe)
905
905
if (zc -> flags & ~(IORING_RECVSEND_POLL_FIRST |
906
906
IORING_RECVSEND_FIXED_BUF ))
907
907
return - EINVAL ;
908
+ notif = zc -> notif = io_alloc_notif (ctx );
909
+ if (!notif )
910
+ return - ENOMEM ;
911
+ notif -> cqe .user_data = req -> cqe .user_data ;
912
+ notif -> cqe .res = 0 ;
913
+ notif -> cqe .flags = IORING_CQE_F_NOTIF ;
914
+ req -> flags |= REQ_F_NEED_CLEANUP ;
908
915
if (zc -> flags & IORING_RECVSEND_FIXED_BUF ) {
909
916
unsigned idx = READ_ONCE (sqe -> buf_index );
910
917
911
918
if (unlikely (idx >= ctx -> nr_user_bufs ))
912
919
return - EFAULT ;
913
920
idx = array_index_nospec (idx , ctx -> nr_user_bufs );
914
921
req -> imu = READ_ONCE (ctx -> user_bufs [idx ]);
915
- io_req_set_rsrc_node (req , ctx , 0 );
922
+ io_req_set_rsrc_node (notif , ctx , 0 );
916
923
}
917
- notif = zc -> notif = io_alloc_notif (ctx );
918
- if (!notif )
919
- return - ENOMEM ;
920
- notif -> cqe .user_data = req -> cqe .user_data ;
921
- notif -> cqe .res = 0 ;
922
- notif -> cqe .flags = IORING_CQE_F_NOTIF ;
923
- req -> flags |= REQ_F_NEED_CLEANUP ;
924
924
925
925
zc -> buf = u64_to_user_ptr (READ_ONCE (sqe -> addr ));
926
926
zc -> len = READ_ONCE (sqe -> len );
You can’t perform that action at this time.
0 commit comments