<feed xmlns='http://www.w3.org/2005/Atom'>
<title>laptop-kernel/block, branch master</title>
<subtitle>Linux kernel tree for laptop</subtitle>
<id>https://git.zx2c4.com/laptop-kernel/atom/block?h=master</id>
<link rel='self' href='https://git.zx2c4.com/laptop-kernel/atom/block?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/'/>
<updated>2026-10-18T19:06:02Z</updated>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2026-10-18T19:06:02Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-18T19:06:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=f909e534f5e34feb2ea2701d54df63e21aa506fc'/>
<id>urn:sha1:f909e534f5e34feb2ea2701d54df63e21aa506fc</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "All fixes in drivers (or the tape ULD) and one core fix to bsg (the
  block ioctl equivalent of sg_io).

  The biggest is the race in auth updates fix in iscsi configfs, but the
  next biggest one is in bsg but the generic pieces of that are mostly
  threading reply_len"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies
  scsi: libsas: Fix SMP IO deadlock during HA resume
  scsi: libiscsi: Validate the task named by a management response
  scsi: libiscsi: Validate the ITT reflected in a Reject PDU
  scsi: libiscsi: Reject a negative task index from parse_pdu_itt
  scsi: target: iscsi: Fix race in discovery auth updates
  scsi: target: Disable interrupts while holding delayed_cmd_lock
  scsi: st: Fix use-after-free race between st_remove() and st_open()
  scsi: st: Save the visited block for the partition the drive is in
  scsi: xen/scsifront: Check for a NULL shadow entry on a backend response
</content>
</entry>
<entry>
<title>scsi: bsg: Pass reply_len to bsg_setup_queue() to fit UFS ARPMB replies</title>
<updated>2026-10-15T02:14:52Z</updated>
<author>
<name>Stanley Jhu</name>
<email>stanleyjhu@google.com</email>
</author>
<published>2026-10-13T13:27:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=ec6b083915e8146e147314a5f4f1285d07b57bfc'/>
<id>urn:sha1:ec6b083915e8146e147314a5f4f1285d07b57bfc</id>
<content type='text'>
bsg-lib allocates a 96-byte (SCSI_SENSE_BUFFERSIZE) reply buffer per
job, but struct ufs_rpmb_reply is 104 bytes: a 40-byte struct
ufs_bsg_reply followed by a 64-byte EHS. When an Advanced RPMB command
returns an EHS, ufshcd_advanced_rpmb_req_handler() copies it right after
the 40-byte header and writes 8 bytes past the end of the buffer.

Let each BSG transport pass its reply buffer size to bsg_setup_queue()
and have ufs_bsg request sizeof(struct ufs_rpmb_reply), so the full
reply reaches user space. Other transports keep SCSI_SENSE_BUFFERSIZE.

Fixes: 6ff265fc5ef6 ("scsi: ufs: core: bsg: Add advanced RPMB support in ufs_bsg")
Cc: stable@vger.kernel.org
Signed-off-by: Stanley Jhu &lt;stanleyjhu@google.com&gt;
Link: https://patch.msgid.link/20261013132708.1669415-1-stanleyjhu@google.com
Signed-off-by: Martin K. Petersen (Oracle) &lt;mkp@kernel.org&gt;
</content>
</entry>
<entry>
<title>Merge tag 'block-7.3-20261002' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux</title>
<updated>2026-10-02T19:25:40Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-10-02T19:25:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=3b7cab693ba2bab63774bf5b988e8a61b2ef0f32'/>
<id>urn:sha1:3b7cab693ba2bab63774bf5b988e8a61b2ef0f32</id>
<content type='text'>
Pull block fixes from Jens Axboe:

 - NVMe fixes via Keith:
     - Fix an out-of-bounds write in nvmet_auth_challenge(), where
       sizeof() on a void pointer undercounted the challenge header and
       let a short AUTH_RECEIVE buffer pass the check
     - nvme-multipath fixes for an ANA log bounds check underflow, the
       command effects log lifetime for multipath heads, and only
       setting BLK_FEAT_ZONED after the zone info is known.
     - nvmet fixes for ns-&gt;enabled teardown ordering, rejecting I/O
       after the percpu ns reference is killed, device path preservation
       on allocation failure, and too-short SGL segments in pci-epf
     - nvme-tcp: revert the per-socket dynamic lockdep keys, and delay
       the socket reclassification
     - A DMA pool alignment quirk for the Micron 4100AT
     - Controller state/reset race fixes, and -Wformat-security
       workarounds

 - blk-mq: set RQF_USE_SCHED when the operation is known, and allow
   cached requests to be used for flush operations

 - Reject polled dio with user integrity metadata

 - Save the IRQ state in blkg_tryget_closest()

 - Set the zone write granularity in virtio_blk

 - ublk selftest fixes

