<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v3.1</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=v3.1</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v3.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2011-10-23T19:55:17Z</updated>
<entry>
<title>dm kcopyd: fix job_pool leak</title>
<updated>2011-10-23T19:55:17Z</updated>
<author>
<name>Alasdair G Kergon</name>
<email>agk@redhat.com</email>
</author>
<published>2011-10-23T19:55:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=d136f2efdf3a4faba47f58603f8ace2207234d75'/>
<id>urn:sha1:d136f2efdf3a4faba47f58603f8ace2207234d75</id>
<content type='text'>
Fix memory leak introduced by commit a6e50b409d3f9e0833e69c3c9cca822e8fa4adbb
(dm snapshot: skip reading origin when overwriting complete chunk).

When allocating a set of jobs from kc-&gt;job_pool, job-&gt;master_job must be
set (to point to itself) so that the mempool item gets freed when the
master_job completes.

master_job was introduced by commit c6ea41fbbe08f270a8edef99dc369faf809d1bd6
(dm kcopyd: preallocate sub jobs to avoid deadlock)

Reported-by: Michael Leun &lt;ml@newton.leun.net&gt;
Cc: Mikulas Patocka &lt;mpatocka@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'for-linus' of http://people.redhat.com/agk/git/linux-dm</title>
<updated>2011-10-06T15:31:47Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2011-10-06T15:31:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6367f1775ebb66b0f0e9e3512159f3257a6fde0e'/>
<id>urn:sha1:6367f1775ebb66b0f0e9e3512159f3257a6fde0e</id>
<content type='text'>
* 'for-linus' of http://people.redhat.com/agk/git/linux-dm:
  dm crypt: always disable discard_zeroes_data
  dm: raid fix write_mostly arg validation
  dm table: avoid crash if integrity profile changes
  dm: flakey fix corrupt_bio_byte error path
</content>
</entry>
<entry>
<title>dm crypt: always disable discard_zeroes_data</title>
<updated>2011-09-25T22:26:21Z</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2011-09-25T22:26:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=983c7db347db8ce2d8453fd1d89b7a4bb6920d56'/>
<id>urn:sha1:983c7db347db8ce2d8453fd1d89b7a4bb6920d56</id>
<content type='text'>
If optional discard support in dm-crypt is enabled, discards requests
bypass the crypt queue and blocks of the underlying device are discarded.
For the read path, discarded blocks are handled the same as normal
ciphertext blocks, thus decrypted.

So if the underlying device announces discarded regions return zeroes,
dm-crypt must disable this flag because after decryption there is just
random noise instead of zeroes.

Signed-off-by: Milan Broz &lt;mbroz@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm: raid fix write_mostly arg validation</title>
<updated>2011-09-25T22:26:19Z</updated>
<author>
<name>Jonthan Brassow</name>
<email>jbrassow@redhat.com</email>
</author>
<published>2011-09-25T22:26:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8232480944d173378082ebb2cac8a3207c08cf31'/>
<id>urn:sha1:8232480944d173378082ebb2cac8a3207c08cf31</id>
<content type='text'>
Fix off-by-one error in validation of write_mostly.

The user-supplied value given for the 'write_mostly' argument must be an
index starting at 0.  The validation of the supplied argument failed to
check for 'N' ('&gt;' vs '&gt;='), which would have caused an access beyond the
end of the array.

Reported-by: Doug Ledford &lt;dledford@redhat.com&gt;
Signed-off-by: Jonathan Brassow &lt;jbrassow@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm table: avoid crash if integrity profile changes</title>
<updated>2011-09-25T22:26:17Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2011-09-25T22:26:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=876fbba1db4a377f050a2bb49b474c7527b2995d'/>
<id>urn:sha1:876fbba1db4a377f050a2bb49b474c7527b2995d</id>
<content type='text'>
Commit a63a5cf (dm: improve block integrity support) introduced a
two-phase initialization of a DM device's integrity profile.  This
patch avoids dereferencing a NULL 'template_disk' pointer in
blk_integrity_register() if there is an integrity profile mismatch in
dm_table_set_integrity().

This can occur if the integrity profiles for stacked devices in a DM
table are changed between the call to dm_table_prealloc_integrity() and
dm_table_set_integrity().

