[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] x86, amd_ucode: Fix coverity issues found in cpu_request_microcode()



On 7/30/2014 11:12 AM, Aravind Gopalakrishnan wrote:
This patch fixes issues found in CID 1229147(dead code) and
CID 1229148: possible resource leak of mc_amd due to goto out
statements.

Reported-by: Andrew Cooper<andrew.cooper3@xxxxxxxxxx>
Signed-off-by: Aravind Gopalakrishnan <aravind.gopalakrishnan@xxxxxxx>
---
  xen/arch/x86/microcode_amd.c | 13 +++++++------
  1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/microcode_amd.c b/xen/arch/x86/microcode_amd.c
index 14728a2..a2bdd20 100644
--- a/xen/arch/x86/microcode_amd.c
+++ b/xen/arch/x86/microcode_amd.c
@@ -384,9 +384,12 @@ static int cpu_request_microcode(int cpu, const void *buf, 
size_t bufsize)
      while ( offset < bufsize )
      {
          error = install_equiv_cpu_table(mc_amd, buf, &offset);
+        if ( error ) {

Darn. I just noticed this. Will modify this.
I'll wait to see if there are more suggestions before I send a V2 for this.

- Aravind.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.