* tag 'block-7.3-20261002' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: (23 commits)
  virtio_blk: set the zone write granularity
  nvme-multipath: set BLK_FEAT_ZONED only after the zone info is known
  nvme: fix command effects log lifetime for multipath heads
  nvmet: don't allow I/O admission after percpu ns reference is killed
  nvmet: defer setting ns-&gt;enabled to false in nvmet_ns_disable()
  nvmet: copy the hostid into the ctrl before creating PR pc_refs
  nvmet-auth: fix out-of-bounds write in nvmet_auth_challenge()
  nvmet: pci-epf: reject too-short SGL segments
  nvme-multipath: fix underflow in ANA log bounds checks
  nvme: work around all -Wformat-security warnings
  nvme: work around -Wformat-security warning
  nvme: do not reset controllers in NVME_CTRL_NEW state
  nvme-tcp: delay nvme_tcp_reclassify_socket()
  Revert "nvme-tcp: lockdep: use dynamic lockdep keys per socket instance"
  drbd: remove unused drbd_nl_mcgrps[] array
  blk-mq: allow cached requests to be used for flush operations
  blk-mq: set RQF_USE_SCHED when the operation is known
  block: reject polled dio with user integrity metadata
  selftests: ublk: fix unused_result error
  blk-cgroup: save IRQ state in blkg_tryget_closest()
  ...
</content>
</entry>
<entry>
<title>Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2026-09-25T21:41:52Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2026-09-25T21:41:52Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=049380360ca6f4cc22ac2f67fe95b98967c887f0'/>
<id>urn:sha1:049380360ca6f4cc22ac2f67fe95b98967c887f0</id>
<content type='text'>
Pull SCSI fixes from James Bottomley:
 "Mostly small driver fixes. The biggest fix is the one to the block
  zone handling which might trip for real or virtual hardware if the
  number of zones is &gt; 2^32"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  scsi: megaraid_sas: Protect megasas_get_ctrl_info() in megasas_resume()
  scsi: sd_zbc: Reject disks with too many zones
  scsi: block: Fix zones_cond out-of-bounds write on zone report
  scsi: leapraid: Avoid -Wformat-security warning
  scsi: devinfo: Add BLIST_SKIP_IO_HINTS for EMC Symmetrix
  scsi: libiscsi_tcp: Check the data direction of a Data-In PDU
  scsi: ufs: pltfrm: Add quirk for R-Car S4 lacking lanes-per-direction
  scsi: ufs: core: Keep internal commands dispatchable during error handling
