summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzhangdianfang <zhangdianfang@huawei.com>2014-05-30 08:37:28 +0800
committerSasha Levin <sasha.levin@oracle.com>2014-07-07 12:02:21 -0400
commit6c642e442e99af1ca026af55a16f23b5f8ee612a (patch)
tree96749b5b769cb0d5b2dee888cda2fd763165b92b
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
downloadblackbird-op-linux-6c642e442e99af1ca026af55a16f23b5f8ee612a.tar.gz
blackbird-op-linux-6c642e442e99af1ca026af55a16f23b5f8ee612a.zip
tools/liblockdep: Fix comparison of a boolean value with a value of 2
Comparison of a boolean value (!__init_state) with a value of 2 (done) as currently happens in the code is unlikely to succeed and causes repeated initialization of the pthread function pointers. Instead, remove boolean comparison so that we would initialize said function pointers only once. Ref: https://bugzilla.kernel.org/show_bug.cgi?id=76741 Cc: Jean Delvare <jdelvare@suse.de> Reported-by: David Binderman <dcb314@hotmail.com> Signed-off-by: Dianfang Zhang <zhangdianfang@huawei.com> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
-rw-r--r--tools/lib/lockdep/preload.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/lib/lockdep/preload.c b/tools/lib/lockdep/preload.c
index 23bd69cb5ade..b5e52af6ddf3 100644
--- a/tools/lib/lockdep/preload.c
+++ b/tools/lib/lockdep/preload.c
@@ -92,7 +92,7 @@ enum { none, prepare, done, } __init_state;
static void init_preload(void);
static void try_init_preload(void)
{
- if (!__init_state != done)
+ if (__init_state != done)
init_preload();
}
OpenPOWER on IntegriCloud