On 31/03/2021 21:24, Alexey Dobriyan wrote: > The code below will overflow because TASK_COMM_LEN is 16 but PID can be > as large as 1 billion which is 10 digit number. > > Currently not even Fedora ships pid_max that large but still... And is safer limited in any case. Thanks > > Alexey > > static int io_sq_thread(void *data) > { > struct io_sq_data *sqd = data; > struct io_ring_ctx *ctx; > unsigned long timeout = 0; > char buf[TASK_COMM_LEN]; > DEFINE_WAIT(wait); > > sprintf(buf, "iou-sqp-%d", sqd->task_pid); > -- Pavel Begunkov