<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/block, branch v6.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v6.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v6.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2023-02-03T19:35:42Z</updated>
<entry>
<title>Merge tag 'block-6.2-2023-02-03' of git://git.kernel.dk/linux</title>
<updated>2023-02-03T19:35:42Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-02-03T19:35:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0136d86b78522bbd5755f8194c97a987f0586ba5'/>
<id>urn:sha1:0136d86b78522bbd5755f8194c97a987f0586ba5</id>
<content type='text'>
Pull block fixes from Jens Axboe:
 "A bit bigger than I'd like at this point, but mostly a bunch of little
  fixes. In detail:

   - NVMe pull request via Christoph:
       - Fix a missing queue put in nvmet_fc_ls_create_association
         (Amit Engel)
       - Clear queue pointers on tag_set initialization failure
         (Maurizio Lombardi)
       - Use workqueue dedicated to authentication (Shin'ichiro
         Kawasaki)

   - Fix for an overflow in ublk (Liu)

   - Fix for leaking a queue reference in block cgroups (Ming)

   - Fix for a use-after-free in BFQ (Yu)"

* tag 'block-6.2-2023-02-03' of git://git.kernel.dk/linux:
  blk-cgroup: don't update io stat for root cgroup
  nvme-auth: use workqueue dedicated to authentication
  nvme: clear the request_queue pointers on failure in nvme_alloc_io_tag_set
  nvme: clear the request_queue pointers on failure in nvme_alloc_admin_tag_set
  nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association
  block: Fix the blk_mq_destroy_queue() documentation
  block: ublk: extending queue_size to fix overflow
  block, bfq: fix uaf for bfqq in bic_set_bfqq()
</content>
</entry>
<entry>
<title>blk-cgroup: don't update io stat for root cgroup</title>
<updated>2023-02-02T02:26:41Z</updated>
<author>
<name>Ming Lei</name>
<email>ming.lei@redhat.com</email>
</author>
<published>2023-02-02T02:18:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=0416f3be58c6b1ea066cd52e354b857693feb01e'/>
<id>urn:sha1:0416f3be58c6b1ea066cd52e354b857693feb01e</id>
<content type='text'>
We source root cgroup stats from the system-wide stats, see blkcg_print_stat
and blkcg_rstat_flush, so don't update io state for root cgroup.

Fixes blkg leak issue introduced in commit 3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()")
which starts to grab blkg's reference when adding iostat_cpu into percpu
blkcg list, but this state won't be consumed by blkcg_rstat_flush() where
the blkg reference is dropped.

Tested-by: Bart van Assche &lt;bvanassche@acm.org&gt;
Reported-by: Bart van Assche &lt;bvanassche@acm.org&gt;
Fixes: 3b8cc6298724 ("blk-cgroup: Optimize blkcg_rstat_flush()")
Cc: Tejun Heo &lt;tj@kernel.org&gt;
Cc: Waiman Long &lt;longman@redhat.com&gt;
Signed-off-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Link: https://lore.kernel.org/r/20230202021804.278582-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block: Fix the blk_mq_destroy_queue() documentation</title>
<updated>2023-01-31T18:46:15Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bvanassche@acm.org</email>
</author>
<published>2023-01-30T21:12:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=81ea42b9c3d61ea34d82d900ed93f4b4851f13b0'/>
<id>urn:sha1:81ea42b9c3d61ea34d82d900ed93f4b4851f13b0</id>
<content type='text'>
Commit 2b3f056f72e5 moved a blk_put_queue() call from
blk_mq_destroy_queue() into its callers. Reflect this change in the
documentation block above blk_mq_destroy_queue().

Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Cc: Chaitanya Kulkarni &lt;kch@nvidia.com&gt;
Cc: Keith Busch &lt;kbusch@kernel.org&gt;
Fixes: 2b3f056f72e5 ("blk-mq: move the call to blk_put_queue out of blk_mq_destroy_queue")
Signed-off-by: Bart Van Assche &lt;bvanassche@acm.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/20230130211233.831613-1-bvanassche@acm.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block, bfq: fix uaf for bfqq in bic_set_bfqq()</title>
<updated>2023-01-30T01:57:01Z</updated>
<author>
<name>Yu Kuai</name>
<email>yukuai3@huawei.com</email>
</author>
<published>2023-01-30T01:41:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b600de2d7d3a16f9007fad1bdae82a3951a26af2'/>
<id>urn:sha1:b600de2d7d3a16f9007fad1bdae82a3951a26af2</id>
<content type='text'>
After commit 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq-&gt;bic'"),
bic-&gt;bfqq will be accessed in bic_set_bfqq(), however, in some context
bic-&gt;bfqq will be freed, and bic_set_bfqq() is called with the freed
bic-&gt;bfqq.

