<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/lib/fault-inject.c, branch v4.5</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.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-10-23T08:55:10Z</updated>
<entry>
<title>fault-inject: fix inverted interval/probability values in printk</title>
<updated>2015-10-23T08:55:10Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2015-10-22T20:32:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bb387002693ed28b2bb0408c5dec65521b71e5f1'/>
<id>urn:sha1:bb387002693ed28b2bb0408c5dec65521b71e5f1</id>
<content type='text'>
interval displays the probability and vice versa.

Fixes: 6adc4a22f20bb ("fault-inject: add ratelimit option")
Acked-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Cc: &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fault-inject: add ratelimit option</title>
<updated>2014-12-13T20:42:52Z</updated>
<author>
<name>Dmitry Monakhov</name>
<email>dmonakhov@openvz.org</email>
</author>
<published>2014-12-13T00:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6adc4a22f20bbf3bbc754f1ec8c82be5dfb5c71a'/>
<id>urn:sha1:6adc4a22f20bbf3bbc754f1ec8c82be5dfb5c71a</id>
<content type='text'>
Current debug levels are not optimal.  Especially if one want to provoke
big numbers of faults(broken device simulator) then any verbose level will
produce giant numbers of identical logging messages.  Let's add ratelimit
parameter for that purpose.

Signed-off-by: Dmitry Monakhov &lt;dmonakhov@openvz.org&gt;
Acked-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>debugfs: add get/set for atomic types</title>
<updated>2013-06-03T20:55:01Z</updated>
<author>
<name>Seth Jennings</name>
<email>sjenning@linux.vnet.ibm.com</email>
</author>
<published>2013-06-03T20:33:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=3a76e5e09fbb51e756b4e732e3e65446f4984cf5'/>
<id>urn:sha1:3a76e5e09fbb51e756b4e732e3e65446f4984cf5</id>
<content type='text'>
debugfs currently lack the ability to create attributes
that set/get atomic_t values.

This patch adds support for this through a new
debugfs_create_atomic_t() function.

Signed-off-by: Seth Jennings &lt;sjenning@linux.vnet.ibm.com&gt;
Acked-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Acked-by: Mel Gorman &lt;mgorman@suse.de&gt;
Acked-by: Rik van Riel &lt;riel@redhat.com&gt;
Acked-by: Konrad Rzeszutek Wilk &lt;konrad.wilk@oracle.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>lib/: rename random32() to prandom_u32()</title>
<updated>2013-04-30T01:28:42Z</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2013-04-29T23:21:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f39fee5f11f7adfcf5c9643f87718b80450be18a'/>
<id>urn:sha1:f39fee5f11f7adfcf5c9643f87718b80450be18a</id>
<content type='text'>
Use preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>fault-inject: avoid call to random32() if fault injection is disabled</title>
<updated>2012-06-20T21:39:36Z</updated>
<author>
<name>Anton Blanchard</name>
<email>anton@samba.org</email>
</author>
<published>2012-06-20T19:53:03Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f39cdaebb89dc3e6dd4f3e75b6d4e87ef12190af'/>
<id>urn:sha1:f39cdaebb89dc3e6dd4f3e75b6d4e87ef12190af</id>
<content type='text'>
After enabling CONFIG_FAILSLAB I noticed random32 in profiles even if slub
fault injection wasn't enabled at runtime.

should_fail forces a comparison against random32() even if probability is
0:

        if (attr-&gt;probability &lt;= random32() % 100)
                return false;

Add a check up front for probability == 0 and avoid all of the more
complicated checks.

Signed-off-by: Anton Blanchard &lt;anton@samba.org&gt;
Acked-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
<entry>
<title>lib: reduce the use of module.h wherever possible</title>
<updated>2012-03-07T20:04:04Z</updated>
<author>
<name>Paul Gortmaker</name>
<email>paul.gortmaker@windriver.com</email>
</author>
<published>2011-11-17T02:29:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8bc3bcc93a2b4e47d5d410146f6546bca6171663'/>
<id>urn:sha1:8bc3bcc93a2b4e47d5d410146f6546bca6171663</id>
<content type='text'>
For files only using THIS_MODULE and/or EXPORT_SYMBOL, map
them onto including export.h -- or if the file isn't even
using those, then just delete the include.  Fix up any implicit
include dependencies that were being masked by module.h along
the way.

