<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers, branch v3.4.7</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers?h=v3.4.7</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers?h=v3.4.7'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-07-29T15:04:21Z</updated>
<entry>
<title>dm raid1: set discard_zeroes_data_unsupported</title>
<updated>2012-07-29T15:04:21Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2012-07-20T13:25:07Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5a4db9ee4f44658077a11c71d78a17573016fc0e'/>
<id>urn:sha1:5a4db9ee4f44658077a11c71d78a17573016fc0e</id>
<content type='text'>
commit 7c8d3a42fe1c58a7e8fd3f6a013e7d7b474ff931 upstream.

We can't guarantee that REQ_DISCARD on dm-mirror zeroes the data even if
the underlying disks support zero on discard.  So this patch sets
ti-&gt;discard_zeroes_data_unsupported.

For example, if the mirror is in the process of resynchronizing, it may
happen that kcopyd reads a piece of data, then discard is sent on the
same area and then kcopyd writes the piece of data to another leg.
Consequently, the data is not zeroed.

The flag was made available by commit 983c7db347db8ce2d8453fd1d89b7a4bb6920d56
(dm crypt: always disable discard_zeroes_data).

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm raid1: fix crash with mirror recovery and discard</title>
<updated>2012-07-29T15:04:21Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2012-07-20T13:25:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=91aafba4414743c24c6d06ccca75113e4abd13a8'/>
<id>urn:sha1:91aafba4414743c24c6d06ccca75113e4abd13a8</id>
<content type='text'>
commit 751f188dd5ab95b3f2b5f2f467c38aae5a2877eb upstream.

This patch fixes a crash when a discard request is sent during mirror
recovery.

Firstly, some background.  Generally, the following sequence happens during
mirror synchronization:
- function do_recovery is called
- do_recovery calls dm_rh_recovery_prepare
- dm_rh_recovery_prepare uses a semaphore to limit the number
  simultaneously recovered regions (by default the semaphore value is 1,
  so only one region at a time is recovered)
- dm_rh_recovery_prepare calls __rh_recovery_prepare,
  __rh_recovery_prepare asks the log driver for the next region to
  recover. Then, it sets the region state to DM_RH_RECOVERING. If there
  are no pending I/Os on this region, the region is added to
  quiesced_regions list. If there are pending I/Os, the region is not
  added to any list. It is added to the quiesced_regions list later (by
  dm_rh_dec function) when all I/Os finish.
- when the region is on quiesced_regions list, there are no I/Os in
  flight on this region. The region is popped from the list in
  dm_rh_recovery_start function. Then, a kcopyd job is started in the
  recover function.
- when the kcopyd job finishes, recovery_complete is called. It calls
  dm_rh_recovery_end. dm_rh_recovery_end adds the region to
  recovered_regions or failed_recovered_regions list (depending on
  whether the copy operation was successful or not).

The above mechanism assumes that if the region is in DM_RH_RECOVERING
state, no new I/Os are started on this region. When I/O is started,
dm_rh_inc_pending is called, which increases reg-&gt;pending count. When
I/O is finished, dm_rh_dec is called. It decreases reg-&gt;pending count.
If the count is zero and the region was in DM_RH_RECOVERING state,
dm_rh_dec adds it to the quiesced_regions list.

Consequently, if we call dm_rh_inc_pending/dm_rh_dec while the region is
in DM_RH_RECOVERING state, it could be added to quiesced_regions list
multiple times or it could be added to this list when kcopyd is copying
data (it is assumed that the region is not on any list while kcopyd does
its jobs). This results in memory corruption and crash.

There already exist bypasses for REQ_FLUSH requests: REQ_FLUSH requests
do not belong to any region, so they are always added to the sync list
in do_writes. dm_rh_inc_pending does not increase count for REQ_FLUSH
requests. In mirror_end_io, dm_rh_dec is never called for REQ_FLUSH
requests. These bypasses avoid the crash possibility described above.

These bypasses were improperly implemented for REQ_DISCARD when
the mirror target gained discard support in commit
5fc2ffeabb9ee0fc0e71ff16b49f34f0ed3d05b4 (dm raid1: support discard).

