<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/scsi, branch linux-3.10.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>scsi: scsi_dh_emc: return success in clariion_std_inquiry()</title>
<updated>2017-11-02T09:46:03+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-02-21T18:46:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=4de0e6b506b3ec5ce4d0517dafff4aea24c6ce73'/>
<id>4de0e6b506b3ec5ce4d0517dafff4aea24c6ce73</id>
<content type='text'>
commit 4d7d39a18b8b81511f0b893b7d2203790bf8a58b upstream.

We accidentally return an uninitialized variable on success.

Fixes: b6ff1b14cdf4 ("[SCSI] scsi_dh: Update EMC handler")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 4d7d39a18b8b81511f0b893b7d2203790bf8a58b upstream.

We accidentally return an uninitialized variable on success.

Fixes: b6ff1b14cdf4 ("[SCSI] scsi_dh: Update EMC handler")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Reviewed-by: Hannes Reinecke &lt;hare@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: qla2xxx: Fix an integer overflow in sysfs code</title>
<updated>2017-11-02T09:46:01+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2017-08-30T13:30:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=c5378d27adda7f15e3465594694bf9688ebe970c'/>
<id>c5378d27adda7f15e3465594694bf9688ebe970c</id>
<content type='text'>
commit e6f77540c067b48dee10f1e33678415bfcc89017 upstream.

The value of "size" comes from the user.  When we add "start + size" it
could lead to an integer overflow bug.

It means we vmalloc() a lot more memory than we had intended.  I believe
that on 64 bit systems vmalloc() can succeed even if we ask it to
allocate huge 4GB buffers.  So we would get memory corruption and likely
a crash when we call ha-&gt;isp_ops-&gt;write_optrom() and -&gt;read_optrom().

Only root can trigger this bug.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=194061

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: b7cc176c9eb3 ("[SCSI] qla2xxx: Allow region-based flash-part accesses.")
Reported-by: shqking &lt;shqking@gmail.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e6f77540c067b48dee10f1e33678415bfcc89017 upstream.

The value of "size" comes from the user.  When we add "start + size" it
could lead to an integer overflow bug.

It means we vmalloc() a lot more memory than we had intended.  I believe
that on 64 bit systems vmalloc() can succeed even if we ask it to
allocate huge 4GB buffers.  So we would get memory corruption and likely
a crash when we call ha-&gt;isp_ops-&gt;write_optrom() and -&gt;read_optrom().

Only root can trigger this bug.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=194061

Cc: &lt;stable@vger.kernel.org&gt;
Fixes: b7cc176c9eb3 ("[SCSI] qla2xxx: Allow region-based flash-part accesses.")
Reported-by: shqking &lt;shqking@gmail.com&gt;
Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: qla2xxx: don't disable a not previously enabled PCI device</title>
<updated>2017-11-02T06:16:26+00:00</updated>
<author>
<name>Johannes Thumshirn</name>
<email>jthumshirn@suse.de</email>
</author>
<published>2017-05-23T14:50:47+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a72c279dfbfa5b6c5832f16960d8dce31f27645b'/>
<id>a72c279dfbfa5b6c5832f16960d8dce31f27645b</id>
<content type='text'>
commit ddff7ed45edce4a4c92949d3c61cd25d229c4a14 upstream.

When pci_enable_device() or pci_enable_device_mem() fail in
qla2x00_probe_one() we bail out but do a call to
pci_disable_device(). This causes the dev_WARN_ON() in
pci_disable_device() to trigger, as the device wasn't enabled
previously.

So instead of taking the 'probe_out' error path we can directly return
*iff* one of the pci_enable_device() calls fails.

Additionally rename the 'probe_out' goto label's name to the more
descriptive 'disable_device'.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Fixes: e315cd28b9ef ("[SCSI] qla2xxx: Code changes for qla data structure refactoring")
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Giridhar Malavali &lt;giridhar.malavali@cavium.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit ddff7ed45edce4a4c92949d3c61cd25d229c4a14 upstream.

When pci_enable_device() or pci_enable_device_mem() fail in
qla2x00_probe_one() we bail out but do a call to
pci_disable_device(). This causes the dev_WARN_ON() in
pci_disable_device() to trigger, as the device wasn't enabled
previously.

