<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/nvme, 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-12-01T08:04:52+00:00</updated>
<entry>
<title>nvmet: use IOCB_NOWAIT only if the filesystem supports it</title>
<updated>2021-12-01T08:04:52+00:00</updated>
<author>
<name>Maurizio Lombardi</name>
<email>mlombard@redhat.com</email>
</author>
<published>2021-11-22T10:08:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=5585036815e54e380293b73050262cb62ec10d0c'/>
<id>urn:sha1:5585036815e54e380293b73050262cb62ec10d0c</id>
<content type='text'>
[ Upstream commit c024b226a417c4eb9353ff500b1c823165d4d508 ]

Submit I/O requests with the IOCB_NOWAIT flag set only if
the underlying filesystem supports it.

Fixes: 50a909db36f2 ("nvmet: use IOCB_NOWAIT for file-ns buffered I/O")
Signed-off-by: Maurizio Lombardi &lt;mlombard@redhat.com&gt;
Reviewed-by: Chaitanya Kulkarni &lt;kch@nvidia.com&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>nvmet-tcp: fix incomplete data digest send</title>
<updated>2021-12-01T08:04:51+00:00</updated>
<author>
<name>Varun Prakash</name>
<email>varun@chelsio.com</email>
</author>
<published>2021-11-22T10:08:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=63a68f37718294ab0c1d07699845b4c88f6d5f00'/>
<id>urn:sha1:63a68f37718294ab0c1d07699845b4c88f6d5f00</id>
<content type='text'>
[ Upstream commit 102110efdff6beedece6ab9b51664c32ac01e2db ]

Current nvmet_try_send_ddgst() code does not check whether
all data digest bytes are transmitted, fix this by returning
-EAGAIN if all data digest bytes are not transmitted.

Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target 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;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<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>nvmet-tcp: fix use-after-free when a port is removed</title>
<updated>2021-11-18T18:16:18+00:00</updated>
<author>
<name>Israel Rukshin</name>
<email>israelr@nvidia.com</email>
</author>
<published>2021-10-06T08:09:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=0703920365d306b9bee2760ce59f32a385404967'/>
<id>urn:sha1:0703920365d306b9bee2760ce59f32a385404967</id>
<content type='text'>
[ Upstream commit 2351ead99ce9164fb42555aee3f96af84c4839e9 ]

When removing a port, all its controllers are being removed, but there
are queues on the port that doesn't belong to any controller (during
connection time). This causes a use-after-free bug for any command
that dereferences req-&gt;port (like in nvmet_alloc_ctrl). Those queues
should be destroyed before freeing the port via configfs. Destroy
the remaining queues after the accept_work was cancelled guarantees
that no new queue will be created.

Signed-off-by: Israel Rukshin &lt;israelr@nvidia.com&gt;
Reviewed-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&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>nvmet-rdma: fix use-after-free when a port is removed</title>
<updated>2021-11-18T18:16:18+00:00</updated>
<author>
<name>Israel Rukshin</name>
<email>israelr@nvidia.com</email>
</author>
<published>2021-10-06T08:09:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=3c82292ee9bc0d3144d03ed0f96344ebf9e27453'/>
<id>urn:sha1:3c82292ee9bc0d3144d03ed0f96344ebf9e27453</id>
<content type='text'>
[ Upstream commit fcf73a804c7d6bbf0ea63531c6122aa363852e04 ]

When removing a port, all its controllers are being removed, but there
are queues on the port that doesn't belong to any controller (during
connection time). This causes a use-after-free bug for any command
that dereferences req-&gt;port (like in nvmet_alloc_ctrl). Those queues
should be destroyed before freeing the port via configfs. Destroy the
remaining queues after the RDMA-CM was destroyed guarantees that no
new queue will be created.

Signed-off-by: Israel Rukshin &lt;israelr@nvidia.com&gt;
Reviewed-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&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>nvmet: fix use-after-free when a port is removed</title>
<updated>2021-11-18T18:16:18+00:00</updated>
<author>
<name>Israel Rukshin</name>
<email>israelr@nvidia.com</email>
</author>
<published>2021-10-06T08:09:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e3d5ebee9c058ccb46a4ae161998a106397980c9'/>
<id>urn:sha1:e3d5ebee9c058ccb46a4ae161998a106397980c9</id>
<content type='text'>
[ Upstream commit e3e19dcc4c416d65f99f13d55be2b787f8d0050e ]

When a port is removed through configfs, any connected controllers
are starting teardown flow asynchronously and can still send commands.
This causes a use-after-free bug for any command that dereferences
req-&gt;port (like in nvmet_parse_io_cmd).

To fix this, wait for all the teardown scheduled works to complete
(like release_work at rdma/tcp drivers). This ensures there are no
active controllers when the port is eventually removed.

Signed-off-by: Israel Rukshin &lt;israelr@nvidia.com&gt;
Reviewed-by: Max Gurtovoy &lt;mgurtovoy@nvidia.com&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>nvmet-tcp: fix header digest verification</title>
<updated>2021-10-27T07:20:50+00:00</updated>
<author>
<name>Amit Engel</name>
<email>amit.engel@dell.com</email>
</author>
<published>2021-10-27T06:49:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=86aeda32b887cdaeb0f4b7bfc9971e36377181c7'/>
<id>urn:sha1:86aeda32b887cdaeb0f4b7bfc9971e36377181c7</id>
<content type='text'>
Pass the correct length to nvmet_tcp_verify_hdgst, which is the pdu
header length.  This fixes a wrong behaviour where header digest
verification passes although the digest is wrong.

Signed-off-by: Amit Engel &lt;amit.engel@dell.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>nvmet-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:16:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e790de54e94a7a15fb725b34724d41d41cbaa60c'/>
<id>urn:sha1:e790de54e94a7a15fb725b34724d41d41cbaa60c</id>
<content type='text'>
exp_ddgst is of type __le32, &amp;cmd-&gt;exp_ddgst + cmd-&gt;offset increases
&amp;cmd-&gt;exp_ddgst by 4 * cmd-&gt;offset, fix this by type casting
&amp;cmd-&gt;exp_ddgst to u8 *.

Fixes: 872d26a391da ("nvmet-tcp: add NVMe over TCP target 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 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>
</feed>
