lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-845d8c761ec763871936c62b837c4a9ea6d0fbdb@git.kernel.org>
Date:	Fri, 10 Apr 2009 12:36:45 GMT
From:	Andreas Herrmann <andreas.herrmann3@....com>
To:	linux-tip-commits@...r.kernel.org
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	akpm@...ux-foundation.org, andreas.herrmann3@....com,
	mark.langsdorf@....com, tglx@...utronix.de, mingo@...e.hu
Subject: [tip:x86/cpu] x86: cacheinfo: correct return value when cache_disable feature is not active

Commit-ID:  845d8c761ec763871936c62b837c4a9ea6d0fbdb
Gitweb:     http://git.kernel.org/tip/845d8c761ec763871936c62b837c4a9ea6d0fbdb
Author:     Andreas Herrmann <andreas.herrmann3@....com>
AuthorDate: Thu, 9 Apr 2009 15:07:29 +0200
Committer:  Ingo Molnar <mingo@...e.hu>
CommitDate: Fri, 10 Apr 2009 14:21:42 +0200

x86: cacheinfo: correct return value when cache_disable feature is not active

Impact: bug fix

If user writes to "cache_disable" attribute on a CPU that does not support
this feature, the process hangs due to an invalid return value in
store_cache_disable().

Signed-off-by: Andreas Herrmann <andreas.herrmann3@....com>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Mark Langsdorf <mark.langsdorf@....com>
LKML-Reference: <20090409130729.GH31527@...erich.amd.com>
Signed-off-by: Ingo Molnar <mingo@...e.hu>


---
 arch/x86/kernel/cpu/intel_cacheinfo.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c
index 7240126..1ab46e0 100644
--- a/arch/x86/kernel/cpu/intel_cacheinfo.c
+++ b/arch/x86/kernel/cpu/intel_cacheinfo.c
@@ -771,7 +771,7 @@ store_cache_disable(struct _cpuid4_info *this_leaf, const char *buf,
 	unsigned int ret, index, val;
 
 	if (!this_leaf->can_disable)
-		return 0;
+		return -EINVAL;
 
 	if (strlen(buf) > 15)
 		return -EINVAL;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