<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/scsi/sd.c, branch linux-4.15.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.15.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2017-12-12T02:56:48Z</updated>
<entry>
<title>scsi: core: Fix a scsi_show_rq() NULL pointer dereference</title>
<updated>2017-12-12T02:56:48Z</updated>
<author>
<name>Bart Van Assche</name>
</author>
<published>2017-12-06T00:57:51Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=14e3062fb18532175af4d1c4073597999f7a2248'/>
<id>urn:sha1:14e3062fb18532175af4d1c4073597999f7a2248</id>
<content type='text'>
Avoid that scsi_show_rq() triggers a NULL pointer dereference if called
after sd_uninit_command(). Swap the NULL pointer assignment and the
mempool_free() call in sd_uninit_command() to make it less likely that
scsi_show_rq() triggers a use-after-free. Note: even with these changes
scsi_show_rq() can trigger a use-after-free but that's a lesser evil
than e.g. suppressing debug information for T10 PI Type 2 commands
completely. This patch fixes the following oops:

BUG: unable to handle kernel NULL pointer dereference at (null)
IP: scsi_format_opcode_name+0x1a/0x1c0
CPU: 1 PID: 1881 Comm: cat Not tainted 4.14.0-rc2.blk_mq_io_hang+ #516
Call Trace:
 __scsi_format_command+0x27/0xc0
 scsi_show_rq+0x5c/0xc0
 __blk_mq_debugfs_rq_show+0x116/0x130
 blk_mq_debugfs_rq_show+0xe/0x10
 seq_read+0xfe/0x3b0
 full_proxy_read+0x54/0x90
 __vfs_read+0x37/0x160
 vfs_read+0x96/0x130
 SyS_read+0x55/0xc0
 entry_SYSCALL_64_fastpath+0x1a/0xa5

[mkp: added Type 2]

Fixes: 0eebd005dd07 ("scsi: Implement blk_mq_ops.show_rq()")
Reported-by: Ming Lei &lt;ming.lei@redhat.com&gt;
Signed-off-by: Bart Van Assche &lt;bart.vanassche@wdc.com&gt;
Cc: James E.J. Bottomley &lt;jejb@linux.vnet.ibm.com&gt;
Cc: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Ming Lei &lt;ming.lei@redhat.com&gt;
Cc: Christoph Hellwig &lt;hch@lst.de&gt;
Cc: Hannes Reinecke &lt;hare@suse.com&gt;
Cc: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi</title>
<updated>2017-11-15T00:23:44Z</updated>
<author>
<name>Linus Torvalds</name>
</author>
<published>2017-11-15T00:23:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=670ffccb2f9183eb6cb32fe92257aea52b3f8a7d'/>
<id>urn:sha1:670ffccb2f9183eb6cb32fe92257aea52b3f8a7d</id>
<content type='text'>
Pull SCSI updates from James Bottomley:
 "This is mostly updates of the usual suspects: lpfc, qla2xxx, hisi_sas,
  megaraid_sas, pm80xx, mpt3sas, be2iscsi, hpsa. and a host of minor
  updates.

  There's no major behaviour change or additions to the core in all of
  this, so the potential for regressions should be small (biggest
  potential being in the scsi error handler changes)"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (203 commits)
  scsi: lpfc: Fix hard lock up NMI in els timeout handling.
  scsi: mpt3sas: remove a stray KERN_INFO
  scsi: mpt3sas: cleanup _scsih_pcie_enumeration_event()
  scsi: aacraid: use timespec64 instead of timeval
  scsi: scsi_transport_fc: add 64GBIT and 128GBIT port speed definitions
  scsi: qla2xxx: Suppress a kernel complaint in qla_init_base_qpair()
  scsi: mpt3sas: fix dma_addr_t casts
  scsi: be2iscsi: Use kasprintf
  scsi: storvsc: Avoid excessive host scan on controller change
  scsi: lpfc: fix kzalloc-simple.cocci warnings
  scsi: mpt3sas: Update mpt3sas driver version.
  scsi: mpt3sas: Fix sparse warnings
  scsi: mpt3sas: Fix nvme drives checking for tlr.
  scsi: mpt3sas: NVMe drive support for BTDHMAPPING ioctl command and log info
  scsi: mpt3sas: Add-Task-management-debug-info-for-NVMe-drives.
  scsi: mpt3sas: scan and add nvme device after controller reset
  scsi: mpt3sas: Set NVMe device queue depth as 128
  scsi: mpt3sas: Handle NVMe PCIe device related events generated from firmware.
  scsi: mpt3sas: API's to remove nvme drive from sml
  scsi: mpt3sas: API 's to support NVMe drive addition to SML
  ...
</content>
</entry>
<entry>
<title>scsi: sd: change manage_start_stop to bool in sysfs interface</title>
<updated>2017-10-17T05:26:25Z</updated>
<author>
<name>weiping zhang</name>
</author>
<published>2017-10-12T06:57:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=623401ee33e42cee64d333877892be8db02951eb'/>
<id>urn:sha1:623401ee33e42cee64d333877892be8db02951eb</id>
<content type='text'>
/sys/class/scsi_disk/0:2:0:0/manage_start_stop can be changed to 0
unexpectly by writing an invalid string.

