<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/drivers/block, branch master</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>Merge tag 'block-7.4-20261112' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux</title>
<updated>2026-11-13T18:31:05+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-11-13T18:31:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e93fd809fb5692d1571bd008988ba734fd7fc976'/>
<id>e93fd809fb5692d1571bd008988ba734fd7fc976</id>
<content type='text'>
Pull block fixes from Jens Axboe:

 - ublk fixes: don't publish a new device in the idr until it's fully
   set up, and don't hold ublk_ctl_mutex across device removal, as a
   stuck filesystem on one device otherwise blocked ADD_DEV and DEL_DEV
   for every other ublk device.

 - s390/dasd fixes: re-initialize the RCD buffer magic before every
   request start, fix a wrong free and refcount leak in the check_tcw
   error path, don't trust the userspace-supplied result field in the
   format check, and a typo fix.

* tag 'block-7.4-20261112' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
  s390/dasd: Don't trust userspace-supplied result field in format check
  s390/dasd: Fix wrong free and refcount leak in build_check_tcw error path
  s390/dasd: Re-initialize RCD buffer with "V1.0" before every start
  s390/dasd: Fix typo 'immediatly' -&gt; 'immediately'
  ublk: don't take ublk_ctl_mutex in DEL_DEV
  ublk: publish a new device by its id only once it is set up
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull block fixes from Jens Axboe:

 - ublk fixes: don't publish a new device in the idr until it's fully
   set up, and don't hold ublk_ctl_mutex across device removal, as a
   stuck filesystem on one device otherwise blocked ADD_DEV and DEL_DEV
   for every other ublk device.

 - s390/dasd fixes: re-initialize the RCD buffer magic before every
   request start, fix a wrong free and refcount leak in the check_tcw
   error path, don't trust the userspace-supplied result field in the
   format check, and a typo fix.

* tag 'block-7.4-20261112' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux:
  s390/dasd: Don't trust userspace-supplied result field in format check
  s390/dasd: Fix wrong free and refcount leak in build_check_tcw error path
  s390/dasd: Re-initialize RCD buffer with "V1.0" before every start
  s390/dasd: Fix typo 'immediatly' -&gt; 'immediately'
  ublk: don't take ublk_ctl_mutex in DEL_DEV
  ublk: publish a new device by its id only once it is set up
</pre>
</div>
</content>
</entry>
<entry>
<title>ublk: don't take ublk_ctl_mutex in DEL_DEV</title>
<updated>2026-11-09T21:40:42+00:00</updated>
<author>
<name>Mark Korenberg</name>
<email>socketpair@gmail.com</email>
</author>
<published>2026-11-04T19:25:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=8067050e7226844fb32062b5cea947e5897d3d7e'/>
<id>8067050e7226844fb32062b5cea947e5897d3d7e</id>
<content type='text'>
ublk_ctrl_del_dev() holds the global ublk_ctl_mutex across
ublk_remove(). Stopping the device calls del_gendisk(), which syncs the
filesystem on the disk. If that filesystem is stuck, DEL_DEV never
returns, and ADD_DEV and DEL_DEV of every other ublk device wait for
ublk_ctl_mutex behind it, until reboot. This happens with the server
alive, and also when it dies: the release work then hangs in the same
del_gendisk() with ub-&gt;mutex held, and DEL_DEV sleeps on ub-&gt;mutex
uninterruptibly, holding ublk_ctl_mutex.

DEL_DEV doesn't need the mutex. ADD_DEV is done with the device when
DEL_DEV finds it: the device is found by its id only once it is set up,
since the previous patch. Claiming UB_STATE_DELETED with
test_and_set_bit() lets only one DEL_DEV remove the device, and the
device number is freed under ublk_idr_lock on release. The mutex also
protected unprivileged_ublks_added: make it atomic. ADD_DEV still
checks and increments it under the mutex, so a decrement without it
can only lower the count, and the limit holds.

