<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v2.6.32.2</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/md?h=v2.6.32.2</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/md?h=v2.6.32.2'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2009-12-18T22:05:04Z</updated>
<entry>
<title>dm crypt: make wipe message also wipe essiv key</title>
<updated>2009-12-18T22:05:04Z</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2009-12-10T23:51:57Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=80b337ebf9ff4e06cd4185b31d8972193a985262'/>
<id>urn:sha1:80b337ebf9ff4e06cd4185b31d8972193a985262</id>
<content type='text'>
commit 542da317668c35036e8471822a564b609d05af66 upstream.

The "wipe key" message is used to wipe the volume key from memory
temporarily, for example when suspending to RAM.

But the initialisation vector in ESSIV mode is calculated from the
hashed volume key, so the wipe message should wipe this IV key too and
reinitialise it when the volume key is reinstated.

This patch adds an IV wipe method called from a wipe message callback.
ESSIV is then reinitialised using the init function added by the
last patch.

Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>dm crypt: separate essiv allocation from initialisation</title>
<updated>2009-12-18T22:05:03Z</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2009-12-10T23:51:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7d41627824496f9c69ab2da972a72521ebeebf7a'/>
<id>urn:sha1:7d41627824496f9c69ab2da972a72521ebeebf7a</id>
<content type='text'>
commit b95bf2d3d5a48b095bffe2a0cd8c40453cf59557 upstream.

This patch separates the construction of IV from its initialisation.
(For ESSIV it is a hash calculation based on volume key.)

Constructor code now preallocates hash tfm and salt array
and saves it in a private IV structure.

The next patch requires this to reinitialise the wiped IV
without reallocating memory when resuming a suspended device.

Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>dm snapshot: cope with chunk size larger than origin</title>
<updated>2009-12-18T22:05:02Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2009-12-10T23:51:54Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8419ee8215942d6bf3814391730421a4897fc410'/>
<id>urn:sha1:8419ee8215942d6bf3814391730421a4897fc410</id>
<content type='text'>
commit 8e87b9b81b3c370f7e53c1ab6e1c3519ef37a644 upstream.

Under some special conditions the snapshot hash_size is calculated as zero.
This patch instead sets a minimum value of 64, the same as for the
pending exception table.

rounddown_pow_of_two(0) is an undefined operation (it expands to shift
by -1).  init_exception_table with an argument of 0 would fail with -ENOMEM.

The way to trigger the problem is to create a snapshot with a chunk size
that is larger than the origin device.

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@suse.de&gt;

</content>
</entry>
<entry>
<title>dm: avoid _hash_lock deadlock</title>
<updated>2009-12-18T22:05:02Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2009-12-10T23:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=0bca4a5b78ad922624e9a76a7e86453f1fec7239'/>
<id>urn:sha1:0bca4a5b78ad922624e9a76a7e86453f1fec7239</id>
<content type='text'>
commit 6076905b5ef39e0ea58db32583c9e0036c05e47b upstream.

Fix a reported deadlock if there are still unprocessed multipath events
on a device that is being removed.

_hash_lock is held during dev_remove while trying to send the
outstanding events.  Sending the events requests the _hash_lock
again in dm_copy_name_and_uuid.

This patch introduces a separate lock around regions that modify the
link to the hash table (dm_set_mdptr) or the name or uuid so that
dm_copy_name_and_uuid no longer needs _hash_lock.

Additionally, dm_copy_name_and_uuid can only be called if md exists
so we can drop the dm_get() and dm_put() which can lead to a BUG()
while md is being freed.

The deadlock:
 #0 [ffff8106298dfb48] schedule at ffffffff80063035
 #1 [ffff8106298dfc20] __down_read at ffffffff8006475d
 #2 [ffff8106298dfc60] dm_copy_name_and_uuid at ffffffff8824f740
 #3 [ffff8106298dfc90] dm_send_uevents at ffffffff88252685
 #4 [ffff8106298dfcd0] event_callback at ffffffff8824c678
 #5 [ffff8106298dfd00] dm_table_event at ffffffff8824dd01
 #6 [ffff8106298dfd10] __hash_remove at ffffffff882507ad
 #7 [ffff8106298dfd30] dev_remove at ffffffff88250865
 #8 [ffff8106298dfd60] ctl_ioctl at ffffffff88250d80
 #9 [ffff8106298dfee0] do_ioctl at ffffffff800418c4
#10 [ffff8106298dff00] vfs_ioctl at ffffffff8002fab9
#11 [ffff8106298dff40] sys_ioctl at ffffffff8004bdaf
#12 [ffff8106298dff80] tracesys at ffffffff8005d28d (via system_call)

Reported-by: guy keren &lt;choo@actcom.co.il&gt;
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@suse.de&gt;

