projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile...
[firefly-linux-kernel-4.4.55.git]
/
lib
/
fault-inject.c
diff --git
a/lib/fault-inject.c
b/lib/fault-inject.c
index 6805453c18e78a9d51592cb8ff3313fdbd3acc9a..f7210ad6cffd44c2486f8fef542dc5fa5affdae3 100644
(file)
--- a/
lib/fault-inject.c
+++ b/
lib/fault-inject.c
@@
-101,6
+101,10
@@
static inline bool fail_stacktrace(struct fault_attr *attr)
bool should_fail(struct fault_attr *attr, ssize_t size)
{
+ /* No need to check any other properties if the probability is 0 */
+ if (attr->probability == 0)
+ return false;
+
if (attr->task_filter && !fail_task(attr, current))
return false;