A second DEL_DEV of the same device used to wait for the first one on
ublk_ctl_mutex. Now it sees UB_STATE_DELETED and, unless it is
DEL_DEV_ASYNC, waits interruptibly for the device number to be freed.
The counter is decremented once the device is removed, so at the limit
ADD_DEV of an unprivileged device fails with -EACCES instead of waiting
for the removal, and the limit is never exceeded, even if the removal
never completes.

Reproducer: XFS on a ublk loop device with an external log on
dm-linear; "dmsetup suspend --nolockfs --noflush" the log device, write
a file and syncfs, SIGKILL the ublk server or not, DEL_DEV the device,
ADD_DEV another one. Before, ADD_DEV hangs on ublk_ctl_mutex until the
log device is resumed. After, it completes; only the DEL_DEV of the
device with the stuck filesystem waits.

Signed-off-by: Mark Korenberg &lt;socketpair@gmail.com&gt;
Reviewed-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Link: https://patch.msgid.link/20261105-ublk-del-gendisk-hang-v1-2-913a91a4314d@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ublk_ctrl_del_dev() holds the global ublk_ctl_mutex across
ublk_remove(). Stopping the device calls del_gendisk(), which syncs the
filesystem on the disk. If that filesystem is stuck, DEL_DEV never
returns, and ADD_DEV and DEL_DEV of every other ublk device wait for
ublk_ctl_mutex behind it, until reboot. This happens with the server
alive, and also when it dies: the release work then hangs in the same
del_gendisk() with ub-&gt;mutex held, and DEL_DEV sleeps on ub-&gt;mutex
uninterruptibly, holding ublk_ctl_mutex.

DEL_DEV doesn't need the mutex. ADD_DEV is done with the device when
DEL_DEV finds it: the device is found by its id only once it is set up,
since the previous patch. Claiming UB_STATE_DELETED with
test_and_set_bit() lets only one DEL_DEV remove the device, and the
device number is freed under ublk_idr_lock on release. The mutex also
protected unprivileged_ublks_added: make it atomic. ADD_DEV still
checks and increments it under the mutex, so a decrement without it
can only lower the count, and the limit holds.

A second DEL_DEV of the same device used to wait for the first one on
ublk_ctl_mutex. Now it sees UB_STATE_DELETED and, unless it is
DEL_DEV_ASYNC, waits interruptibly for the device number to be freed.
The counter is decremented once the device is removed, so at the limit
ADD_DEV of an unprivileged device fails with -EACCES instead of waiting
for the removal, and the limit is never exceeded, even if the removal
never completes.

Reproducer: XFS on a ublk loop device with an external log on
dm-linear; "dmsetup suspend --nolockfs --noflush" the log device, write
a file and syncfs, SIGKILL the ublk server or not, DEL_DEV the device,
ADD_DEV another one. Before, ADD_DEV hangs on ublk_ctl_mutex until the
log device is resumed. After, it completes; only the DEL_DEV of the
device with the stuck filesystem waits.

Signed-off-by: Mark Korenberg &lt;socketpair@gmail.com&gt;
Reviewed-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Link: https://patch.msgid.link/20261105-ublk-del-gendisk-hang-v1-2-913a91a4314d@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ublk: publish a new device by its id only once it is set up</title>
<updated>2026-11-09T21:40:42+00:00</updated>
<author>
<name>Mark Korenberg</name>
<email>socketpair@gmail.com</email>
</author>
<published>2026-11-04T19:25:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e5c463e5074a940c644d54d8fc29aba06709aab0'/>
<id>e5c463e5074a940c644d54d8fc29aba06709aab0</id>
<content type='text'>
ADD_DEV stores the device in ublk_index_idr when it allocates the id,
and control commands find it there as soon as ublk_add_chdev() has
initialized its struct device, before the char device is added. If
dev_set_name() or cdev_device_add() then fails, ublk_add_chdev() drops
the initial reference to free the device. A DEL_DEV that found the
device meanwhile waits for ublk_ctl_mutex, then calls ublk_remove():
cdev_device_del() of a device that was never added, and a second put of
the initial reference, which frees the device under the callers still
holding references.

