From: Dan Carpenter <dan.carpenter@linaro.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Dietmar Eggemann <dietmar.eggemann@arm.com>,
Steven Rostedt <rostedt@goodmis.org>,
Ben Segall <bsegall@google.com>, Mel Gorman <mgorman@suse.de>,
Valentin Schneider <vschneid@redhat.com>,
Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
Michal Hocko <mhocko@suse.com>,
linux-mm@kvack.org, linux-kernel <linux-kernel@vger.kernel.org>
Subject: [bug report] io_uring: add task fork hook
Date: Fri, 6 Feb 2026 16:40:23 +0300 [thread overview]
Message-ID: <aYXvR4WQ0LEYxMPK@stanley.mountain> (raw)
In-Reply-To: <caa37f28-a2e8-4e0a-a9ce-a365ce805e4b@stanley.mountain>
[ Smatch checking is paused while we raise funding. #SadFace
https://lore.kernel.org/all/aTaiGSbWZ9DJaGo7@stanley.mountain/ -dan ]
Hello Jens Axboe,
Commit 4f08520591a2 ("io_uring: add task fork hook") from Jan 16,
2026 (linux-next), leads to the following Smatch static checker
warning:
kernel/fork.c:2544 copy_process()
warn: passing zero to 'ERR_PTR'
kernel/fork.c
2128 #ifdef CONFIG_IO_URING
2129 p->io_uring = NULL;
2130 retval = io_uring_fork(p);
The patch added this assignment.
2131 if (unlikely(retval))
2132 goto bad_fork_cleanup_delayacct;
2133 #endif
2134
2135 p->default_timer_slack_ns = current->timer_slack_ns;
2136
2137 #ifdef CONFIG_PSI
2138 p->psi_flags = 0;
2139 #endif
2140
2141 task_io_accounting_init(&p->ioac);
2142 acct_clear_integrals(p);
2143
2144 posix_cputimers_init(&p->posix_cputimers);
2145 tick_dep_init_task(p);
2146
2147 p->io_context = NULL;
2148 audit_set_context(p, NULL);
2149 cgroup_fork(p);
2150 if (args->kthread) {
2151 if (!set_kthread_struct(p))
2152 goto bad_fork_cleanup_delayacct;
So now retval is success where previously it had been -EAGAIN
2153 }
regards,
dan carpenter
next parent reply other threads:[~2026-02-06 13:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <caa37f28-a2e8-4e0a-a9ce-a365ce805e4b@stanley.mountain>
2026-02-06 13:40 ` Dan Carpenter [this message]
2026-02-06 14:28 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=aYXvR4WQ0LEYxMPK@stanley.mountain \
--to=dan.carpenter@linaro.org \
--cc=Liam.Howlett@oracle.com \
--cc=axboe@kernel.dk \
--cc=bsegall@google.com \
--cc=dietmar.eggemann@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lorenzo.stoakes@oracle.com \
--cc=mgorman@suse.de \
--cc=mhocko@suse.com \
--cc=rostedt@goodmis.org \
--cc=rppt@kernel.org \
--cc=surenb@google.com \
--cc=vbabka@suse.cz \
--cc=vschneid@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox