<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/nvme/host, branch v5.15</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=v5.15</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v5.15'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2021-10-27T05:58:26Z</updated>
<entry>
<title>nvme-tcp: fix data digest pointer calculation</title>
<updated>2021-10-27T05:58:26Z</updated>
<author>
<name>Varun Prakash</name>
<email>varun@chelsio.com</email>
</author>
<published>2021-10-25T17:17:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:26Z</updated>
<author>
<name>Varun Prakash</name>
<email>varun@chelsio.com</email>
</author>
<published>2021-10-26T13:31:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:29Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagi@grimberg.me</email>
</author>
<published>2021-10-24T07:43:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:14Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2021-10-14T15:07:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:47Z</updated>
<author>
<name>Adam Manzanares</name>
<email>a.manzanares@samsung.com</email>
</author>
<published>2021-10-13T15:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:06Z</updated>
<author>
<name>Keith Busch</name>
<email>kbusch@kernel.org</email>
</author>
<published>2021-10-07T06:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:07Z</updated>
<author>
<name>Keith Busch</name>
<email>kbusch@kernel.org</email>
</author>
<published>2021-09-27T15:43:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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:15Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2021-09-14T06:38:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/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>
<entry>
<title>nvme-tcp: fix incorrect h2cdata pdu offset accounting</title>
<updated>2021-09-21T07:17:15Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagi@grimberg.me</email>
</author>
<published>2021-09-14T15:38:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e371af033c560b9dd1e861f8f0b503142bf0a06c'/>
<id>urn:sha1:e371af033c560b9dd1e861f8f0b503142bf0a06c</id>
<content type='text'>
When the controller sends us multiple r2t PDUs in a single
request we need to account for it correctly as our send/recv
context run concurrently (i.e. we get a new r2t with r2t_offset
before we updated our iterator and req-&gt;data_sent marker). This
can cause wrong offsets to be sent to the controller.

To fix that, we will first know that this may happen only in
the send sequence of the last page, hence we will take
the r2t_offset to the h2c PDU data_offset, and in
nvme_tcp_try_send_data loop, we make sure to increment
the request markers also when we completed a PDU but
we are expecting more r2t PDUs as we still did not send
the entire data of the request.

Fixes: 825619b09ad3 ("nvme-tcp: fix possible use-after-completion")
Reported-by: Nowak, Lukasz &lt;Lukasz.Nowak@Dell.com&gt;
Tested-by: Nowak, Lukasz &lt;Lukasz.Nowak@Dell.com&gt;
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>nvme-fc: remove freeze/unfreeze around update_nr_hw_queues</title>
<updated>2021-09-21T07:17:12Z</updated>
<author>
<name>James Smart</name>
<email>jsmart2021@gmail.com</email>
</author>
<published>2021-09-14T09:20:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bdaa1365667103e7a754e87c08b846a979ce322b'/>
<id>urn:sha1:bdaa1365667103e7a754e87c08b846a979ce322b</id>
<content type='text'>
Remove the freeze/unfreeze around changes to the number of hardware
queues. Study and retest has indicated there are no ios that can be
active at this point so there is nothing to freeze.

nvme-fc is draining the queues in the shutdown and error recovery path
in __nvme_fc_abort_outstanding_ios.

This patch primarily reverts 88e837ed0f1f "nvme-fc: wait for queues to
freeze before calling update_hr_hw_queues". It's not an exact revert as
it leaves the adjusting of hw queues only if the count changes.

Signed-off-by: James Smart &lt;jsmart2021@gmail.com&gt;
[dwagner: added explanation why no IO is pending]
Signed-off-by: Daniel Wagner &lt;dwagner@suse.de&gt;
Reviewed-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Reviewed-by: Himanshu Madhani &lt;himanshu.madhani@oracle.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
</content>
</entry>
</feed>
