<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v4.2</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=v4.2</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-08-12T15:27:29Z</updated>
<entry>
<title>dm cache policy smq: move 'dm-cache-default' module alias to SMQ</title>
<updated>2015-08-12T15:27:29Z</updated>
<author>
<name>Yi Zhang</name>
<email>yizhan@redhat.com</email>
</author>
<published>2015-08-12T11:22:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=34dd051741572859bc1fef525c5ddbc127158b52'/>
<id>urn:sha1:34dd051741572859bc1fef525c5ddbc127158b52</id>
<content type='text'>
When creating dm-cache with the default policy, it will call
request_module("dm-cache-default") to register the default policy.
But the "dm-cache-default" alias was left referring to the MQ policy.
Fix this by moving the module alias to SMQ.

Fixes: bccab6a0 (dm cache: switch the "default" cache replacement policy from mq to smq)
Signed-off-by: Yi Zhang &lt;yizhan@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm btree: add ref counting ops for the leaves of top level btrees</title>
<updated>2015-08-12T14:50:37Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-08-12T14:12:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0dc3c8bc157c60b1d470163882be8c13e1950af'/>
<id>urn:sha1:b0dc3c8bc157c60b1d470163882be8c13e1950af</id>
<content type='text'>
When using nested btrees, the top leaves of the top levels contain
block addresses for the root of the next tree down.  If we shadow a
shared leaf node the leaf values (sub tree roots) should be incremented
accordingly.

This is only an issue if there is metadata sharing in the top levels.
Which only occurs if metadata snapshots are being used (as is possible
with dm-thinp).  And could result in a block from the thinp metadata
snap being reused early, thus corrupting the thinp metadata snap.

Signed-off-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>dm thin metadata: delete btrees when releasing metadata snapshot</title>
<updated>2015-08-12T14:42:51Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-08-12T14:10:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=7f518ad0a212e2a6fd68630e176af1de395070a7'/>
<id>urn:sha1:7f518ad0a212e2a6fd68630e176af1de395070a7</id>
<content type='text'>
The device details and mapping trees were just being decremented
before.  Now btree_del() is called to do a deep delete.

Signed-off-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@vger.kernel.org
</content>
</entry>
<entry>
<title>Merge tag 'dm-4.2-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm</title>
<updated>2015-08-08T01:35:14Z</updated>
<author>
<name>Linus Torvalds</name>
<email>torvalds@linux-foundation.org</email>
</author>
<published>2015-08-08T01:35:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=39171c86f1c47320de51796d58eb7a5533135a4a'/>
<id>urn:sha1:39171c86f1c47320de51796d58eb7a5533135a4a</id>
<content type='text'>
Pull device mapper fixes from Mike Snitzer:

 - stable fix for a dm_merge_bvec() regression on 32 bit Fedora systems.

 - fix for a 4.2 DM thinp discard regression due to inability to
   properly delete a range of blocks in a data mapping btree.

* tag 'dm-4.2-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
  dm btree remove: fix bug in remove_one()
  dm: fix dm_merge_bvec regression on 32 bit systems
</content>
</entry>
<entry>
<title>dm btree remove: fix bug in remove_one()</title>
<updated>2015-08-07T15:56:43Z</updated>
<author>
<name>Joe Thornber</name>
<email>ejt@redhat.com</email>
</author>
<published>2015-08-07T15:33:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=aa0cd28d057fd4cb686fbdd2475a6a3f609dd581'/>
<id>urn:sha1:aa0cd28d057fd4cb686fbdd2475a6a3f609dd581</id>
<content type='text'>
remove_one() was not incrementing the key for the beginning of the
range, so not all entries were being removed.  This resulted in
discards that were not unmapping all blocks.

Fixes: 4ec331c3ea ("dm btree: add dm_btree_remove_leaves()")
Signed-off-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
<entry>
<title>dm: fix dm_merge_bvec regression on 32 bit systems</title>
<updated>2015-08-04T02:49:59Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2015-08-03T13:54:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd4aaf8f9b85d6b2df3231fd62b219ebb75d3568'/>
<id>urn:sha1:bd4aaf8f9b85d6b2df3231fd62b219ebb75d3568</id>
<content type='text'>
A DM regression on 32 bit systems was reported against v4.2-rc3 here:
https://lkml.org/lkml/2015/7/29/401

