Commit 9ffa13f
io_uring: pin context while queueing deferred tw
Unlike normal tw, nothing prevents deferred tw to be executed right
after an tw item added to ->work_llist in io_req_local_work_add(). For
instance, the waiting task may get waken up by CQ posting or a normal
tw. Thus we need to pin the ring for the rest of io_req_local_work_add()
Cc: [email protected]
Fixes: c0e0d6b ("io_uring: add IORING_SETUP_DEFER_TASKRUN")
Signed-off-by: Pavel Begunkov <[email protected]>
Link: https://lore.kernel.org/r/1a79362b9c10b8523ef70b061d96523650a23344.1672795998.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <[email protected]>1 parent af82425 commit 9ffa13f
1 file changed
+7
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1236 | 1236 | | |
1237 | 1237 | | |
1238 | 1238 | | |
1239 | | - | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
1240 | 1243 | | |
| 1244 | + | |
1241 | 1245 | | |
1242 | 1246 | | |
1243 | 1247 | | |
1244 | 1248 | | |
1245 | 1249 | | |
| 1250 | + | |
1246 | 1251 | | |
1247 | 1252 | | |
1248 | 1253 | | |
| |||
1252 | 1257 | | |
1253 | 1258 | | |
1254 | 1259 | | |
| 1260 | + | |
1255 | 1261 | | |
1256 | 1262 | | |
1257 | 1263 | | |
| |||
0 commit comments