So instead of taking the 'probe_out' error path we can directly return
*iff* one of the pci_enable_device() calls fails.

Additionally rename the 'probe_out' goto label's name to the more
descriptive 'disable_device'.

Signed-off-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Fixes: e315cd28b9ef ("[SCSI] qla2xxx: Code changes for qla data structure refactoring")
Cc: &lt;stable@vger.kernel.org&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Reviewed-by: Giridhar Malavali &lt;giridhar.malavali@cavium.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>mvsas: fix misleading indentation</title>
<updated>2017-06-20T12:04:29+00:00</updated>
<author>
<name>Luis de Bethencourt</name>
<email>luisbg@osg.samsung.com</email>
</author>
<published>2015-11-30T14:32:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=57f208211a18c6f58ed3f69cd8b7edee77cac9a7'/>
<id>57f208211a18c6f58ed3f69cd8b7edee77cac9a7</id>
<content type='text'>
commit 7789cd39274c51bf475411fe22a8ee7255082809 upstream.

Fix a smatch warning:
drivers/scsi/mvsas/mv_sas.c:740 mvs_task_prep() warn: curly braces intended?

The code is correct, the indention is misleading. When the device is not
ready we want to return SAS_PHY_DOWN. But current indentation makes it
look like we only do so in the else branch of if (mvi_dev).

Signed-off-by: Luis de Bethencourt &lt;luisbg@osg.samsung.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 7789cd39274c51bf475411fe22a8ee7255082809 upstream.

Fix a smatch warning:
drivers/scsi/mvsas/mv_sas.c:740 mvs_task_prep() warn: curly braces intended?

The code is correct, the indention is misleading. When the device is not
ready we want to return SAS_PHY_DOWN. But current indentation makes it
look like we only do so in the else branch of if (mvi_dev).

Signed-off-by: Luis de Bethencourt &lt;luisbg@osg.samsung.com&gt;
Reviewed-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sd: get disk reference in sd_check_events()</title>
<updated>2017-06-20T12:04:23+00:00</updated>
<author>
<name>Hannes Reinecke</name>
<email>hare@suse.de</email>
</author>
<published>2016-04-26T06:06:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1ba4fc4b0772b130c3acc9cd377f3039b9b24f8f'/>
<id>1ba4fc4b0772b130c3acc9cd377f3039b9b24f8f</id>
<content type='text'>
commit eb72d0bb84eee5d0dc3044fd17b75e7101dabb57 upstream.

sd_check_events() is called asynchronously, and might race
with device removal. So always take a disk reference when
processing the event to avoid the device being removed while
the event is processed.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Jinpu Wang &lt;jinpu.wang@profitbricks.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit eb72d0bb84eee5d0dc3044fd17b75e7101dabb57 upstream.

sd_check_events() is called asynchronously, and might race
with device removal. So always take a disk reference when
processing the event to avoid the device being removed while
the event is processed.

Signed-off-by: Hannes Reinecke &lt;hare@suse.de&gt;
Reviewed-by: Ewan D. Milne &lt;emilne@redhat.com&gt;
Reviewed-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Cc: Jinpu Wang &lt;jinpu.wang@profitbricks.com&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sg: Fix double-free when drives detach during SG_IO</title>
<updated>2017-06-20T12:04:14+00:00</updated>
<author>
<name>Calvin Owens</name>
<email>calvinowens@fb.com</email>
</author>
<published>2015-10-30T23:57:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=dda50d926e8a3f215857ab7091cd6b11d588881a'/>
<id>dda50d926e8a3f215857ab7091cd6b11d588881a</id>
<content type='text'>
commit f3951a3709ff50990bf3e188c27d346792103432 upstream.

In sg_common_write(), we free the block request and return -ENODEV if
the device is detached in the middle of the SG_IO ioctl().

Unfortunately, sg_finish_rem_req() also tries to free srp-&gt;rq, so we
end up freeing rq-&gt;cmd in the already free rq object, and then free
the object itself out from under the current user.

