<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/nvme, branch v4.9</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=v4.9</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.9'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2016-11-16T19:39:57Z</updated>
<entry>
<title>nvme/pci: Don't free queues on error</title>
<updated>2016-11-16T19:39:57Z</updated>
<author>
<name>Keith Busch</name>
<email>keith.busch@intel.com</email>
</author>
<published>2016-11-15T20:56:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d48756228ee9161ac8836b346589a43fabdc9f3c'/>
<id>urn:sha1:d48756228ee9161ac8836b346589a43fabdc9f3c</id>
<content type='text'>
The nvme_remove function tears down all allocated resources in the correct
order, so no need to free queues on error during initialization. This
fixes possible use-after-free errors when queues are still associated
with a blk-mq hctx.

Reported-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Tested-by: Scott Bauer &lt;scott.bauer@intel.com&gt;
Signed-off-by: Keith Busch &lt;keith.busch@intel.com&gt;
Reviewed-by: Sagi Grimberg &lt;sagi@grimbeg.me&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>nvmet-rdma: drain the queue-pair just before freeing it</title>
<updated>2016-11-14T00:08:53Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagi@grimberg.me</email>
</author>
<published>2016-11-06T09:03:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=14c862dbb0a0e0a9baec20480d441e32cb54b2b9'/>
<id>urn:sha1:14c862dbb0a0e0a9baec20480d441e32cb54b2b9</id>
<content type='text'>
draining the qp right after disconnect might not suffice because
the nvmet sq is not fully drained (in nvmet_sq_destroy) and we might
see completions after the drain. Instead, drain right before the
qp destroy which comes after the sq destruction and we can be sure
that no posts come after the drain.

Tested-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>nvme-rdma: stop and free io queues on connect failure</title>
<updated>2016-11-14T00:08:53Z</updated>
<author>
<name>Steve Wise</name>
<email>swise@opengridcomputing.com</email>
</author>
<published>2016-11-08T17:16:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=c8dbc37cd81d4705fce51123f5d81ea3267a5b88'/>
<id>urn:sha1:c8dbc37cd81d4705fce51123f5d81ea3267a5b88</id>
<content type='text'>
While testing nvme-rdma with the spdk nvmf target over iw_cxgb4, I
configured the target (mistakenly) to generate an error creating the
NVMF IO queues.  This resulted a "Invalid SQE Parameter" error sent back
to the host on the first IO queue connect:

[ 9610.928182] nvme nvme1: queue_size 128 &gt; ctrl maxcmd 120, clamping down
[ 9610.938745] nvme nvme1: creating 32 I/O queues.

So nvmf_connect_io_queue() returns an error to
nvmf_connect_io_queue() / nvmf_connect_io_queues(), and that
is returned to nvme_rdma_create_io_queues().  In the error path,
nvmf_rdma_create_io_queues() frees the queue tagset memory _before_
stopping and freeing the IB queues, which causes yet another
touch-after-free crash due to SQ CQEs being flushed after the ib_cqe
structs pointed-to by the flushed WRs have been freed (since they are
part of the nvme_rdma_request struct).

The fix is to stop and free the queues in nvmf_connect_io_queues()
if there is an error connecting any of the queues.

