]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
io_uring/net: punt IORING_OP_BIND async if it needs file create
authorJens Axboe <axboe@kernel.dk>
Fri, 15 May 2026 16:19:09 +0000 (10:19 -0600)
committerJens Axboe <axboe@kernel.dk>
Fri, 15 May 2026 17:02:16 +0000 (11:02 -0600)
commitccd25890f73c082fe2657ed227b497d6ac5fdc40
tree74848dee416e5d2fcff71f901b36131141834269
parentf44d38a31f1802b7222adaea9ee69f9d280f698a
io_uring/net: punt IORING_OP_BIND async if it needs file create

For two reasons:

1) An opcode cannot block inside io_uring_enter() doing submissions, as
   it'll stall the submission side pipeline.

2) Ending up in sb_start_write() -> __sb_start_write() ->
   percpu_down_read_freezable() introduces a new lockdep edge, which it
   correctly complains about.

Check if the socket type is AF_UNIX and has a non-empty pathname. If it
does, mark it REQ_F_FORCE_ASYNC to punt the submission to io-wq rather
than attempt to do it inline.

Fixes: 7481fd93fa0a ("io_uring: Introduce IORING_OP_BIND")
Reviewed-by: Gabriel Krisman Bertazi <krisman@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
io_uring/net.c