Reserve the id with a NULL entry, which idr_find() and the idr iterators
skip, and store the device once ublk_add_chdev() succeeded.

Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver")
Signed-off-by: Mark Korenberg &lt;socketpair@gmail.com&gt;
Reviewed-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Link: https://patch.msgid.link/20261105-ublk-del-gendisk-hang-v1-1-913a91a4314d@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ADD_DEV stores the device in ublk_index_idr when it allocates the id,
and control commands find it there as soon as ublk_add_chdev() has
initialized its struct device, before the char device is added. If
dev_set_name() or cdev_device_add() then fails, ublk_add_chdev() drops
the initial reference to free the device. A DEL_DEV that found the
device meanwhile waits for ublk_ctl_mutex, then calls ublk_remove():
cdev_device_del() of a device that was never added, and a second put of
the initial reference, which frees the device under the callers still
holding references.

Reserve the id with a NULL entry, which idr_find() and the idr iterators
skip, and store the device once ublk_add_chdev() succeeded.

Fixes: 71f28f3136af ("ublk_drv: add io_uring based userspace block driver")
Signed-off-by: Mark Korenberg &lt;socketpair@gmail.com&gt;
Reviewed-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Link: https://patch.msgid.link/20261105-ublk-del-gendisk-hang-v1-1-913a91a4314d@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux</title>
<updated>2026-11-08T22:55:54+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-11-08T22:55:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e0d8e8de8bcb1ef7b749033b5af5518ba8df7bec'/>
<id>e0d8e8de8bcb1ef7b749033b5af5518ba8df7bec</id>
<content type='text'>
Pull devm_kmalloc_obj conversion from Kees Cook:

 - treewide refresh of kmalloc_obj() conversions

 - devm_kmalloc_obj conversion rules added to Coccinelle scripting

 - treewide conversion of devm_kmalloc() family to devm_kmalloc_obj()

* tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family
  coccinelle: kmalloc_obj: Include devm_kmalloc_obj conversion rules
  treewide: refresh kmalloc_obj() conversions
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull devm_kmalloc_obj conversion from Kees Cook:

 - treewide refresh of kmalloc_obj() conversions

 - devm_kmalloc_obj conversion rules added to Coccinelle scripting

 - treewide conversion of devm_kmalloc() family to devm_kmalloc_obj()

* tag 'devm_kmalloc_obj-v7.4-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux:
  treewide: Convert devm_kmalloc() family to the devm_kmalloc_obj() family
  coccinelle: kmalloc_obj: Include devm_kmalloc_obj conversion rules
  treewide: refresh kmalloc_obj() conversions
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'block-7.4-20261106' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux</title>
<updated>2026-11-06T20:36:20+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-11-06T20:36:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=c53d8fc9a7571b63482548a7e5284ef9f025fd3f'/>
<id>c53d8fc9a7571b63482548a7e5284ef9f025fd3f</id>
<content type='text'>
Pull block fixes from Jens Axboe:

 - NVMe fixes via Keith:
    - nvme-tcp use-after-free in nvme_tcp_free_ctrl() on a failed
      connect, and the nvme-rdma counterpart of the NULL queue-&gt;ctrl on
      reconnect
    - nvmet-rdma iWARP disconnect and device removal fixes
    - nvmet-tcp: ask for the TLS record type on every receive, and bound
      the connections accepted per work run so a connect flood can't
      hold up port removal; nvmet-auth keep the old keys if the new ones
      fail to decode; nvme-loop delete the controller if a reset fails
    - nvmet-auth reject incomplete DHCHAP messages, and a keep-alive
      timeout overflow
    - nvmet locking and bounds fixes for tbkas reconnects and the
      traddr/trsvcid configfs writes, don't leak stale memory in the ANA
      log page, and cache the passthru reference across queue_response
    - Wait for SRCU readers before splicing the namespace list, with a
      new list_splice_init_srcu() helper, and drop an extra grace period
      in nvmet_ns_disable()
    - Unregister when pr_register() is given a zero new key, and don't
      drop the cdev reference twice on cdev_device_add() failure
    - Quirks for the ADATA XPG GAMMIX S70 BLADE and KIOXIA XG10d
    - Various smaller fixes and cleanups

 - blk-mq: end the request if getting a keyslot fails, which left the
   in-flight count and zone write plug stuck, reset the queue state on
   scheduler teardown so requests don't stall in software queues, and
   fix an out-of-bounds read in blk_mq_free_rqs() after a failed
   nr_hw_queues update

 - Only serialize elevator switches of the same queue

 - dma-buf bio fixes: don't use the bvec fast path for them, and only
   fail the ones that need block layer PI

 - Reject GPT entries with starting_lba &gt; ending_lba

 - Return the soft block size for compat BLKBSZGET, report the correct
   discard alignment in sysfs, and account the flush sequence latency
   only once in iocost

 - virtio_blk fixes: synchronous quiesce in freeze, freeze the virtqueue
   layout at probe time, clamp max_segments to the ring size, and fix
   zone append sector reporting in batched completion

 - null_blk zone fixes and a cache state reset

 - zloop fixes

 - ublk DEL_DEV_ASYNC permission check, and 32-bit selftest build