Fix the problem by always freeing bfqq after bic_set_bfqq().

Fixes: 64dc8c732f5c ("block, bfq: fix possible uaf for 'bfqq-&gt;bic'")
Reported-and-tested-by: Shinichiro Kawasaki &lt;shinichiro.kawasaki@wdc.com&gt;
Signed-off-by: Yu Kuai &lt;yukuai3@huawei.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Link: https://lore.kernel.org/r/20230130014136.591038-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'block-6.2-2023-01-20' of git://git.kernel.dk/linux</title>
<updated>2023-01-20T20:44:41Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-01-20T20:44:41Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=edc00350d205d2de8871b514c8f9b403d588e5d1'/>
<id>urn:sha1:edc00350d205d2de8871b514c8f9b403d588e5d1</id>
<content type='text'>
Pull block fixes from Jens Axboe:
 "Various little tweaks all over the place:

   - NVMe pull request via Christoph:
       - fix controller shutdown regression in nvme-apple (Janne Grunau)
       - fix a polling on timeout regression in nvme-pci (Keith Busch)

   - Fix a bug in the read request side request allocation caching
     (Pavel)

   - pktcdvd was brought back after we configured a NULL return on bio
     splits, make it consistent with the others (me)

   - BFQ refcount fix (Yu)

   - Block cgroup policy activation fix (Yu)

   - Fix for an md regression introduced in the 6.2 cycle (Adrian)"

* tag 'block-6.2-2023-01-20' of git://git.kernel.dk/linux:
  nvme-pci: fix timeout request state check
  nvme-apple: only reset the controller when RTKit is running
  nvme-apple: reset controller during shutdown
  block: fix hctx checks for batch allocation
  block/rnbd-clt: fix wrong max ID in ida_alloc_max
  blk-cgroup: fix missing pd_online_fn() while activating policy
  pktcdvd: check for NULL returna fter calling bio_split_to_limits()
  block, bfq: switch 'bfqg-&gt;ref' to use atomic refcount apis
  md: fix incorrect declaration about claim_rdev in md_import_device
</content>
</entry>
<entry>
<title>block: fix hctx checks for batch allocation</title>
<updated>2023-01-17T16:56:52Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2023-01-17T11:42:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7746564793978fe2f43b18a302b22dca0ad3a0e8'/>
<id>urn:sha1:7746564793978fe2f43b18a302b22dca0ad3a0e8</id>
<content type='text'>
When there are no read queues read requests will be assigned a
default queue on allocation. However, blk_mq_get_cached_request() is not
prepared for that and will fail all attempts to grab read requests from
the cache. Worst case it doubles the number of requests allocated,
roughly half of which will be returned by blk_mq_free_plug_rqs().

It only affects batched allocations and so is io_uring specific.
For reference, QD8 t/io_uring benchmark improves by 20-35%.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/80d4511011d7d4751b4cf6375c4e38f237d935e3.1673955390.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>blk-cgroup: fix missing pd_online_fn() while activating policy</title>
<updated>2023-01-17T02:04:07Z</updated>
<author>
<name>Yu Kuai</name>
<email>yukuai3@huawei.com</email>
</author>
<published>2023-01-03T11:28:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e3ff8887e7db757360f97634e0d6f4b8e27a8c46'/>
<id>urn:sha1:e3ff8887e7db757360f97634e0d6f4b8e27a8c46</id>
<content type='text'>
If the policy defines pd_online_fn(), it should be called after
pd_init_fn(), like blkg_create().

