summaryrefslogtreecommitdiffstats
path: root/tools/testing
diff options
context:
space:
mode:
authorDave Hansen <dave.hansen@linux.intel.com>2017-02-03 10:51:34 -0800
committerShuah Khan <shuahkh@osg.samsung.com>2017-02-08 11:15:35 -0700
commit16846c2d96b0d7b3f7123257c4b58b06768c6d65 (patch)
treee4c5bc83f4d162e3cc5c89346e2e856bb073f156 /tools/testing
parent0a7d2cd7407da88cec68556777458a4b897d91d8 (diff)
downloadop-kernel-dev-16846c2d96b0d7b3f7123257c4b58b06768c6d65.zip
op-kernel-dev-16846c2d96b0d7b3f7123257c4b58b06768c6d65.tar.gz
selftests, x86, protection_keys: fix uninitialized variable warning
'orig_pkru' might have been uninitialized here. Fix it. Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing')
-rw-r--r--tools/testing/selftests/x86/protection_keys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/x86/protection_keys.c b/tools/testing/selftests/x86/protection_keys.c
index 46f53ec..bccc6f2 100644
--- a/tools/testing/selftests/x86/protection_keys.c
+++ b/tools/testing/selftests/x86/protection_keys.c
@@ -462,7 +462,7 @@ void pkey_disable_set(int pkey, int flags)
unsigned long syscall_flags = 0;
int ret;
int pkey_rights;
- u32 orig_pkru;
+ u32 orig_pkru = rdpkru();
dprintf1("START->%s(%d, 0x%x)\n", __func__,
pkey, flags);
OpenPOWER on IntegriCloud