* tag 'block-7.4-20261106' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (52 commits)
  nvmet: cache passthru reference in __nvmet_req_complete()
  nvmet: drop the redundant auth check in nvmet_parse_io_cmd()
  nvmet: bound the traddr and trsvcid configfs writes
  nvmet: take subsys-&gt;lock when forcing reconnects for tbkas
  nvme: wait for SRCU readers before splicing the namespace list
  srcu: Add list_splice_init_srcu()
  nvme-pci: add NVME_QUIRK_DMAPOOL_ALIGN_512 for KIOXIA XG10d
  nvmet: don't return memory contents beyond valid data when reading ANA log page
  nvme-pci: add NO_FUA quirk for ADATA XPG GAMMIX S70 BLADE
  nvmet: drop the extra RCU grace period in nvmet_ns_disable()
  nvme-keyring: Add a missing key_put() call to nvme_tls_key_lookup()
  ublk: add missing DEL_DEV_ASYNC to unprivileged permission check
  selftests: ublk: fix the build and file offsets on 32-bit
  nvmet-rdma: disconnect a queue on device removal
  nvmet-rdma: queue the release work under the mutex
  nvmet-rdma: take a device off the list last
  nvmet-tcp: limit the connections accepted per work run
  nvmet-rdma: disconnect only established queues
  nvmet-auth: keep the old keys if the new ones fail
  nvmet-tcp: ask for the TLS record type on every receive
  ...
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull block fixes from Jens Axboe:

 - NVMe fixes via Keith:
    - nvme-tcp use-after-free in nvme_tcp_free_ctrl() on a failed
      connect, and the nvme-rdma counterpart of the NULL queue-&gt;ctrl on
      reconnect
    - nvmet-rdma iWARP disconnect and device removal fixes
    - nvmet-tcp: ask for the TLS record type on every receive, and bound
      the connections accepted per work run so a connect flood can't
      hold up port removal; nvmet-auth keep the old keys if the new ones
      fail to decode; nvme-loop delete the controller if a reset fails
    - nvmet-auth reject incomplete DHCHAP messages, and a keep-alive
      timeout overflow
    - nvmet locking and bounds fixes for tbkas reconnects and the
      traddr/trsvcid configfs writes, don't leak stale memory in the ANA
      log page, and cache the passthru reference across queue_response
    - Wait for SRCU readers before splicing the namespace list, with a
      new list_splice_init_srcu() helper, and drop an extra grace period
      in nvmet_ns_disable()
    - Unregister when pr_register() is given a zero new key, and don't
      drop the cdev reference twice on cdev_device_add() failure
    - Quirks for the ADATA XPG GAMMIX S70 BLADE and KIOXIA XG10d
    - Various smaller fixes and cleanups

 - blk-mq: end the request if getting a keyslot fails, which left the
   in-flight count and zone write plug stuck, reset the queue state on
   scheduler teardown so requests don't stall in software queues, and
   fix an out-of-bounds read in blk_mq_free_rqs() after a failed
   nr_hw_queues update

 - Only serialize elevator switches of the same queue

 - dma-buf bio fixes: don't use the bvec fast path for them, and only
   fail the ones that need block layer PI

 - Reject GPT entries with starting_lba &gt; ending_lba

 - Return the soft block size for compat BLKBSZGET, report the correct
   discard alignment in sysfs, and account the flush sequence latency
   only once in iocost

 - virtio_blk fixes: synchronous quiesce in freeze, freeze the virtqueue
   layout at probe time, clamp max_segments to the ring size, and fix
   zone append sector reporting in batched completion

 - null_blk zone fixes and a cache state reset

 - zloop fixes

 - ublk DEL_DEV_ASYNC permission check, and 32-bit selftest build