Reported-by: Zdenek Kabelac &lt;zkabelac@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Cc: stable@kernel.org # 2.6.39
</content>
</entry>
<entry>
<title>dm: flakey fix corrupt_bio_byte error path</title>
<updated>2011-09-25T22:26:15Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2011-09-25T22:26:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=68e58a294fb26f692697179e3f3ecf88dd8cb97c'/>
<id>urn:sha1:68e58a294fb26f692697179e3f3ecf88dd8cb97c</id>
<content type='text'>
If no arguments were provided to the corrupt_bio_byte feature an error
should be returned immediately.

Reported-by: Zdenek Kabelac &lt;zkabelac@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
</content>
</entry>
<entry>
<title>md: Avoid waking up a thread after it has been freed.</title>
<updated>2011-09-21T05:30:20Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-09-21T05:30:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=01f96c0a9922cd9919baf9d16febdf7016177a12'/>
<id>urn:sha1:01f96c0a9922cd9919baf9d16febdf7016177a12</id>
<content type='text'>
Two related problems:

1/ some error paths call "md_unregister_thread(mddev-&gt;thread)"
   without subsequently clearing -&gt;thread.  A subsequent call
   to mddev_unlock will try to wake the thread, and crash.

2/ Most calls to md_wakeup_thread are protected against the thread
   disappeared either by:
      - holding the -&gt;mutex
      - having an active request, so something else must be keeping
        the array active.
   However mddev_unlock calls md_wakeup_thread after dropping the
   mutex and without any certainty of an active request, so the
   -&gt;thread could theoretically disappear.
   So we need a spinlock to provide some protections.

So change md_unregister_thread to take a pointer to the thread
pointer, and ensure that it always does the required locking, and
clears the pointer properly.

Reported-by: "Moshe Melnikov" &lt;moshe@zadarastorage.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
cc: stable@kernel.org
</content>
</entry>
<entry>
<title>md: Fix handling for devices from 2TB to 4TB in 0.90 metadata.</title>
<updated>2011-09-10T07:21:28Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-09-10T07:21:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=27a7b260f71439c40546b43588448faac01adb93'/>
<id>urn:sha1:27a7b260f71439c40546b43588448faac01adb93</id>
<content type='text'>
0.90 metadata uses an unsigned 32bit number to count the number of
kilobytes used from each device.
This should allow up to 4TB per device.
However we multiply this by 2 (to get sectors) before casting to a
larger type, so sizes above 2TB get truncated.

Also we allow rdev-&gt;sectors to be larger than 4TB, so it is possible
for the array to be resized larger than the metadata can handle.
So make sure rdev-&gt;sectors never exceeds 4TB when 0.90 metadata is in
used.

Also the sanity check at the end of super_90_load should include level
1 as it used -&gt;size too. (RAID0 and Linear don't use -&gt;size at all).

Reported-by: Pim Zandbergen &lt;P.Zandbergen@macroscoop.nl&gt;
Cc: stable@kernel.org
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid1,10: Remove use-after-free bug in make_request.</title>
<updated>2011-09-10T07:21:23Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-09-10T07:21:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=079fa166a2874985ae58b2e21e26e1cbc91127d4'/>
<id>urn:sha1:079fa166a2874985ae58b2e21e26e1cbc91127d4</id>
<content type='text'>
A single request to RAID1 or RAID10 might result in multiple
requests if there are known bad blocks that need to be avoided.

To detect if we need to submit another write request we test:
 	if (sectors_handled &lt; (bio-&gt;bi_size &gt;&gt; 9)) {

However this is after we call **_write_done() so the 'bio' no longer
belongs to us - the writes could have completed and the bio freed.

So move the **_write_done call until after the test against
bio-&gt;bi_size.

This addresses https://bugzilla.kernel.org/show_bug.cgi?id=41862

Reported-by: Bruno Wolff III &lt;bruno@wolff.to&gt;
Tested-by: Bruno Wolff III &lt;bruno@wolff.to&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
</content>
</entry>
<entry>
<title>md/raid10: unify handling of write completion.</title>
<updated>2011-09-10T07:21:17Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2011-09-10T07:21:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=19d5f834d6aff7efb1c9353523865c5bce869470'/>
<id>urn:sha1:19d5f834d6aff7efb1c9353523865c5bce869470</id>
<content type='text'>
A write can complete at two different places:
1/ when the last member-device write completes, through
   raid10_end_write_request
2/ in make_request() when we remove the initial bias from -&gt;remaining.

These two should do exactly the same thing and the comment says they
do, but they don't.

So factor the correct code out into a function and call it in both
places.  This makes the code much more similar to RAID1.

The difference is only significant if there is an error, and they
usually take a while, so it is unlikely that there will be an error
already when make_request is completing, so this is unlikely to cause
real problems.

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