</content>
</entry>
<entry>
<title>dm crypt: restructure essiv error path</title>
<updated>2009-12-18T22:05:01Z</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2009-12-10T23:51:56Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c22d66f16eaeec0d3c4df607f425f4ebf2b8d238'/>
<id>urn:sha1:c22d66f16eaeec0d3c4df607f425f4ebf2b8d238</id>
<content type='text'>
commit 5861f1be00b3b70f8ab5e5a81392a6cf69666cd2 upstream.

Use kzfree for salt deallocation because it is derived from the volume
key.  Use a common error path in ESSIV constructor.

Required by a later patch which fixes the way key material is wiped
from memory.

Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>dm crypt: move private iv fields to structs</title>
<updated>2009-12-18T22:05:00Z</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2009-12-10T23:51:55Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c7f27e82997f9c835b4c241d1f302501d0cdcc9e'/>
<id>urn:sha1:c7f27e82997f9c835b4c241d1f302501d0cdcc9e</id>
<content type='text'>
commit 6047359277517c4e56d8bfd6ea4966d7a3924151 upstream.

Define private structures for IV so it's easy to add further attributes
in a following patch which fixes the way key material is wiped from
memory.  Also move ESSIV destructor and remove unnecessary 'status'
operation.

There are no functional changes in this patch.

Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>dm snapshot: only take lock for statustype info not table</title>
<updated>2009-12-18T22:04:59Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2009-12-10T23:51:53Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5f5d50a0f5530e5a6df52755c74ec5a47829f8cc'/>
<id>urn:sha1:5f5d50a0f5530e5a6df52755c74ec5a47829f8cc</id>
<content type='text'>
commit 94e76572b5dd37b1f0f4b3742ee8a565daead932 upstream.

Take snapshot lock only for STATUSTYPE_INFO, not STATUSTYPE_TABLE.

Commit 4c6fff445d7aa753957856278d4d93bcad6e2c14
(dm-snapshot-lock-snapshot-while-supplying-status.patch)
introduced this use of the lock, but userspace applications using
libdevmapper have been found to request STATUSTYPE_TABLE while the device
is suspended and the lock is already held, leading to deadlock.  Since
the lock is not necessary in this case, don't try to take it.

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@suse.de&gt;

</content>
</entry>
<entry>
<title>dm exception store: free tmp_store on persistent flag error</title>
<updated>2009-12-18T22:04:59Z</updated>
<author>
<name>Julia Lawall</name>
<email>julia@diku.dk</email>
</author>
<published>2009-12-10T23:51:52Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=5db89cf4ea748e1c2d29d52175b2bace466078c7'/>
<id>urn:sha1:5db89cf4ea748e1c2d29d52175b2bace466078c7</id>
<content type='text'>
commit 613978f8711c7fd4d0aa856872375d2abd7c92ff upstream.

Error handling code following a kmalloc should free the allocated data.

Signed-off-by: Julia Lawall &lt;julia@diku.dk&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>md/bitmap: protect against bitmap removal while being updated.</title>
<updated>2009-12-18T22:04:11Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2009-12-14T01:49:46Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f1416ea0278b4bb6629d160e81e61ef8b6bffb4a'/>
<id>urn:sha1:f1416ea0278b4bb6629d160e81e61ef8b6bffb4a</id>
<content type='text'>
commit aa5cbd103887011b4830355f88fb055f9ad2d556 upstream.

A write intent bitmap can be removed from an array while the
array is active.
When this happens, all IO is suspended and flushed before the
bitmap is removed.
However it is possible that bitmap_daemon_work is still running to
clear old bits from the bitmap.  If it is, it can dereference the
bitmap after it has been freed.

So introduce a new mutex to protect bitmap_daemon_work and get it
before destroying a bitmap.

This is suitable for any current -stable kernel.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@suse.de&gt;

</content>
</entry>
<entry>
<title>md: revert incorrect fix for read error handling in raid1.</title>
<updated>2009-12-01T06:30:59Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2009-12-01T06:30:59Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=d0e260782c3702a009645c3caa02e381dab8798b'/>
<id>urn:sha1:d0e260782c3702a009645c3caa02e381dab8798b</id>
<content type='text'>
commit 4706b349f was a forward port of a fix that was needed
for SLES10.  But in fact it is not needed in mainline because
the earlier commit dd00a99e7a fixes the same problem in a
better way.
Further, this commit introduces a bug in the way it interacts with
the automatic read-error-correction.  If, after a read error is
successfully corrected, the same disk is chosen to re-read - the
re-read won't be attempted but an error will be returned instead.

After reverting that commit, there is the possibility that a
read error on a read-only array (where read errors cannot
be corrected as that requires a write) will repeatedly read the same
device and continue to get an error.
So in the "Array is readonly" case, fail the drive immediately on
a read error.

Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Cc: stable@kernel.org
</content>
</entry>
</feed>
