Xiaobing Li <xiaobing.li@xxxxxxxxxxx> writes: > diff --git a/io_uring/fdinfo.c b/io_uring/fdinfo.c > index f04a43044d91..f0b79c533062 100644 > --- a/io_uring/fdinfo.c > +++ b/io_uring/fdinfo.c > @@ -213,6 +213,12 @@ __cold void io_uring_show_fdinfo(struct seq_file *m, struct file *f) > > } > > + if (ctx->sq_data) { > + seq_printf(m, "PID:\t%d\n", task_pid_nr(ctx->sq_data->thread)); ctx->sq_data and sq_data->thread can become NULL if the queue is being setup/going away. You need to hold the uring_lock and the ctx->sq_data->lock to access this. But task_pid_nr is already published in this file a bit before this hunk. Perhaps drop this line and move the two lines below together with them. > + seq_printf(m, "work:\t%lu\n", ctx->sq_data->work); > + seq_printf(m, "total:\t%lu\n", ctx->sq_data->total); > + } -- Gabriel Krisman Bertazi