<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/nvme/host, branch v5.15.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v5.15.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2021-11-18T18:16:38+00:00</updated>
<entry>
<title>nvme-rdma: fix error code in nvme_rdma_setup_ctrl</title>
<updated>2021-11-18T18:16:38+00:00</updated>
<author>
<name>Max Gurtovoy</name>
<email>mgurtovoy@nvidia.com</email>
</author>
<published>2021-10-17T08:58:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ff950ae83201efeafdd440eac798201fd7e3f8cb'/>
<id>urn:sha1:ff950ae83201efeafdd440eac798201fd7e3f8cb</id>
<content type='text'>
[ Upstream commit 09748122009aed7bfaa7acc33c10c083a4758322 ]

In case that icdoff is not zero or mandatory keyed sgls are not
supported by the NVMe/RDMA target, we'll go to error flow but we'll
return 0 to the caller. Fix it by returning an appropriate error code.

Fixes: c66e2998c8ca ("nvme-rdma: centralize controller setup sequence")
Signed-off-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>nvme: drop scan_lock and always kick requeue list when removing namespaces</title>
<updated>2021-11-18T18:16:18+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2021-10-20T05:59:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=54718ee9b8eed43ab5e20df936a6e638416a4bcf'/>
<id>urn:sha1:54718ee9b8eed43ab5e20df936a6e638416a4bcf</id>
<content type='text'>
[ Upstream commit 2b81a5f015199f3d585ce710190a9e87714d3c1e ]

When reading the partition table on initial scan hits an I/O error the
I/O will hang with the scan_mutex held:

[&lt;0&gt;] do_read_cache_page+0x49b/0x790
[&lt;0&gt;] read_part_sector+0x39/0xe0
[&lt;0&gt;] read_lba+0xf9/0x1d0
[&lt;0&gt;] efi_partition+0xf1/0x7f0
[&lt;0&gt;] bdev_disk_changed+0x1ee/0x550
[&lt;0&gt;] blkdev_get_whole+0x81/0x90
[&lt;0&gt;] blkdev_get_by_dev+0x128/0x2e0
[&lt;0&gt;] device_add_disk+0x377/0x3c0
[&lt;0&gt;] nvme_mpath_set_live+0x130/0x1b0 [nvme_core]
[&lt;0&gt;] nvme_mpath_add_disk+0x150/0x160 [nvme_core]
[&lt;0&gt;] nvme_alloc_ns+0x417/0x950 [nvme_core]
[&lt;0&gt;] nvme_validate_or_alloc_ns+0xe9/0x1e0 [nvme_core]
[&lt;0&gt;] nvme_scan_work+0x168/0x310 [nvme_core]
[&lt;0&gt;] process_one_work+0x231/0x420

and trying to delete the controller will deadlock as it tries to grab
the scan mutex:

[&lt;0&gt;] nvme_mpath_clear_ctrl_paths+0x25/0x80 [nvme_core]
[&lt;0&gt;] nvme_remove_namespaces+0x31/0xf0 [nvme_core]
[&lt;0&gt;] nvme_do_delete_ctrl+0x4b/0x80 [nvme_core]

As we're now properly ordering the namespace list there is no need to
hold the scan_mutex in nvme_mpath_clear_ctrl_paths() anymore.
And we always need to kick the requeue list as the path will be marked
as unusable and I/O will be requeued _without_ a current path.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Keith Busch &lt;kbusch@kernel.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>nvme-tcp: fix data digest pointer calculation</title>
<updated>2021-10-27T05:58:26+00:00</updated>
<author>
<name>Varun Prakash</name>
<email>varun@chelsio.com</email>
</author>
<published>2021-10-25T17:17:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=d89b9f3bbb58e9e378881209756b0723694f22ff'/>
<id>urn:sha1:d89b9f3bbb58e9e378881209756b0723694f22ff</id>
<content type='text'>
ddgst is of type __le32, &amp;req-&gt;ddgst + req-&gt;offset
increases &amp;req-&gt;ddgst by 4 * req-&gt;offset, fix this by
type casting &amp;req-&gt;ddgst to u8 *.