Fix this by reverting both commit 1c220c69 ("dm: fix casting bug in
dm_merge_bvec()") and 148e51ba ("dm: improve documentation and code
clarity in dm_merge_bvec").  This combined revert is done to eliminate
the possibility of a partial revert in stable@ kernels.

In hindsight the correct fix, at the time 1c220c69 was applied to fix
the regression that 148e51ba introduced, should've been to simply revert
148e51ba.

Reported-by: Josh Boyer &lt;jwboyer@fedoraproject.org&gt;
Tested-by: Adam Williamson &lt;awilliam@redhat.com&gt;
Acked-by: Joe Thornber &lt;ejt@redhat.com&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Cc: stable@vger.kernel.org # 3.19+
</content>
</entry>
<entry>
<title>md/raid5: don't let shrink_slab shrink too far.</title>
<updated>2015-08-03T07:10:56Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2015-08-03T07:09:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=49895bcc7e566ba455eb2996607d6fbd3447ce16'/>
<id>urn:sha1:49895bcc7e566ba455eb2996607d6fbd3447ce16</id>
<content type='text'>
I have a report of drop_one_stripe() called from
raid5_cache_scan() apparently finding -&gt;max_nr_stripes == 0.

This should not be allowed.

So add a test to keep max_nr_stripes above min_nr_stripes.

Also use a 'mask' rather than a 'mod' in drop_one_stripe
to ensure 'hash' is valid even if max_nr_stripes does reach zero.


Fixes: edbe83ab4c27 ("md/raid5: allow the stripe_cache to grow and shrink.")
Cc: stable@vger.kernel.org (4.1 - please release with 2d5b569b665)
Reported-by: Tomas Papan &lt;tomas.papan@gmail.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</content>
</entry>
<entry>
<title>md: use kzalloc() when bitmap is disabled</title>
<updated>2015-08-03T04:56:02Z</updated>
<author>
<name>Benjamin Randazzo</name>
<email>benjamin@randazzo.fr</email>
</author>
<published>2015-07-25T14:36:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b6878d9e03043695dbf3fa1caa6dfc09db225b16'/>
<id>urn:sha1:b6878d9e03043695dbf3fa1caa6dfc09db225b16</id>
<content type='text'>
In drivers/md/md.c get_bitmap_file() uses kmalloc() for creating a
mdu_bitmap_file_t called "file".

5769         file = kmalloc(sizeof(*file), GFP_NOIO);
5770         if (!file)
5771                 return -ENOMEM;

This structure is copied to user space at the end of the function.

5786         if (err == 0 &amp;&amp;
5787             copy_to_user(arg, file, sizeof(*file)))
5788                 err = -EFAULT

But if bitmap is disabled only the first byte of "file" is initialized
with zero, so it's possible to read some bytes (up to 4095) of kernel
space memory from user space. This is an information leak.

5775         /* bitmap disabled, zero the first byte and copy out */
5776         if (!mddev-&gt;bitmap_info.file)
5777                 file-&gt;pathname[0] = '\0';

Signed-off-by: Benjamin Randazzo &lt;benjamin@randazzo.fr&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</content>
</entry>
<entry>
<title>md/raid1: extend spinlock to protect raid1_end_read_request against inconsistencies</title>
<updated>2015-08-03T02:29:42Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.com</email>
</author>
<published>2015-07-27T01:48:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=423f04d63cf421ea436bcc5be02543d549ce4b28'/>
<id>urn:sha1:423f04d63cf421ea436bcc5be02543d549ce4b28</id>
<content type='text'>
raid1_end_read_request() assumes that the In_sync bits are consistent
with the -&gt;degaded count.
raid1_spare_active updates the In_sync bit before the -&gt;degraded count
and so exposes an inconsistency, as does error()
So extend the spinlock in raid1_spare_active() and error() to hide those
inconsistencies.

This should probably be part of
  Commit: 34cab6f42003 ("md/raid1: fix test for 'was read error from
  last working device'.")
as it addresses the same issue.  It fixes the same bug and should go
to -stable for same reasons.

Fixes: 76073054c95b ("md/raid1: clean up read_balance.")
Cc: stable@vger.kernel.org (v3.0+)
Signed-off-by: NeilBrown &lt;neilb@suse.com&gt;
</content>
</entry>
<entry>
<title>dm cache: fix device destroy hang due to improper prealloc_used accounting</title>
<updated>2015-07-29T18:32:09Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2015-07-29T17:48:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=795e633a2dc6cbbeac68bc7f6006082150d38bb7'/>
<id>urn:sha1:795e633a2dc6cbbeac68bc7f6006082150d38bb7</id>
<content type='text'>
Commit 665022d72f9 ("dm cache: avoid calls to prealloc_free_structs() if
possible") introduced a regression that caused the removal of a DM cache
device to hang in cache_postsuspend()'s call to wait_for_migrations()
with the following stack trace:

  [&lt;ffffffff81651457&gt;] schedule+0x37/0x80
  [&lt;ffffffffa041e21b&gt;] cache_postsuspend+0xbb/0x470 [dm_cache]
  [&lt;ffffffff810ba970&gt;] ? prepare_to_wait_event+0xf0/0xf0
  [&lt;ffffffffa0006f77&gt;] dm_table_postsuspend_targets+0x47/0x60 [dm_mod]
  [&lt;ffffffffa0001eb5&gt;] __dm_destroy+0x215/0x250 [dm_mod]
  [&lt;ffffffffa0004113&gt;] dm_destroy+0x13/0x20 [dm_mod]
  [&lt;ffffffffa00098cd&gt;] dev_remove+0x10d/0x170 [dm_mod]
  [&lt;ffffffffa00097c0&gt;] ? dev_suspend+0x240/0x240 [dm_mod]
  [&lt;ffffffffa0009f85&gt;] ctl_ioctl+0x255/0x4d0 [dm_mod]
  [&lt;ffffffff8127ac00&gt;] ? SYSC_semtimedop+0x280/0xe10
  [&lt;ffffffffa000a213&gt;] dm_ctl_ioctl+0x13/0x20 [dm_mod]
  [&lt;ffffffff811fd432&gt;] do_vfs_ioctl+0x2d2/0x4b0
  [&lt;ffffffff81117d5f&gt;] ? __audit_syscall_entry+0xaf/0x100
  [&lt;ffffffff81022636&gt;] ? do_audit_syscall_entry+0x66/0x70
  [&lt;ffffffff811fd689&gt;] SyS_ioctl+0x79/0x90
  [&lt;ffffffff81023e58&gt;] ? syscall_trace_leave+0xb8/0x110
  [&lt;ffffffff81654f6e&gt;] entry_SYSCALL_64_fastpath+0x12/0x71

Fix this by accounting for the call to prealloc_data_structs()
immediately _before_ the call as opposed to after.  This is needed
because it is possible to break out of the control loop after the call
to prealloc_data_structs() but before prealloc_used was set to true.

Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
</content>
</entry>
</feed>
