Re: [PATCH] net: Do not break out of sk_stream_wait_memory() with TIF_NOTIFY_SIGNAL
From: Jens Axboe
Date: Fri Mar 15 2024 - 12:43:29 EST
On 3/15/24 4:01 AM, Sascha Hauer wrote:
> It can happen that a socket sends the remaining data at close() time.
> With io_uring and KTLS it can happen that sk_stream_wait_memory() bails
> out with -512 (-ERESTARTSYS) because TIF_NOTIFY_SIGNAL is set for the
> current task. This flag has been set in io_req_normal_work_add() by
> calling task_work_add().
>
> This patch replaces signal_pending() with task_sigpending(), thus ignoring
> the TIF_NOTIFY_SIGNAL flag.
Reviewed-by: Jens Axboe <axboe@xxxxxxxxx>
Should probably also flag this for stable, 5.10+ I think as the task
sigpending got backported that far.
--
Jens Axboe