Signed-off-by: Paul Gortmaker &lt;paul.gortmaker@windriver.com&gt;
</content>
</entry>
<entry>
<title>switch debugfs to umode_t</title>
<updated>2012-01-04T03:54:56Z</updated>
<author>
<name>Al Viro</name>
<email>viro@zeniv.linux.org.uk</email>
</author>
<published>2011-07-24T08:33:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=f4ae40a6a50a98ac23d4b285f739455e926a473e'/>
<id>urn:sha1:f4ae40a6a50a98ac23d4b285f739455e926a473e</id>
<content type='text'>
Signed-off-by: Al Viro &lt;viro@zeniv.linux.org.uk&gt;
</content>
</entry>
<entry>
<title>fault-inject: export setup_fault_attr()</title>
<updated>2011-10-26T20:32:11Z</updated>
<author>
<name>Per Forlin</name>
<email>per.forlin@linaro.org</email>
</author>
<published>2011-09-13T21:03:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=6cba00eaa95c1ace1fb511f534b233ae302ccb2e'/>
<id>urn:sha1:6cba00eaa95c1ace1fb511f534b233ae302ccb2e</id>
<content type='text'>
mmc_core module needs to use setup_fault_attr() in order
to set fault injection attributes during module load time.

Signed-off-by: Per Forlin &lt;per.forlin@linaro.org&gt;
Reviewed-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>fault-inject: export fault injection functions</title>
<updated>2011-10-26T19:43:34Z</updated>
<author>
<name>Per Forlin</name>
<email>per.forlin@linaro.org</email>
</author>
<published>2011-08-19T12:52:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=df87ecbf19109bab04a92df047a9949838206abc'/>
<id>urn:sha1:df87ecbf19109bab04a92df047a9949838206abc</id>
<content type='text'>
Export symbols should_fail() and fault_create_debugfs_attr() in order
to let modules utilize the fault injection framework.

Signed-off-by: Per Forlin &lt;per.forlin@linaro.org&gt;
Acked-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Signed-off-by: Chris Ball &lt;cjb@laptop.org&gt;
</content>
</entry>
<entry>
<title>fault-injection: add ability to export fault_attr in arbitrary directory</title>
<updated>2011-08-04T00:25:20Z</updated>
<author>
<name>Akinobu Mita</name>
<email>akinobu.mita@gmail.com</email>
</author>
<published>2011-08-03T23:21:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=dd48c085c1cdf9446f92826f1fd451167fb6c2fd'/>
<id>urn:sha1:dd48c085c1cdf9446f92826f1fd451167fb6c2fd</id>
<content type='text'>
init_fault_attr_dentries() is used to export fault_attr via debugfs.
But it can only export it in debugfs root directory.

Per Forlin is working on mmc_fail_request which adds support to inject
data errors after a completed host transfer in MMC subsystem.

The fault_attr for mmc_fail_request should be defined per mmc host and
export it in debugfs directory per mmc host like
/sys/kernel/debug/mmc0/mmc_fail_request.

init_fault_attr_dentries() doesn't help for mmc_fail_request.  So this
introduces fault_create_debugfs_attr() which is able to create a
directory in the arbitrary directory and replace
init_fault_attr_dentries().

[akpm@linux-foundation.org: extraneous semicolon, per Randy]
Signed-off-by: Akinobu Mita &lt;akinobu.mita@gmail.com&gt;
Tested-by: Per Forlin &lt;per.forlin@linaro.org&gt;
Cc: Jens Axboe &lt;axboe@kernel.dk&gt;
Cc: Christoph Lameter &lt;cl@linux-foundation.org&gt;
Cc: Pekka Enberg &lt;penberg@kernel.org&gt;
Cc: Matt Mackall &lt;mpm@selenic.com&gt;
Cc: Randy Dunlap &lt;rdunlap@xenotime.net&gt;
Cc: Stephen Rothwell &lt;sfr@canb.auug.org.au&gt;
Signed-off-by: Andrew Morton &lt;akpm@linux-foundation.org&gt;
Signed-off-by: Linus Torvalds &lt;torvalds@linux-foundation.org&gt;
</content>
</entry>
</feed>
