PT-2026-162820
CVE-2026-99853
·
Published
2026-11-30
·
Updated
2026-11-30
Description by
Score
N/A
Not availableNo severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
In the Linux kernel, the following vulnerability has been resolved:
nvme-tcp: fix io work priority inversion when send mutex is held
Commit f42d4796ee10 ("nvme-tcp: fix I/O stalls on congested sockets")
added a check in nvme tcp io work() that sets pending to true when the
queue has pending requests and the socket is writeable. The check is
placed after the mutex trylock() block, so it also runs when
mutex trylock(&queue->send mutex) failed and io work did not send
anything.
When .queue rq sends a request directly from its own context, it holds
send mutex and can give up the CPU in lock sock nested() when another
task needs the CPU, for example the io work kworker of the same queue,
which runs on the same CPU. Then io work cannot take send mutex, but
the requests are still on req list and the socket is writeable, so
pending is set to true. io work loops until the deadline and queues
itself again on io cpu, without sleeping.
This is a priority inversion. io work runs on the high priority
nvme tcp wq and cannot make progress until send mutex is released, but
it keeps running. The task holding send mutex runs at normal priority
and needs the CPU to release it. The scheduler keeps giving the CPU to
io work, so the task holding send mutex may not run again, and the
requests on the queue are not sent and time out.
This is the same problem that commit 70f437fb4395 ("nvme-tcp: fix
io work priority inversion") fixed. That commit removed
"pending = !llist empty(&queue->req list)" from the path where
mutex trylock() fails, and let the task holding send mutex queue
io work again in nvme tcp queue request() after it releases the mutex.
The new check brings back the same behavior in a different form.
Two things make this easier to hit. nvme tcp queue request() sends
directly only when it runs on io cpu, so the task that takes send mutex
is on the same CPU as the io work kworker of that queue when it takes
the mutex. Also, when the tasks are in a cgroup with the cpu controller
enabled, the whole group competes with the nice -20 kworker as one
entity, so each task in the group gets even less CPU time.
We hit this on a 6 CPU VM running a database on nvme-tcp storage. In
the vmcore, 2 tasks held send mutex of 2 queues and were runnable in
lock sock nested() for 103 seconds, while the kworkers for those queues
kept running io work on their CPUs. All database tasks were in one
cgroup, which got only about 0.3% of the CPU against the nice -20
kworker. Requests timed out, and blk mq timeout work() waited in
synchronize srcu() for the tasks still in .queue rq.
Only do the pending check if io work could take send mutex. If it could
not, the task holding send mutex sends what it can in
nvme tcp send all(), and queues io work again after it releases the
mutex if requests are still pending, so no request is left behind.
Found an issue in the description? Have something to add? Feel free to write us 👾