Signed-off-by: weiping zhang &lt;zhangweiping@didichuxing.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sd: change allow_restart to bool in sysfs interface</title>
<updated>2017-10-17T05:26:03Z</updated>
<author>
<name>weiping zhang</name>
</author>
<published>2017-10-12T06:56:44Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=658e9a6dc1126f21fa417cd213e1cdbff8be0ba2'/>
<id>urn:sha1:658e9a6dc1126f21fa417cd213e1cdbff8be0ba2</id>
<content type='text'>
/sys/class/scsi_disk/0:2:0:0/allow_restart can be changed to 0
unexpectedly by writing an invalid string such as the following:

echo asdf &gt; /sys/class/scsi_disk/0:2:0:0/allow_restart

Signed-off-by: weiping zhang &lt;zhangweiping@didichuxing.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sd: Do not override max_sectors_kb sysfs setting</title>
<updated>2017-10-03T02:16:25Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2017-09-28T01:38:59Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=77082ca503bed061f7fbda7cfd7c93beda967a41'/>
<id>urn:sha1:77082ca503bed061f7fbda7cfd7c93beda967a41</id>
<content type='text'>
A user may lower the max_sectors_kb setting in sysfs to accommodate
certain workloads. Previously we would always set the max I/O size to
either the block layer default or the optional preferred I/O size
reported by the device.

Keep the current heuristics for the initial setting of max_sectors_kb.
For subsequent invocations, only update the current queue limit if it
exceeds the capabilities of the hardware.

Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Don Brace &lt;don.brace@microsemi.com&gt;
Reviewed-by: Martin Wilck &lt;mwilck@suse.com&gt;
Tested-by: Don Brace &lt;don.brace@microsemi.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sd: Implement blacklist option for WRITE SAME w/ UNMAP</title>
<updated>2017-10-03T02:16:18Z</updated>
<author>
<name>Martin K. Petersen</name>
</author>
<published>2017-09-28T01:35:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=28a0bc4120d38a394499382ba21d6965a67a3703'/>
<id>urn:sha1:28a0bc4120d38a394499382ba21d6965a67a3703</id>
<content type='text'>
SBC-4 states:

  "A MAXIMUM UNMAP LBA COUNT field set to a non-zero value indicates the
   maximum number of LBAs that may be unmapped by an UNMAP command"

  "A MAXIMUM WRITE SAME LENGTH field set to a non-zero value indicates
   the maximum number of contiguous logical blocks that the device server
   allows to be unmapped or written in a single WRITE SAME command."

Despite the spec being clear on the topic, some devices incorrectly
expect WRITE SAME commands with the UNMAP bit set to be limited to the
value reported in MAXIMUM UNMAP LBA COUNT in the Block Limits VPD.

Implement a blacklist option that can be used to accommodate devices
with this behavior.

Cc: &lt;stable@vger.kernel.org&gt;
Reported-by: Bill Kuzeja &lt;William.Kuzeja@stratus.com&gt;
Reported-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Reviewed-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Tested-by: Laurence Oberman &lt;loberman@redhat.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sd: Align maximum write same blocks to physical block size</title>
<updated>2017-09-25T19:36:40Z</updated>
<author>
<name>Damien Le Moal</name>
</author>
<published>2017-09-05T11:55:35Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b7af62a945706e32b987f1dd0cc86bb41a8210c3'/>
<id>urn:sha1:b7af62a945706e32b987f1dd0cc86bb41a8210c3</id>
<content type='text'>
Reporting a maximum number of blocks that is not aligned on the device
physical size would cause a large write same request to be split into
physically unaligned chunks by __blkdev_issue_write_zeroes() and
__blkdev_issue_write_same(), even if the caller of these functions took
care to align its request to physical sectors.

Make sure the maximum reported is aligned to the device physical block
size. This is only an optional optimization for regular disks, but this
is mandatory to avoid failure of large write same requests directed at
sequential write required zones of host-managed ZBC disks.

[mkp: tweaked commit message]

Signed-off-by: Damien Le Moal &lt;damien.lemoal@wdc.com&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>scsi: sd: Remove unnecessary condition in sd_read_block_limits()</title>
<updated>2017-09-15T19:14:28Z</updated>
<author>
<name>Lukas Czerner</name>
</author>
<published>2017-09-13T14:29:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9c95be0163a0a699ed7eda4727f485f8453580ef'/>
<id>urn:sha1:9c95be0163a0a699ed7eda4727f485f8453580ef</id>
<content type='text'>
After series of changes around WRITE_SAME and UNMAP setup we ended up
with leftover unnecessary condition. Remove it.

Signed-off-by: Lukas Czerner &lt;lczerner@redhat.com&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@wdc.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'fixes' into misc</title>
<updated>2017-09-07T19:12:43Z</updated>
<author>
<name>James Bottomley</name>
</author>
<published>2017-09-07T19:12:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2441500a41a9b17ff657626eb81972f62bc8cc5a'/>
<id>urn:sha1:2441500a41a9b17ff657626eb81972f62bc8cc5a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>scsi: sd: remove duplicated setting of gd-&gt;minors</title>
<updated>2017-08-25T21:26:08Z</updated>
<author>
<name>weiping zhang</name>
</author>
<published>2017-08-18T06:49:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5f800c87dadf0857b31ccb6217d6d42d4c1fe157'/>
<id>urn:sha1:5f800c87dadf0857b31ccb6217d6d42d4c1fe157</id>
<content type='text'>
gd-&gt;minors has been set when call alloc_disk() in sd_probe.

Signed-off-by: weiping zhang &lt;zhangweiping@didichuxing.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
</content>
</entry>
</feed>