This ends up corrupting random memory via the list_head on the rq
object. The most common crash trace I saw is this:

  ------------[ cut here ]------------
  kernel BUG at block/blk-core.c:1420!
  Call Trace:
  [&lt;ffffffff81281eab&gt;] blk_put_request+0x5b/0x80
  [&lt;ffffffffa0069e5b&gt;] sg_finish_rem_req+0x6b/0x120 [sg]
  [&lt;ffffffffa006bcb9&gt;] sg_common_write.isra.14+0x459/0x5a0 [sg]
  [&lt;ffffffff8125b328&gt;] ? selinux_file_alloc_security+0x48/0x70
  [&lt;ffffffffa006bf95&gt;] sg_new_write.isra.17+0x195/0x2d0 [sg]
  [&lt;ffffffffa006cef4&gt;] sg_ioctl+0x644/0xdb0 [sg]
  [&lt;ffffffff81170f80&gt;] do_vfs_ioctl+0x90/0x520
  [&lt;ffffffff81258967&gt;] ? file_has_perm+0x97/0xb0
  [&lt;ffffffff811714a1&gt;] SyS_ioctl+0x91/0xb0
  [&lt;ffffffff81602afb&gt;] tracesys+0xdd/0xe2
    RIP [&lt;ffffffff81281e04&gt;] __blk_put_request+0x154/0x1a0

The solution is straightforward: just set srp-&gt;rq to NULL in the
failure branch so that sg_finish_rem_req() doesn't attempt to re-free
it.

Additionally, since sg_rq_end_io() will never be called on the object
when this happens, we need to free memory backing -&gt;cmd if it isn't
embedded in the object itself.

KASAN was extremely helpful in finding the root cause of this bug.

Signed-off-by: Calvin Owens &lt;calvinowens@fb.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit f3951a3709ff50990bf3e188c27d346792103432 upstream.

In sg_common_write(), we free the block request and return -ENODEV if
the device is detached in the middle of the SG_IO ioctl().

Unfortunately, sg_finish_rem_req() also tries to free srp-&gt;rq, so we
end up freeing rq-&gt;cmd in the already free rq object, and then free
the object itself out from under the current user.

This ends up corrupting random memory via the list_head on the rq
object. The most common crash trace I saw is this:

  ------------[ cut here ]------------
  kernel BUG at block/blk-core.c:1420!
  Call Trace:
  [&lt;ffffffff81281eab&gt;] blk_put_request+0x5b/0x80
  [&lt;ffffffffa0069e5b&gt;] sg_finish_rem_req+0x6b/0x120 [sg]
  [&lt;ffffffffa006bcb9&gt;] sg_common_write.isra.14+0x459/0x5a0 [sg]
  [&lt;ffffffff8125b328&gt;] ? selinux_file_alloc_security+0x48/0x70
  [&lt;ffffffffa006bf95&gt;] sg_new_write.isra.17+0x195/0x2d0 [sg]
  [&lt;ffffffffa006cef4&gt;] sg_ioctl+0x644/0xdb0 [sg]
  [&lt;ffffffff81170f80&gt;] do_vfs_ioctl+0x90/0x520
  [&lt;ffffffff81258967&gt;] ? file_has_perm+0x97/0xb0
  [&lt;ffffffff811714a1&gt;] SyS_ioctl+0x91/0xb0
  [&lt;ffffffff81602afb&gt;] tracesys+0xdd/0xe2
    RIP [&lt;ffffffff81281e04&gt;] __blk_put_request+0x154/0x1a0

The solution is straightforward: just set srp-&gt;rq to NULL in the
failure branch so that sg_finish_rem_req() doesn't attempt to re-free
it.

Additionally, since sg_rq_end_io() will never be called on the object
when this happens, we need to free memory backing -&gt;cmd if it isn't
embedded in the object itself.

KASAN was extremely helpful in finding the root cause of this bug.