Fixes: 3f2304f8c6d6 ("nvme-tcp: add NVMe over TCP host driver")
Signed-off-by: Varun Prakash &lt;varun@chelsio.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme-tcp: fix possible req-&gt;offset corruption</title>
<updated>2021-10-27T05:58:26+00:00</updated>
<author>
<name>Varun Prakash</name>
<email>varun@chelsio.com</email>
</author>
<published>2021-10-26T13:31:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=ce7723e9cdae4eb3030da082876580f4b2dc0861'/>
<id>urn:sha1:ce7723e9cdae4eb3030da082876580f4b2dc0861</id>
<content type='text'>
With commit db5ad6b7f8cd ("nvme-tcp: try to send request in queue_rq
context") r2t and response PDU can get processed while send function
is executing.

Current data digest send code uses req-&gt;offset after kernel_sendmsg(),
this creates a race condition where req-&gt;offset gets reset before it
is used in send function.

This can happen in two cases -
1. Target sends r2t PDU which resets req-&gt;offset.
2. Target send response PDU which completes the req and then req is
   used for a new command, nvme_tcp_setup_cmd_pdu() resets req-&gt;offset.

Fix this by storing req-&gt;offset in a local variable and using
this local variable after kernel_sendmsg().

Fixes: db5ad6b7f8cd ("nvme-tcp: try to send request in queue_rq context")
Signed-off-by: Varun Prakash &lt;varun@chelsio.com&gt;
Reviewed-by: Keith Busch &lt;kbusch@kernel.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme-tcp: fix H2CData PDU send accounting (again)</title>
<updated>2021-10-26T08:41:29+00:00</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagi@grimberg.me</email>
</author>
<published>2021-10-24T07:43:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=25e1f67eda4a19c91dc05c84d6d413c53efb447b'/>
<id>urn:sha1:25e1f67eda4a19c91dc05c84d6d413c53efb447b</id>
<content type='text'>
We should not access request members after the last send, even to
determine if indeed it was the last data payload send. The reason is
that a completion could have arrived and trigger a new execution of the
request which overridden these members. This was fixed by commit
825619b09ad3 ("nvme-tcp: fix possible use-after-completion").

Commit e371af033c56 broke that assumption again to address cases where
multiple r2t pdus are sent per request. To fix it, we need to record the
request data_sent and data_len and after the payload network send we
reference these counters to determine weather we should advance the
request iterator.

Fixes: e371af033c56 ("nvme-tcp: fix incorrect h2cdata pdu offset accounting")
Reported-by: Keith Busch &lt;kbusch@kernel.org&gt;
Cc: stable@vger.kernel.org # 5.10+
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Reviewed-by: Keith Busch &lt;kbusch@kernel.org&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>Merge tag 'nvme-5.15-2021-10-14' of git://git.infradead.org/nvme into block-5.15</title>
<updated>2021-10-14T15:07:14+00:00</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2021-10-14T15:07:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=baa0ab2ba22395d85854e8d818beb1763b48f7dc'/>
<id>urn:sha1:baa0ab2ba22395d85854e8d818beb1763b48f7dc</id>
<content type='text'>
Pull NVMe fixes from Christoph:

"nvme fixes for Linux 5.15:

 - fix the abort command id (Keith Busch)
 - nvme: fix per-namespace chardev deletion (Adam Manzanares)"

* tag 'nvme-5.15-2021-10-14' of git://git.infradead.org/nvme:
  nvme: fix per-namespace chardev deletion
  nvme-pci: Fix abort command id
</content>
</entry>
<entry>
<title>nvme: fix per-namespace chardev deletion</title>
<updated>2021-10-14T06:07:47+00:00</updated>
<author>
<name>Adam Manzanares</name>
<email>a.manzanares@samsung.com</email>
</author>
<published>2021-10-13T15:04:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=be5eb933542629ad6a7d4c92097b1b472b1612d0'/>
<id>urn:sha1:be5eb933542629ad6a7d4c92097b1b472b1612d0</id>
<content type='text'>
Decrease reference count of chardevice during char device deletion in
order to fix a memory leak.  Add a release callabck for the device
associated chardev and move ida_simple_remove into the release function.

Fixes: 2637baed7801 ("nvme: introduce generic per-namespace chardev")
Reported-by: Yi Zhang &lt;yi.zhang@redhat.com&gt;
Suggested-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Adam Manzanares &lt;a.manzanares@samsung.com&gt;
Reviewed-by: Javier GonzÃ¡lez &lt;javier@javigon.com&gt;
Tested-by: Yi Zhang &lt;yi.zhang@redhat.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
<entry>
<title>nvme-pci: Fix abort command id</title>
<updated>2021-10-07T15:02:06+00:00</updated>
<author>
<name>Keith Busch</name>
<email>kbusch@kernel.org</email>
</author>
<published>2021-10-07T06:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=85f74acf097a63a07f5a7c215db6883e5c35e3ff'/>
<id>urn:sha1:85f74acf097a63a07f5a7c215db6883e5c35e3ff</id>
<content type='text'>
The request tag is no longer the only component of the command id.

Fixes: e7006de6c2380 ("nvme: code command_id with a genctr for use-after-free validation")
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
</content>
</entry>
<entry>
<title>nvme: add command id quirk for apple controllers</title>
<updated>2021-09-27T16:02:07+00:00</updated>
<author>
<name>Keith Busch</name>
<email>kbusch@kernel.org</email>
</author>
<published>2021-09-27T15:43:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=a2941f6aa71a72be2c82c0a168523a492d093530'/>
<id>urn:sha1:a2941f6aa71a72be2c82c0a168523a492d093530</id>
<content type='text'>
Some apple controllers use the command id as an index to implementation
specific data structures and will fail if the value is out of bounds.
The nvme driver's recently introduced command sequence number breaks
this controller.

Provide a quirk so these spec incompliant controllers can function as
before. The driver will not have the ability to detect bad completions
when this quirk is used, but we weren't previously checking this anyway.

The quirk bit was selected so that it can readily apply to stable.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=214509
Cc: Sven Peter &lt;sven@svenpeter.dev&gt;
Reported-by: Orlando Chamberlain &lt;redecorating@protonmail.com&gt;
Reported-by: Aditya Garg &lt;gargaditya08@live.com&gt;
Signed-off-by: Keith Busch &lt;kbusch@kernel.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Tested-by: Sven Peter &lt;sven@svenpeter.dev&gt;
Link: https://lore.kernel.org/r/20210927154306.387437-1-kbusch@kernel.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>nvme: keep ctrl-&gt;namespaces ordered</title>
<updated>2021-09-21T07:17:15+00:00</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-09-14T06:38:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=298ba0e3d4af539cc37f982d4c011a0f07fca48c'/>
<id>urn:sha1:298ba0e3d4af539cc37f982d4c011a0f07fca48c</id>
<content type='text'>
Various places in the nvme code that rely on ctrl-&gt;namespace to be
ordered.  Ensure that the namespae is inserted into the list at the
right position from the start instead of sorting it after the fact.

Fixes: 540c801c65eb ("NVMe: Implement namespace list scanning")
Reported-by: Anton Eidelman &lt;anton.eidelman@gmail.com&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Keith Busch &lt;kbusch@kernel.org&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
Reviewed-by: Chaitanya Kulkarni &lt;kch@nvidia.com&gt;
Reviewed-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
</content>
</entry>
</feed>