In do_writes, REQ_DISCARD requests is always added to the sync queue and
immediately dispatched (even if the region is in DM_RH_RECOVERING).  However,
dm_rh_inc and dm_rh_dec is called for REQ_DISCARD resusts.  So it violates the
rule that no I/Os are started on DM_RH_RECOVERING regions, and causes the list
corruption described above.

This patch changes it so that REQ_DISCARD requests follow the same path
as REQ_FLUSH. This avoids the crash.

Reference: https://bugzilla.redhat.com/837607

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm thin: do not send discards to shared blocks</title>
<updated>2012-07-29T15:04:20Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2012-07-20T13:25:05Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5b8bbc39d5678179f2fd4ee2e09005d8f277834c'/>
<id>urn:sha1:5b8bbc39d5678179f2fd4ee2e09005d8f277834c</id>
<content type='text'>
commit 650d2a06b4fe1cc1d218c20e256650f68bf0ca31 upstream.

When process_discard receives a partial discard that doesn't cover a
full block, it sends this discard down to that block. Unfortunately, the
block can be shared and the discard would corrupt the other snapshots
sharing this block.

This patch detects block sharing and ends the discard with success when
sending it to the shared block.

The above change means that if the device supports discard it can't be
guaranteed that a discard request zeroes data. Therefore, we set
ti-&gt;discard_zeroes_data_unsupported.

Thin target discard support with this bug arrived in commit
104655fd4dcebd50068ef30253a001da72e3a081 (dm thin: support discards).

Signed-off-by: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: multitouch: Add support for Baanto touchscreen</title>
<updated>2012-07-29T15:04:19Z</updated>
<author>
<name>Jiri Kosina</name>
<email>jkosina@suse.cz</email>
</author>
<published>2012-04-20T10:15:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=60d091aeb66c0b201689862bcb803c32db712d05'/>
<id>urn:sha1:60d091aeb66c0b201689862bcb803c32db712d05</id>
<content type='text'>
commit 9ed326951806c424b42dcf2e1125e25a98fb13d1 upstream.

Reported-by: Tvrtko Ursulin &lt;tvrtko.ursulin@onelan.co.uk&gt;
Tested-by: Tvrtko Ursulin &lt;tvrtko.ursulin@onelan.co.uk&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: add Sennheiser BTD500USB device support</title>
<updated>2012-07-29T15:04:19Z</updated>
<author>
<name>Frank Kunz</name>
<email>xxxxxmichl@googlemail.com</email>
</author>
<published>2012-07-05T20:32:49Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=eb6cf92d839f43dbc2009a2440479f46f7adfd46'/>
<id>urn:sha1:eb6cf92d839f43dbc2009a2440479f46f7adfd46</id>
<content type='text'>
commit 0e050923a797c1fc46ccc1e5182fd3090f33a75d upstream.

The Sennheiser BTD500USB composit device requires the
HID_QUIRK_NOGET flag to be set for working proper. Without the
flag the device crashes during hid intialization.

Signed-off-by: Frank Kunz &lt;xxxxxmichl@googlemail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>HID: add battery quirk for Apple Wireless ANSI</title>
<updated>2012-07-29T15:04:19Z</updated>
<author>
<name>Daniel Nicoletti</name>
<email>dantti12@gmail.com</email>
</author>
<published>2012-07-04T13:20:31Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=e58cd46e372812120c547f1b311f7a1a00c22af4'/>
<id>urn:sha1:e58cd46e372812120c547f1b311f7a1a00c22af4</id>
<content type='text'>
commit 0c47935c5b5cd4916cf1c1ed4a2894807f7bcc3e upstream.

Add USB_DEVICE_ID_APPLE_ALU_WIRELESS_ANSI, to the quirk list since it report
wrong feature type and wrong percentage range.