Signed-off-by: Calvin Owens &lt;calvinowens@fb.com&gt;
Acked-by: Douglas Gilbert &lt;dgilbert@interlog.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Acked-by: Johannes Thumshirn &lt;jthumshirn@suse.de&gt;
Signed-off-by: Jiri Slaby &lt;jslaby@suse.cz&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>qla2xxx: Fix crash due to null pointer access</title>
<updated>2017-06-20T12:04:08+00:00</updated>
<author>
<name>Quinn Tran</name>
<email>quinn.tran@cavium.com</email>
</author>
<published>2016-12-24T02:06:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=2044077298b44481e2961c5c1b8764ed96e8d279'/>
<id>2044077298b44481e2961c5c1b8764ed96e8d279</id>
<content type='text'>
commit fc1ffd6cb38a1c1af625b9833c41928039e733f5 upstream.

During code inspection, while investigating following stack trace
seen on one of the test setup, we found out there was possibility
of memory leak becuase driver was not unwinding the stack properly.

This issue has not been reproduced in a test environment or on a
customer setup.

Here's stack trace that was seen.

[1469877.797315] Call Trace:
[1469877.799940]  [&lt;ffffffffa03ab6e9&gt;] qla2x00_mem_alloc+0xb09/0x10c0 [qla2xxx]
[1469877.806980]  [&lt;ffffffffa03ac50a&gt;] qla2x00_probe_one+0x86a/0x1b50 [qla2xxx]
[1469877.814013]  [&lt;ffffffff813b6d01&gt;] ? __pm_runtime_resume+0x51/0xa0
[1469877.820265]  [&lt;ffffffff8157c1f5&gt;] ? _raw_spin_lock_irqsave+0x25/0x90
[1469877.826776]  [&lt;ffffffff8157cd2d&gt;] ? _raw_spin_unlock_irqrestore+0x6d/0x80
[1469877.833720]  [&lt;ffffffff810741d1&gt;] ? preempt_count_sub+0xb1/0x100
[1469877.839885]  [&lt;ffffffff8157cd0c&gt;] ? _raw_spin_unlock_irqrestore+0x4c/0x80
[1469877.846830]  [&lt;ffffffff81319b9c&gt;] local_pci_probe+0x4c/0xb0
[1469877.852562]  [&lt;ffffffff810741d1&gt;] ? preempt_count_sub+0xb1/0x100
[1469877.858727]  [&lt;ffffffff81319c89&gt;] pci_call_probe+0x89/0xb0

Signed-off-by: Quinn Tran &lt;quinn.tran@cavium.com&gt;
Signed-off-by: Himanshu Madhani &lt;himanshu.madhani@cavium.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
[ bvanassche: Fixed spelling in patch description ]
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit fc1ffd6cb38a1c1af625b9833c41928039e733f5 upstream.

During code inspection, while investigating following stack trace
seen on one of the test setup, we found out there was possibility
of memory leak becuase driver was not unwinding the stack properly.

This issue has not been reproduced in a test environment or on a
customer setup.

Here's stack trace that was seen.

[1469877.797315] Call Trace:
[1469877.799940]  [&lt;ffffffffa03ab6e9&gt;] qla2x00_mem_alloc+0xb09/0x10c0 [qla2xxx]
[1469877.806980]  [&lt;ffffffffa03ac50a&gt;] qla2x00_probe_one+0x86a/0x1b50 [qla2xxx]
[1469877.814013]  [&lt;ffffffff813b6d01&gt;] ? __pm_runtime_resume+0x51/0xa0
[1469877.820265]  [&lt;ffffffff8157c1f5&gt;] ? _raw_spin_lock_irqsave+0x25/0x90
[1469877.826776]  [&lt;ffffffff8157cd2d&gt;] ? _raw_spin_unlock_irqrestore+0x6d/0x80
[1469877.833720]  [&lt;ffffffff810741d1&gt;] ? preempt_count_sub+0xb1/0x100
[1469877.839885]  [&lt;ffffffff8157cd0c&gt;] ? _raw_spin_unlock_irqrestore+0x4c/0x80
[1469877.846830]  [&lt;ffffffff81319b9c&gt;] local_pci_probe+0x4c/0xb0
[1469877.852562]  [&lt;ffffffff810741d1&gt;] ? preempt_count_sub+0xb1/0x100
[1469877.858727]  [&lt;ffffffff81319c89&gt;] pci_call_probe+0x89/0xb0