* tag 'block-7.4-20261106' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (52 commits)
  nvmet: cache passthru reference in __nvmet_req_complete()
  nvmet: drop the redundant auth check in nvmet_parse_io_cmd()
  nvmet: bound the traddr and trsvcid configfs writes
  nvmet: take subsys-&gt;lock when forcing reconnects for tbkas
  nvme: wait for SRCU readers before splicing the namespace list
  srcu: Add list_splice_init_srcu()
  nvme-pci: add NVME_QUIRK_DMAPOOL_ALIGN_512 for KIOXIA XG10d
  nvmet: don't return memory contents beyond valid data when reading ANA log page
  nvme-pci: add NO_FUA quirk for ADATA XPG GAMMIX S70 BLADE
  nvmet: drop the extra RCU grace period in nvmet_ns_disable()
  nvme-keyring: Add a missing key_put() call to nvme_tls_key_lookup()
  ublk: add missing DEL_DEV_ASYNC to unprivileged permission check
  selftests: ublk: fix the build and file offsets on 32-bit
  nvmet-rdma: disconnect a queue on device removal
  nvmet-rdma: queue the release work under the mutex
  nvmet-rdma: take a device off the list last
  nvmet-tcp: limit the connections accepted per work run
  nvmet-rdma: disconnect only established queues
  nvmet-auth: keep the old keys if the new ones fail
  nvmet-tcp: ask for the TLS record type on every receive
  ...
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge tag 'xsa526-xsa528-7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip</title>
<updated>2026-11-06T16:16:23+00:00</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-11-06T16:16:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=41b77d5dccc7809f5f56f0822e00ea55b42691a8'/>
<id>41b77d5dccc7809f5f56f0822e00ea55b42691a8</id>
<content type='text'>
Pull xen fixes from Juergen Gross:
 "Fix three UAF issues that can be hit in the Xen netback and blkback
  drivers when a guest is forcing a teardown of a PV device"

* tag 'xsa526-xsa528-7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen-blkback: Avoid UAF when reading I/O statistics
  xen-netback: defer xenvif_mcast_addr_list_free()
  xen-netback: Fix UAF when reading statistics data
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Pull xen fixes from Juergen Gross:
 "Fix three UAF issues that can be hit in the Xen netback and blkback
  drivers when a guest is forcing a teardown of a PV device"

* tag 'xsa526-xsa528-7.4-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen-blkback: Avoid UAF when reading I/O statistics
  xen-netback: defer xenvif_mcast_addr_list_free()
  xen-netback: Fix UAF when reading statistics data
</pre>
</div>
</content>
</entry>
<entry>
<title>xen-blkback: Avoid UAF when reading I/O statistics</title>
<updated>2026-11-06T16:09:08+00:00</updated>
<author>
<name>Juergen Gross</name>
<email>jgross@suse.com</email>
</author>
<published>2026-11-05T07:27:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a02926f7c89bfc798ee9514e09694ff4279928a1'/>
<id>a02926f7c89bfc798ee9514e09694ff4279928a1</id>
<content type='text'>
Reading I/O statistics via sysfs concurrently with tearing down a
frontend device might result in UAF or a NULL dereference, as the
reading of the statistics data is not synchronized with freeing the
data.