Signed-off-by: Daniel Nicoletti &lt;dantti12@gmail.com&gt;
Signed-off-by: Jiri Kosina &lt;jkosina@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tcm_fc: Fix crash seen with aborts and large reads</title>
<updated>2012-07-29T15:04:18Z</updated>
<author>
<name>Mark Rustad</name>
<email>mark.d.rustad@intel.com</email>
</author>
<published>2012-07-14T01:18:04Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8db5153f9dca89afbeebe0b077e7cc1e5827e07a'/>
<id>urn:sha1:8db5153f9dca89afbeebe0b077e7cc1e5827e07a</id>
<content type='text'>
commit 3cc5d2a6b9a2fd1bf024aa5e52dd22961eecaf13 upstream.

This patch fixes a crash seen when large reads have their exchange
aborted by either timing out or being reset. Because the exchange
abort results in the seq pointer being set to NULL, because the
sequence is no longer valid, it must not be dereferenced. This
patch changes the function ft_get_task_tag to return ~0 if it is
unable to get the tag for this reason. Because the get_task_tag
interface provides no means of returning an error, this seems
like the best way to fix this issue at the moment.

Signed-off-by: Mark Rustad &lt;mark.d.rustad@intel.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Fix range calculation in WRITE SAME emulation when num blocks == 0</title>
<updated>2012-07-29T15:04:18Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-07-17T00:10:17Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5c8c9e57270fc5f54aa02144f7280f91ee2e3334'/>
<id>urn:sha1:5c8c9e57270fc5f54aa02144f7280f91ee2e3334</id>
<content type='text'>
commit 1765fe5edcb83f53fc67edeb559fcf4bc82c6460 upstream.

When NUMBER OF LOGICAL BLOCKS is 0, WRITE SAME is supposed to write
all the blocks from the specified LBA through the end of the device.
However, dev-&gt;transport-&gt;get_blocks(dev) (perhaps confusingly) returns
the last valid LBA rather than the number of blocks, so the correct
number of blocks to write starting with lba is

dev-&gt;transport-&gt;get_blocks(dev) - lba + 1

(nab: Backport roland's for-3.6 patch to for-3.5)

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>target: Clean up returning errors in PR handling code</title>
<updated>2012-07-29T15:04:18Z</updated>
<author>
<name>Roland Dreier</name>
<email>roland@purestorage.com</email>
</author>
<published>2012-07-16T22:17:10Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=815faab2c4b7deb2cc6495186307ceb0983214a9'/>
<id>urn:sha1:815faab2c4b7deb2cc6495186307ceb0983214a9</id>
<content type='text'>
commit d35212f3ca3bf4fb49d15e37f530c9931e2d2183 upstream.

 - instead of (PTR_ERR(file) &lt; 0) just use IS_ERR(file)
 - return -EINVAL instead of EINVAL
 - all other error returns in target_scsi3_emulate_pr_out() use
   "goto out" -- get rid of the one remaining straight "return."

Signed-off-by: Roland Dreier &lt;roland@purestorage.com&gt;
Signed-off-by: Nicholas Bellinger &lt;nab@linux-iscsi.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>md/raid1: close some possible races on write errors during resync</title>
<updated>2012-07-29T15:04:17Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-07-19T05:59:18Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d8ae4bb4a1c12f9cfb373f215e624a9f1fca0767'/>
<id>urn:sha1:d8ae4bb4a1c12f9cfb373f215e624a9f1fca0767</id>
<content type='text'>
commit 58e94ae18478c08229626daece2fc108a4a23261 upstream.

commit 4367af556133723d0f443e14ca8170d9447317cb
   md/raid1: clear bad-block record when write succeeds.

Added a 'reschedule_retry' call possibility at the end of
end_sync_write, but didn't add matching code at the end of
sync_request_write.  So if the writes complete very quickly, or
scheduling makes it seem that way, then we can miss rescheduling
the request and the resync could hang.

Also commit 73d5c38a9536142e062c35997b044e89166e063b
    md: avoid races when stopping resync.

Fix a race condition in this same code in end_sync_write but didn't
make the change in sync_request_write.

This patch updates sync_request_write to fix both of those.
Patch is suitable for 3.1 and later kernels.

Reported-by: Alexander Lyakas &lt;alex.bolshoy@gmail.com&gt;
Original-version-by: Alexander Lyakas &lt;alex.bolshoy@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
</feed>