</content>
</entry>
<entry>
<title>blk-mq: allow cached requests to be used for flush operations</title>
<updated>2026-09-23T11:26:17Z</updated>
<author>
<name>Keith Busch</name>
<email>kbusch@kernel.org</email>
</author>
<published>2026-09-22T17:27:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=9d2c70986bb7838c1c441a93bda415eecb52f3dd'/>
<id>urn:sha1:9d2c70986bb7838c1c441a93bda415eecb52f3dd</id>
<content type='text'>
The cached request lookups reject a request whose op_is_flush() state does
not match the incoming operation. That check is from when rq-&gt;elv and
rq-&gt;flush shared a union, so a request could not be both a scheduler
request and carry flush state. Commit be4c427809b0 ("blk-mq: use the I/O
scheduler for writes from the flush state machine") made them separate
members of struct request.

A cached request now gets its scheduler state when it is claimed by an
operation, so one claimed for a flush is set up exactly as a freshly
allocated request. Drop the check so a cached batch can mix flush and
non-flush operations.

Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://patch.msgid.link/20260922172711.1573186-2-kbusch@meta.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-mq: set RQF_USE_SCHED when the operation is known</title>
<updated>2026-09-23T11:26:17Z</updated>
<author>
<name>Keith Busch</name>
<email>kbusch@kernel.org</email>
</author>
<published>2026-09-22T17:27:10Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=ab6c756f28c741d704a7c3e04814bfc3adf6f818'/>
<id>urn:sha1:ab6c756f28c741d704a7c3e04814bfc3adf6f818</id>
<content type='text'>
The cached requests are allocated for one operation but can be handed
out for another. A passthrough command has RQF_USE_SCHED cleared, so
using those flags for a subsequent read/write bio will insert it into
the scheduler without -&gt;prepare_request() and frees it without
-&gt;finish_request(). For kyber, this leaks the domain token acquired at
dispatch and stalls the queue.

Don't set RQF_USE_SCHED based on the first operation the batch happened
to be allocated for. Instead, set it after the request is claimed by an
operation. Introduce a helper function, blk_mq_rq_late_init() for this,
and absorb blk_mq_rq_time_init() since the two run together.

Fixes: 4b6a5d9cea91 ("block: enable batched allocation for blk_mq_alloc_request()")
Link: https://lore.kernel.org/linux-block/20260916151655.2588-1-15815827059@163.com/
Reported-by: Henry Hu &lt;huhai@kylinos.cn&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://patch.msgid.link/20260922172711.1573186-1-kbusch@meta.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: reject polled dio with user integrity metadata</title>
<updated>2026-09-23T11:20:15Z</updated>
<author>
<name>Yang Xiuwei</name>
<email>yangxiuwei@kylinos.cn</email>
</author>
<published>2026-09-23T09:37:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=2a42e6fe1293f2e2d579c9fe5bbab056dd8b880e'/>
<id>urn:sha1:2a42e6fe1293f2e2d579c9fe5bbab056dd8b880e</id>
<content type='text'>
IOCB_HAS_METADATA leaves iocb-&gt;private as a uio_meta, while
iocb_bio_iopoll() expects a bio. Since 2729a60bbfb9, metadata I/O
always uses __blkdev_direct_IO(), which never publishes the bio for
polling, so IOPOLL calls bio_poll() on the uio_meta.

Reproducer: io_uring IOPOLL plus a PI attribute on an integrity device
(scsi_debug dif=1 dix=1). KASAN reports:

  Oops: general protection fault, probably for non-canonical
  address 0xdffffc0000000004
  KASAN: null-ptr-deref in range
  [0x0000000000000020-0x0000000000000027]
  RIP: 0010:bio_poll+0x9d/0x4b0
  Call Trace:
   iocb_bio_iopoll+0x5b/0x80
   io_uring_classic_poll+0xf3/0x140
   io_do_iopoll+0x4e3/0xc00
   io_iopoll_check+0x275/0x560
   __do_sys_io_uring_enter+0x2e5/0x720

Return -EOPNOTSUPP when HIPRI is combined with user metadata.

Fixes: 2729a60bbfb9 ("block: don't silently ignore metadata for sync read/write")
Assisted-by: LLM
Signed-off-by: Yang Xiuwei &lt;yangxiuwei@kylinos.cn&gt;
Link: https://patch.msgid.link/20260923093732.1504291-1-yangxiuwei@kylinos.cn
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>scsi: block: Fix zones_cond out-of-bounds write on zone report</title>
<updated>2026-09-16T14:11:45Z</updated>
<author>
<name>ZHOU Jiaxiang</name>
<email>me@fxti.xyz</email>
</author>
<published>2026-09-16T13:58:21Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=7c431d61b69a3fd0784c20aa4cd0b8fb501b5653'/>
<id>urn:sha1:7c431d61b69a3fd0784c20aa4cd0b8fb501b5653</id>
<content type='text'>
blk_revalidate_disk_zones() sizes the zones_cond array from the disk
capacity and zone size, but the index used by blk_revalidate_zone_cond()
comes from the device-driven report_zones() walk and is never checked
against the array size. A device reporting more zones than fit the array
makes blk_zone_set_cond() write out of bounds.

One way to reach this is a zone count exceeding 32 bits: both
blk_revalidate_zone_args.nr_zones and struct zoned_disk_info.nr_zones are
unsigned int, so a disk advertising more than UINT_MAX zones (e.g.  2^32 +
1024 zones of one 512-byte logical block) gets its zone count truncated to
a small value, undersizing the array while the report walk keeps counting
upward.

Check the index against the array size before storing the zone condition,
and refuse to revalidate when the zone count does not fit 32 bits.

Fixes: 6e945ffb6555 ("block: use zone condition to determine conventional zones")
Signed-off-by: ZHOU Jiaxiang &lt;me@fxti.xyz&gt;
Reviewed-by: Damien Le Moal &lt;dlemoal@kernel.org&gt;
Link: https://patch.msgid.link/7815D1B293A8F55E+20260916135822.32584-2-me@fxti.xyz
Signed-off-by: Martin K. Petersen (Oracle) &lt;mkp@kernel.org&gt;
</content>
</entry>
<entry>
<title>blk-cgroup: save IRQ state in blkg_tryget_closest()</title>
<updated>2026-09-11T18:32:40Z</updated>
<author>
<name>Hao Zhang</name>
<email>zhanghao1@kylinos.cn</email>
</author>
<published>2026-09-11T16:04:57Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=327c428ba79b13e4cc5253333a9d5c0aa5579bdf'/>
<id>urn:sha1:327c428ba79b13e4cc5253333a9d5c0aa5579bdf</id>
<content type='text'>
bio_set_dev() associates the bio with a blkg through bio_associate_blkg().
If the blkg lookup misses, blkg_tryget_closest() takes q-&gt;queue_lock with
spin_lock_irq() and releases it with spin_unlock_irq(), which
unconditionally enables local interrupts.

Callers may call bio_set_dev() with interrupts already disabled, e.g.
dm-thin's pool_map() does so while holding pool-&gt;lock taken with
spin_lock_irq().  The nested spin_unlock_irq() then enables interrupts
while pool-&gt;lock is still held, so an I/O completion softirq can run on
the same CPU, re-acquire pool-&gt;lock (thin_endio(), or overwrite_endio()
-&gt; complete_mapping_preparation()) and deadlock.  lockdep reports this
as inconsistent SOFTIRQ-ON-W to IN-SOFTIRQ-W usage.

Commit 3a762de55b4e ("block: save irq state in blkg_lookup_create()")
fixed the same problem while the lock lived in blkg_lookup_create(), but
commit 9327a865e395 ("blk-cgroup: don't nest queue_lock under rcu in
blkg_lookup_create()") moved the locking into blkg_tryget_closest() and
reverted it to spin_lock_irq().

Save and restore the caller's IRQ state instead.

Fixes: 9327a865e395 ("blk-cgroup: don't nest queue_lock under rcu in blkg_lookup_create()")
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Hao Zhang &lt;zhanghao1@kylinos.cn&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Link: https://patch.msgid.link/aqQmqb1k57PXj8Ef@192.168.1.215
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: save page offset gaps in cloned bio</title>
<updated>2026-09-01T14:42:34Z</updated>
<author>
<name>Keith Busch</name>
<email>kbusch@kernel.org</email>
</author>
<published>2026-08-19T15:49:37Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/laptop-kernel/commit/?id=96c8ea3c5add7920b3c43840d1ea76b3354c8d2d'/>
<id>urn:sha1:96c8ea3c5add7920b3c43840d1ea76b3354c8d2d</id>
<content type='text'>
The cloned bio needs to inherit the accumulated gaps between vectors so
that we can know if this bio can subscribe to the iova coalescing
optimization.

When cloning for a split, the gap only applies to the front bio since
that's as far as has been processed. The remaining bio can reset its
gaps to 0 since it advanced past the checked vectors, and will start its
accounting from there on the next split check.

Fixes: 2f6b2565d43c ("block: accumulate memory segment gaps per bio")
Reported-by: Eric Auger &lt;eauger@redhat.com&gt;
Tested-by: Eric Auger &lt;eric.auger@redhat.com&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://patch.msgid.link/20260819154937.3903312-1-kbusch@meta.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