Use a rwlock for synchronizing.

This is XSA-528 / CVE-2026-100082

Fixes: db6fbc106786 ("xen/blkback: make st_ statistics per ring")
Reported-by: Yehyeong Lee &lt;yhlee@isslab.korea.ac.kr&gt;
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Acked-by: Roger Pau Monné &lt;roger@xenproject.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Reading I/O statistics via sysfs concurrently with tearing down a
frontend device might result in UAF or a NULL dereference, as the
reading of the statistics data is not synchronized with freeing the
data.

Use a rwlock for synchronizing.

This is XSA-528 / CVE-2026-100082

Fixes: db6fbc106786 ("xen/blkback: make st_ statistics per ring")
Reported-by: Yehyeong Lee &lt;yhlee@isslab.korea.ac.kr&gt;
Signed-off-by: Juergen Gross &lt;jgross@suse.com&gt;
Acked-by: Roger Pau Monné &lt;roger@xenproject.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: refresh kmalloc_obj() conversions</title>
<updated>2026-11-06T05:55:37+00:00</updated>
<author>
<name>Kees Cook</name>
<email>kees+treewide@kernel.org</email>
</author>
<published>2026-10-29T06:08:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0af298e62e5cff4ebf9bec47b8711177a7e2f115'/>
<id>0af298e62e5cff4ebf9bec47b8711177a7e2f115</id>
<content type='text'>
Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

	435	kzalloc_objs()
	169	kmalloc_objs()
	 52	kvzalloc_objs()
	 47	kzalloc_obj()
	 42	kvmalloc_objs()
	  8	kmalloc_obj()
	  2	kzalloc_flex()
	  2	kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Refresh the tree with run of the existing Coccinelle rules in
scripts/coccinelle/api/kmalloc_objs.cocci, now that they also convert
arrays of multi-byte integers.

The conversions break down as:

	435	kzalloc_objs()
	169	kmalloc_objs()
	 52	kvzalloc_objs()
	 47	kzalloc_obj()
	 42	kvmalloc_objs()
	  8	kmalloc_obj()
	  2	kzalloc_flex()
	  2	kvmalloc_flex()

and 37 existing kmalloc_obj() family calls drop a redundant GFP_KERNEL.

Build tested with allmodconfig on x86_64 with GCC 16.2.0, and, together
with the devm_kmalloc_obj() conversion that follows, on x86_64, arm64,
i386, arm, riscv, s390, m68k, mips, parisc, sparc, loongarch, arc,
xtensa, and openrisc with GCC 16.2.0 with no new warnings.

Signed-off-by: Kees Cook &lt;kees+treewide@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ublk: add missing DEL_DEV_ASYNC to unprivileged permission check</title>
<updated>2026-11-04T14:58:57+00:00</updated>
<author>
<name>Yitang Yang</name>
<email>yi1tang.yang@gmail.com</email>
</author>
<published>2026-09-01T14:24:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=e6ac1da6a53c5f670bf09e60a2500d15be68d2fc'/>
<id>e6ac1da6a53c5f670bf09e60a2500d15be68d2fc</id>
<content type='text'>
ublk_ctrl_uring_cmd_permission() is missing the UBLK_CMD_DEL_DEV_ASYNC
case, causing the command to always return -EINVAL for unprivileged
ublk devices. Fix it by adding the missing case.

Fixes: 13fe8e6825e4 ("ublk: add UBLK_CMD_DEL_DEV_ASYNC")
Cc: stable@vger.kernel.org
Signed-off-by: Yitang Yang &lt;yi1tang.yang@gmail.com&gt;
Reviewed-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Link: https://patch.msgid.link/20260901142438.237586-1-yi1tang.yang@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ublk_ctrl_uring_cmd_permission() is missing the UBLK_CMD_DEL_DEV_ASYNC
case, causing the command to always return -EINVAL for unprivileged
ublk devices. Fix it by adding the missing case.