Signed-off-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>nvmet-rdma: don't forget to delete a queue from the list of connection failed</title>
<updated>2016-11-14T00:08:52Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagi@grimberg.me</email>
</author>
<published>2016-11-06T09:09:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=766dbb179d41d6337fed2b3ca00caa5845d298ce'/>
<id>urn:sha1:766dbb179d41d6337fed2b3ca00caa5845d298ce</id>
<content type='text'>
In case we accepted a queue connection and it failed, we might not
remove the queue from the list until we unload and clean it up.
We should delete it from the queue list on the relevant handler.

Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>nvmet: Don't queue fatal error work if csts.cfs is set</title>
<updated>2016-11-14T00:08:51Z</updated>
<author>
<name>Sagi Grimberg</name>
<email>sagi@grimberg.me</email>
</author>
<published>2016-11-06T09:03:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8242ddac1bfcf6eb8873b4d0a4e7a172c2b5b625'/>
<id>urn:sha1:8242ddac1bfcf6eb8873b4d0a4e7a172c2b5b625</id>
<content type='text'>
In the transport, in case of an interal queue error like
error completion in rdma we trigger a fatal error. However,
multiple queues in the same controller can serr error completions
and we don't want to trigger fatal error work more than once.

Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>nvme-rdma: reject non-connect commands before the queue is live</title>
<updated>2016-11-14T00:08:51Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-11-02T14:49:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=553cd9ef82edd811948782a8f73ae73c4bfeedd3'/>
<id>urn:sha1:553cd9ef82edd811948782a8f73ae73c4bfeedd3</id>
<content type='text'>
If we reconncect we might have command queue up that get resent as soon
as the queue is restarted.  But until the connect command succeeded we
can't send other command.  Add a new flag that marks a queue as live when
connect finishes, and delay any non-connect command until the queue is
live based on it.

Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reported-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
Tested-by: Steve Wise &lt;swise@opengridcomputing.com&gt;
[sagig: fixes admin queue LIVE setting]
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>nvmet-rdma: Fix possible NULL deref when handling rdma cm events</title>
<updated>2016-11-14T00:08:50Z</updated>
<author>
<name>Bart Van Assche</name>
<email>bart.vanassche@sandisk.com</email>
</author>
<published>2016-11-01T16:36:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=fa14a0acea1ffe67913ba384a2897130a36dfe03'/>
<id>urn:sha1:fa14a0acea1ffe67913ba384a2897130a36dfe03</id>
<content type='text'>
When we initiate queue teardown sequence we call rdma_destroy_qp
which clears cm_id-&gt;qp, afterwards we call rdma_destroy_id, but
we might see a rdma_cm event in between with a cleared cm_id-&gt;qp
so watch out for that and silently ignore the event because this
means that the queue teardown sequence is in progress.

Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Signed-off-by: Sagi Grimberg &lt;sagi@grimberg.me&gt;
</content>
</entry>
<entry>
<title>lightnvm: invalid offset calculation for lba_shift</title>
<updated>2016-11-12T01:27:32Z</updated>
<author>
<name>Matias Bjørling</name>
<email>m@bjorling.me</email>
</author>
<published>2016-11-10T11:26:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=409ae5a76e0505c8ffe1424f9c00dbf2ec7b5eea'/>
<id>urn:sha1:409ae5a76e0505c8ffe1424f9c00dbf2ec7b5eea</id>
<content type='text'>
The ns-&gt;lba_shift assumes its value to be the logarithmic of the
LA size. A previous patch duplicated the lba_shift calculation into
lightnvm. It prematurely also subtracted a 512byte shift, which commonly
is applied per-command. The 512byte shift being subtracted twice led to
data loss when restoring the logical to physical mapping table from
device and when issuing I/O commands using rrpc.

Fix offset by removing the 512byte shift subtraction when calculating
lba_shift.

Fixes: b0b4e09c1ae7 "lightnvm: control life of nvm_dev in driver"
Reported-by: Javier González &lt;javier@cnexlabs.com&gt;
Signed-off-by: Matias Bjørling &lt;m@bjorling.me&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of git://git.kernel.dk/linux-block</title>
<updated>2016-10-21T17:54:01Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2016-10-21T17:54:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=ecd06f28836f9d10c92a4740b5aaf7caf4324927'/>
<id>urn:sha1:ecd06f28836f9d10c92a4740b5aaf7caf4324927</id>
<content type='text'>
Pull block fixes from Jens Axboe:
 "A set of fixes that missed the merge window, mostly due to me being
  away around that time.

  Nothing major here, a mix of nvme cleanups and fixes, and one fix for
  the badblocks handling"

* 'for-linus' of git://git.kernel.dk/linux-block:
  nvmet: use symbolic constants for CNS values
  nvme: use symbolic constants for CNS values
  nvme.h: add an enum for cns values
  nvme.h: don't use uuid_be
  nvme.h: resync with nvme-cli
  nvme: Add tertiary number to NVME_VS
  nvme : Add sysfs entry for NVMe CMBs when appropriate
  nvme: don't schedule multiple resets
  nvme: Delete created IO queues on reset
  nvme: Stop probing a removed device
  badblocks: fix overlapping check for clearing
</content>
</entry>
<entry>
<title>nvmet: use symbolic constants for CNS values</title>
<updated>2016-10-19T17:36:22Z</updated>
<author>
<name>Christoph Hellwig</name>
<email>hch@lst.de</email>
</author>
<published>2016-09-30T11:51:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e9c9346e20c1b18a3ec30defd5ff7134bcc0da6d'/>
<id>urn:sha1:e9c9346e20c1b18a3ec30defd5ff7134bcc0da6d</id>
<content type='text'>
Signed-off-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Gabriel Krisman Bertazi &lt;krisman@linux.vnet.ibm.com&gt;
Reviewed-by: Jay Freyensee &lt;james_p_freyensee@linux.intel.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@fb.com&gt;
</content>
</entry>
</feed>