Signed-off-by: Quinn Tran &lt;quinn.tran@cavium.com&gt;
Signed-off-by: Himanshu Madhani &lt;himanshu.madhani@cavium.com&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
[ bvanassche: Fixed spelling in patch description ]
Signed-off-by: Bart Van Assche &lt;bart.vanassche@sandisk.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sg_write()/bsg_write() is not fit to be called under KERNEL_DS</title>
<updated>2017-06-20T12:03:25+00:00</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2016-12-16T18:42:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=823a2a0330f25ccea8ef64ee4a378e37ca51361c'/>
<id>823a2a0330f25ccea8ef64ee4a378e37ca51361c</id>
<content type='text'>
commit 128394eff343fc6d2f32172f03e24829539c5835 upstream.

Both damn things interpret userland pointers embedded into the payload;
worse, they are actually traversing those.  Leaving aside the bad
API design, this is very much _not_ safe to call with KERNEL_DS.
Bail out early if that happens.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 128394eff343fc6d2f32172f03e24829539c5835 upstream.

Both damn things interpret userland pointers embedded into the payload;
worse, they are actually traversing those.  Leaving aside the bad
API design, this is very much _not_ safe to call with KERNEL_DS.
Bail out early if that happens.

Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: sd: Fix capacity calculation with 32-bit sector_t</title>
<updated>2017-06-20T12:03:23+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2017-04-04T14:42:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=937f07614dcd8da04621e1e67589555a47a828d2'/>
<id>937f07614dcd8da04621e1e67589555a47a828d2</id>
<content type='text'>
commit 7c856152cb92f8eee2df29ef325a1b1f43161aff upstream.

We previously made sure that the reported disk capacity was less than
0xffffffff blocks when the kernel was not compiled with large sector_t
support (CONFIG_LBDAF). However, this check assumed that the capacity
was reported in units of 512 bytes.

Add a sanity check function to ensure that we only enable disks if the
entire reported capacity can be expressed in terms of sector_t.

Reported-by: Steve Magnani &lt;steve.magnani@digidescorp.com&gt;
Cc: Bart Van Assche &lt;Bart.VanAssche@sandisk.com&gt;
Reviewed-by: Bart Van Assche &lt;Bart.VanAssche@sandisk.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit 7c856152cb92f8eee2df29ef325a1b1f43161aff upstream.

We previously made sure that the reported disk capacity was less than
0xffffffff blocks when the kernel was not compiled with large sector_t
support (CONFIG_LBDAF). However, this check assumed that the capacity
was reported in units of 512 bytes.

Add a sanity check function to ensure that we only enable disks if the
entire reported capacity can be expressed in terms of sector_t.

Reported-by: Steve Magnani &lt;steve.magnani@digidescorp.com&gt;
Cc: Bart Van Assche &lt;Bart.VanAssche@sandisk.com&gt;
Reviewed-by: Bart Van Assche &lt;Bart.VanAssche@sandisk.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>scsi: sr: Sanity check returned mode data</title>
<updated>2017-06-20T12:03:23+00:00</updated>
<author>
<name>Martin K. Petersen</name>
<email>martin.petersen@oracle.com</email>
</author>
<published>2017-03-17T12:47:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=d427ab53d49580344f2d515c0ffd261fc3b483df'/>
<id>d427ab53d49580344f2d515c0ffd261fc3b483df</id>
<content type='text'>
commit a00a7862513089f17209b732f230922f1942e0b9 upstream.

Kefeng Wang discovered that old versions of the QEMU CD driver would
return mangled mode data causing us to walk off the end of the buffer in
an attempt to parse it. Sanity check the returned mode sense data.

Reported-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Tested-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit a00a7862513089f17209b732f230922f1942e0b9 upstream.

Kefeng Wang discovered that old versions of the QEMU CD driver would
return mangled mode data causing us to walk off the end of the buffer in
an attempt to parse it. Sanity check the returned mode sense data.

Reported-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Tested-by: Kefeng Wang &lt;wangkefeng.wang@huawei.com&gt;
Signed-off-by: Martin K. Petersen &lt;martin.petersen@oracle.com&gt;
Signed-off-by: Willy Tarreau &lt;w@1wt.eu&gt;
</pre>
</div>
</content>
</entry>
</feed>