Fixes: 13fe8e6825e4 ("ublk: add UBLK_CMD_DEL_DEV_ASYNC")
Cc: stable@vger.kernel.org
Signed-off-by: Yitang Yang &lt;yi1tang.yang@gmail.com&gt;
Reviewed-by: Ming Lei &lt;tom.leiming@gmail.com&gt;
Link: https://patch.msgid.link/20260901142438.237586-1-yi1tang.yang@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>virtio-blk: clamp max_segments to virtqueue ring size</title>
<updated>2026-11-03T14:11:54+00:00</updated>
<author>
<name>Sergii Ushakov</name>
<email>sergiiushakov@google.com</email>
</author>
<published>2026-09-18T13:51:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=603e66e8dd6adf2bad54bb27f4b690eacba3745e'/>
<id>603e66e8dd6adf2bad54bb27f4b690eacba3745e</id>
<content type='text'>
In virtblk_add_req(), each request consumes 2 extra descriptors (out_hdr
and in_hdr) in addition to the data scatter-gather segments.

When a hypervisor (e.g. QNX Hypervisor) advertises VIRTIO_BLK_F_SEG_MAX
with seg_max = 1024 alongside a 1024-entry split ring (vring.num = 1024)
and VIRTIO_RING_F_INDIRECT_DESC disabled, lim-&gt;max_segments is set to
1024. When the block layer submits requests with 1023 or 1024 data
segments, total_sg reaches 1025 or 1026. This exceeds vring.num (1024),
causing virtqueue_add_split() to return -ENOSPC and permanently wedge
the blk-mq queue.

Furthermore, the Virtio specification (2.7.5.3.1) requires that a
descriptor chain never exceed the Queue Size, and virtqueue_add_split()
falls back to direct descriptors if indirect table allocation fails.

Fix this by:
1. Rejecting queues with ring_size &lt; 3 at probe, or
   ring_size &lt; (queue_max_segments + 2) during resume/reset recovery in
   init_vq().
2. Unconditionally clamping sg_elems to (ring_size - 2) across all
   virtqueues in virtblk_read_limits().

Fixes: 0864b79a1533 ("virtio: block: dynamic maximum segments")
Signed-off-by: Sergii Ushakov &lt;sergiiushakov@google.com&gt;
Link: https://patch.msgid.link/20260918135120.1261150-1-sergiiushakov@google.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In virtblk_add_req(), each request consumes 2 extra descriptors (out_hdr
and in_hdr) in addition to the data scatter-gather segments.

When a hypervisor (e.g. QNX Hypervisor) advertises VIRTIO_BLK_F_SEG_MAX
with seg_max = 1024 alongside a 1024-entry split ring (vring.num = 1024)
and VIRTIO_RING_F_INDIRECT_DESC disabled, lim-&gt;max_segments is set to
1024. When the block layer submits requests with 1023 or 1024 data
segments, total_sg reaches 1025 or 1026. This exceeds vring.num (1024),
causing virtqueue_add_split() to return -ENOSPC and permanently wedge
the blk-mq queue.

Furthermore, the Virtio specification (2.7.5.3.1) requires that a
descriptor chain never exceed the Queue Size, and virtqueue_add_split()
falls back to direct descriptors if indirect table allocation fails.

Fix this by:
1. Rejecting queues with ring_size &lt; 3 at probe, or
   ring_size &lt; (queue_max_segments + 2) during resume/reset recovery in
   init_vq().
2. Unconditionally clamping sg_elems to (ring_size - 2) across all
   virtqueues in virtblk_read_limits().

Fixes: 0864b79a1533 ("virtio: block: dynamic maximum segments")
Signed-off-by: Sergii Ushakov &lt;sergiiushakov@google.com&gt;
Link: https://patch.msgid.link/20260918135120.1261150-1-sergiiushakov@google.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</pre>
</div>
</content>
</entry>
</feed>
