<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/drivers/md, branch v3.4.22</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.amat.us/linux/atom/drivers/md?h=v3.4.22</id>
<link rel='self' href='https://git.amat.us/linux/atom/drivers/md?h=v3.4.22'/>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/'/>
<updated>2012-12-03T19:47:07Z</updated>
<entry>
<title>dm: fix deadlock with request based dm and queue request_fn recursion</title>
<updated>2012-12-03T19:47:07Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2012-11-06T11:24:26Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f42513b9fd98a0f3afa8fe9bc23700b4226e1f6f'/>
<id>urn:sha1:f42513b9fd98a0f3afa8fe9bc23700b4226e1f6f</id>
<content type='text'>
commit a8c32a5c98943d370ea606a2e7dc04717eb92206 upstream.

Request based dm attempts to re-run the request queue off the
request completion path. If used with a driver that potentially does
end_io from its request_fn, we could deadlock trying to recurse
back into request dispatch. Fix this by punting the request queue
run to kblockd.

Tested to fix a quickly reproducible deadlock in such a scenario.

Acked-by: Alasdair G Kergon &lt;agk@redhat.com&gt;
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>md/raid10: decrement correct pending counter when writing to replacement.</title>
<updated>2012-12-03T19:47:07Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-11-22T04:12:09Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=ecf049ce86e1d93bc9a3376facf31d7244338089'/>
<id>urn:sha1:ecf049ce86e1d93bc9a3376facf31d7244338089</id>
<content type='text'>
commit 884162df2aadd7414bef4935e1a54976fd4e3988 upstream.

When a write to a replacement device completes, we carefully
and correctly found the rdev that the write actually went to
and the blithely called rdev_dec_pending on the primary rdev,
even if this write was to the replacement.

This means that any writes to an array while a replacement
was ongoing would cause the nr_pending count for the primary
device to go negative, so it could never be removed.

This bug has been present since replacement was introduced in
3.3, so it is suitable for any -stable kernel since then.

Reported-by: "George Spelvin" &lt;linux@horizon.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>md: Avoid write invalid address if read_seqretry returned true.</title>
<updated>2012-12-03T19:47:06Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2012-11-08T00:56:27Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=8c98fbaa55508732bb5a9f46b3c6cf60daa8e526'/>
<id>urn:sha1:8c98fbaa55508732bb5a9f46b3c6cf60daa8e526</id>
<content type='text'>
commit 35f9ac2dcec8f79d7059ce174fd7b7ee3290d620 upstream.

If read_seqretry returned true and bbp was changed, it will write
invalid address which can cause some serious problem.

This bug was introduced by commit v3.0-rc7-130-g2699b67.
So fix is suitable for 3.0.y thru 3.6.y.

Reported-by: zhuwenfeng@kedacom.com
Tested-by: zhuwenfeng@kedacom.com
Signed-off-by: Jianpeng Ma &lt;majianpeng@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>
<entry>
<title>md: Reassigned the parameters if read_seqretry returned true in func md_is_badblock.</title>
<updated>2012-12-03T19:47:06Z</updated>
<author>
<name>majianpeng</name>
<email>majianpeng@gmail.com</email>
</author>
<published>2012-11-06T09:13:44Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=45bc5c6913e04f1346bfe3401d2f52ad2164b3b2'/>
<id>urn:sha1:45bc5c6913e04f1346bfe3401d2f52ad2164b3b2</id>
<content type='text'>
commit ab05613a0646dcc11049692d54bae76ca9ffa910 upstream.

This bug was introduced by commit(v3.0-rc7-126-g2230dfe).
So fix is suitable for 3.0.y thru 3.6.y.

Signed-off-by: Jianpeng Ma &lt;majianpeng@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>
<entry>
<title>md/raid1: Fix assembling of arrays containing Replacements.</title>
<updated>2012-11-05T08:50:41Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-10-31T00:42:03Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=32f25ea28ad28fbb4080d0b7a279279c7e21b1d0'/>
<id>urn:sha1:32f25ea28ad28fbb4080d0b7a279279c7e21b1d0</id>
<content type='text'>
commit 02b898f2f04e418094f0093a3ad0b415bcdbe8eb upstream.

setup_conf in raid1.c uses conf-&gt;raid_disks before assigning
a value.  It is used when including 'Replacement' devices.

The consequence is that assembling an array which contains a
replacement will misbehave and either not include the replacement, or
not include the device being replaced.

Though this doesn't lead directly to data corruption, it could lead to
reduced data safety.

So use mddev-&gt;raid_disks, which is initialised, instead.

Bug was introduced by commit c19d57980b38a5bb613a898937a1cf85f422fb9b
      md/raid1: recognise replacements when assembling arrays.

in 3.3, so fix is suitable for 3.3.y thru 3.6.y.

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

</content>
</entry>
<entry>
<title>md/raid10: use correct limit variable</title>
<updated>2012-10-21T16:27:59Z</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@oracle.com</email>
</author>
<published>2012-10-11T03:20:58Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=9b38cc4a70f2c83857fd37707570a18c1027effe'/>
<id>urn:sha1:9b38cc4a70f2c83857fd37707570a18c1027effe</id>
<content type='text'>
commit 91502f099dfc5a1e8812898e26ee280713e1d002 upstream.

