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: <20170922221359.GA6397@lkp-wsm-ep2>
Date:   Sat, 23 Sep 2017 06:13:59 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Brijesh Singh <brijesh.singh@....com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org,
        kvm@...r.kernel.org, Brijesh Singh <brijesh.singh@....com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Radim Krčmář <rkrcmar@...hat.com>,
        Joerg Roedel <joro@...tes.org>, Borislav Petkov <bp@...e.de>,
        Tom Lendacky <thomas.lendacky@....com>, x86@...nel.org
Subject: [PATCH] KVM: SVM: fix eno.cocci warnings

arch/x86/kvm/svm.c:5728:5-11: ERROR: allocation function on line 5727 returns NULL not ERR_PTR on failure

 The various basic memory allocation functions don't return ERR_PTR

Generated by: scripts/coccinelle/null/eno.cocci

Fixes: 16e737dd7c3c ("KVM: SVM: Add support for SEV LAUNCH_START command")
CC: Brijesh Singh <brijesh.singh@....com>
Signed-off-by: Fengguang Wu <fengguang.wu@...el.com>
---

 svm.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -5725,7 +5725,7 @@ static void *copy_user_blob(u64 __user u
 		return ERR_PTR(-EINVAL);
 
 	data = kmalloc(len, GFP_KERNEL);
-	if (IS_ERR(data))
+	if (!data)
 		return ERR_PTR(-ENOMEM);
 
 	if (copy_from_user(data, (void __user *)(uintptr_t)uaddr, len))

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