CVSROOT: /cvs Module name: src Changes by: m...@cvs.openbsd.org 2025/01/07 16:13:46
Modified files: sys/kern : uipc_socket.c Log message: Stop doing `ssp_task' and `ssp_idleto' re-initialization in sosplice(). Initialize them only during so->so_sp or sosp->so_sp allocation and never re-initialize again. sounsplice() could left `ssp_task' scheduled. This means it is linked to pending queue and TASK_ONQUEUE bit is set on `t_flags'. task_set() overrides `t_flags' with 0, so the next task_add() could break pending queue with double insertion. The described problem is also applicable to `ssp_idleto' timer. To prevent task and timeout from being rescheduled during sounsplice(), do task_del() and timeout_del() after actual unsplicing. Not critical, but prevents possible dry run. Problem reported, fix tested and OK bluhm.