Clang complains that we are assigning a variable to itself.  This should
be using bad_sectors like the similar earlier check does.

Bug has been present since 3.1-rc1.  It is minor but could
conceivably cause corruption or other bad behaviour.

Signed-off-by: Dan Carpenter &lt;dan.carpenter@oracle.com&gt;
Signed-off-by: NeilBrown &lt;neilb@suse.de&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm verity: fix overflow check</title>
<updated>2012-10-07T15:32:22Z</updated>
<author>
<name>Mikulas Patocka</name>
<email>mpatocka@redhat.com</email>
</author>
<published>2012-09-26T22:45:48Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=c0b50b292c41e0a1c6a1ef6df665fe7fb8eac2e1'/>
<id>urn:sha1:c0b50b292c41e0a1c6a1ef6df665fe7fb8eac2e1</id>
<content type='text'>
commit 1d55f6bcc0331d744cd5b56c4ee79e3809438161 upstream.

This patch fixes sector_t overflow checking in dm-verity.

Without this patch, the code checks for overflow only if sector_t is
smaller than long long, not if sector_t and long long have the same size.

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 table: clear add_random unless all devices have it set</title>
<updated>2012-10-07T15:32:22Z</updated>
<author>
<name>Milan Broz</name>
<email>mbroz@redhat.com</email>
</author>
<published>2012-09-26T22:45:43Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=7d77f4776e3fc8770f90244f1f5d1c9181b834c7'/>
<id>urn:sha1:7d77f4776e3fc8770f90244f1f5d1c9181b834c7</id>
<content type='text'>
commit c3c4555edd10dbc0b388a0125b9c50de5e79af05 upstream.

Always clear QUEUE_FLAG_ADD_RANDOM if any underlying device does not
have it set. Otherwise devices with predictable characteristics may
contribute entropy.

QUEUE_FLAG_ADD_RANDOM specifies whether or not queue IO timings
contribute to the random pool.

For bio-based targets this flag is always 0 because such devices have no
real queue.

For request-based devices this flag was always set to 1 by default.

Now set it according to the flags on underlying devices. If there is at
least one device which should not contribute, set the flag to zero: If a
device, such as fast SSD storage, is not suitable for supplying entropy,
a request-based queue stacked over it will not be either.

Because the checking logic is exactly same as for the rotational flag,
share the iteration function with device_is_nonrot().

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@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>dm: handle requests beyond end of device instead of using BUG_ON</title>
<updated>2012-10-07T15:32:22Z</updated>
<author>
<name>Mike Snitzer</name>
<email>snitzer@redhat.com</email>
</author>
<published>2012-09-26T22:45:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=f9954ca80cc595852db6e913e65808819b9dc413'/>
<id>urn:sha1:f9954ca80cc595852db6e913e65808819b9dc413</id>
<content type='text'>
commit ba1cbad93dd47223b1f3b8edd50dd9ef2abcb2ed upstream.

The access beyond the end of device BUG_ON that was introduced to
dm_request_fn via commit 29e4013de7ad950280e4b2208 ("dm: implement
REQ_FLUSH/FUA support for request-based dm") was an overly
drastic (but simple) response to this situation.

I have received a report that this BUG_ON was hit and now think
it would be better to use dm_kill_unmapped_request() to fail the clone
and original request with -EIO.

map_request() will assign the valid target returned by
dm_table_find_target to tio-&gt;ti.  But when the target
isn't valid tio-&gt;ti is never assigned (because map_request isn't
called); so add a check for tio-&gt;ti != NULL to dm_done().

Reported-by: Mike Christie &lt;michaelc@cs.wisc.edu&gt;
Signed-off-by: Mike Snitzer &lt;snitzer@redhat.com&gt;
Signed-off-by: Jun'ichi Nomura &lt;j-nomura@ce.jp.nec.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>md/raid10: fix problem with on-stack allocation of r10bio structure.</title>
<updated>2012-10-02T17:30:33Z</updated>
<author>
<name>NeilBrown</name>
<email>neilb@suse.de</email>
</author>
<published>2012-08-17T23:51:42Z</published>
<link rel='alternate' type='text/html' href='https://git.amat.us/linux/commit/?id=956b165f9e89e37aff44d615321d1e3166589701'/>
<id>urn:sha1:956b165f9e89e37aff44d615321d1e3166589701</id>
<content type='text'>
commit e0ee778528bbaad28a5c69d2e219269a3a096607 upstream.

A 'struct r10bio' has an array of per-copy information at the end.
This array is declared with size [0] and r10bio_pool_alloc allocates
enough extra space to store the per-copy information depending on the
number of copies needed.

So declaring a 'struct r10bio on the stack isn't going to work.  It
won't allocate enough space, and memory corruption will ensue.

So in the two places where this is done, declare a sufficiently large
structure and use that instead.

The two call-sites of this bug were introduced in 3.4 and 3.5
so this is suitable for both those kernels.  The patch will have to
be modified for 3.4 as it only has one bug.

Reported-by: Ivan Vasilyev &lt;ivan.vasilyev@gmail.com&gt;
Tested-by: Ivan Vasilyev &lt;ivan.vasilyev@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>