Signed-off-by: Yu Kuai &lt;yukuai3@huawei.com&gt;
Acked-by: Tejun Heo &lt;tj@kernel.org&gt;
Link: https://lore.kernel.org/r/20230103112833.2013432-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>block, bfq: switch 'bfqg-&gt;ref' to use atomic refcount apis</title>
<updated>2023-01-16T03:53:27Z</updated>
<author>
<name>Yu Kuai</name>
<email>yukuai3@huawei.com</email>
</author>
<published>2023-01-03T08:47:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=216f764716f34fe68cedc7296ae2043a7727e640'/>
<id>urn:sha1:216f764716f34fe68cedc7296ae2043a7727e640</id>
<content type='text'>
The updating of 'bfqg-&gt;ref' should be protected by 'bfqd-&gt;lock', however,
during code review, we found that bfq_pd_free() update 'bfqg-&gt;ref'
without holding the lock, which is problematic:

1) bfq_pd_free() triggered by removing cgroup is called asynchronously;
2) bfqq will grab bfqg reference, and exit bfqq will drop the reference,
which can concurrent with 1).

Unfortunately, 'bfqd-&gt;lock' can't be held here because 'bfqd' might already
be freed in bfq_pd_free(). Fix the problem by using atomic refcount apis.

Signed-off-by: Yu Kuai &lt;yukuai3@huawei.com&gt;
Reviewed-by: Jan Kara &lt;jack@suse.cz&gt;
Link: https://lore.kernel.org/r/20230103084755.1256479-1-yukuai1@huaweicloud.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>Merge tag 'block-6.2-2023-01-13' of git://git.kernel.dk/linux</title>
<updated>2023-01-13T23:41:19Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2023-01-13T23:41:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=97ec4d559d939743e8af83628be5af8da610d9dc'/>
<id>urn:sha1:97ec4d559d939743e8af83628be5af8da610d9dc</id>
<content type='text'>
Pull block fixes from Jens Axboe:
 "Nothing major in here, just a collection of NVMe fixes and dropping a
  wrong might_sleep() that static checkers tripped over but which isn't
  valid"

* tag 'block-6.2-2023-01-13' of git://git.kernel.dk/linux:
  MAINTAINERS: stop nvme matching for nvmem files
  nvme: don't allow unprivileged passthrough on partitions
  nvme: replace the "bool vec" arguments with flags in the ioctl path
  nvme: remove __nvme_ioctl
  nvme-pci: fix error handling in nvme_pci_enable()
  nvme-pci: add NVME_QUIRK_IDENTIFY_CNS quirk to Apple T2 controllers
  nvme-apple: add NVME_QUIRK_IDENTIFY_CNS quirk to fix regression
  block: Drop spurious might_sleep() from blk_put_queue()
</content>
</entry>
<entry>
<title>block: Drop spurious might_sleep() from blk_put_queue()</title>
<updated>2023-01-09T03:29:28Z</updated>
<author>
<name>Tejun Heo</name>
<email>tj@kernel.org</email>
</author>
<published>2023-01-06T20:34:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49e4d04f0486117ac57a97890eb1db6d52bf82b3'/>
<id>urn:sha1:49e4d04f0486117ac57a97890eb1db6d52bf82b3</id>
<content type='text'>
Dan reports the following smatch detected the following:

  block/blk-cgroup.c:1863 blkcg_schedule_throttle() warn: sleeping in atomic context

caused by blkcg_schedule_throttle() calling blk_put_queue() in an
non-sleepable context.

blk_put_queue() acquired might_sleep() in 63f93fd6fa57 ("block: mark
blk_put_queue as potentially blocking") which transferred the might_sleep()
from blk_free_queue().

blk_free_queue() acquired might_sleep() in e8c7d14ac6c3 ("block: revert back
to synchronous request_queue removal") while turning request_queue removal
synchronous. However, this isn't necessary as nothing in the free path
actually requires sleeping.

It's pretty unusual to require a sleeping context in a put operation and
it's not needed in the first place. Let's drop it.

Signed-off-by: Tejun Heo &lt;tj@kernel.org&gt;
Reported-by: Dan Carpenter &lt;error27@gmail.com&gt;
Link: https://lkml.kernel.org/r/Y7g3L6fntnTtOm63@kili
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Luis Chamberlain &lt;mcgrof@kernel.org&gt;
Fixes: e8c7d14ac6c3 ("block: revert back to synchronous request_queue removal") # v5.9+
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Link: https://lore.kernel.org/r/Y7iFwjN+XzWvLv3y@slm.duckdns.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
