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]
Date:	Mon, 13 Dec 2010 22:06:08 +0100 (CET)
From:	Jesper Juhl <jj@...osbits.net>
To:	Hank Janssen <hjanssen@...rosoft.com>
cc:	"gregkh@...e.de" <gregkh@...e.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
	"virtualization@...ts.osdl.org" <virtualization@...ts.osdl.org>,
	Haiyang Zhang <haiyangz@...rosoft.com>,
	Evgeniy Polyakov <zbr@...emap.net>,
	Ky Srinivasan <ksrinivasan@...ell.com>
Subject: RE: [PATCH 1/1] hv: Use only one receive buffer per channel and
 kmalloc on initialize

On Mon, 13 Dec 2010, Hank Janssen wrote:

> 
> 
> > -----Original Message-----
> > From: Jesper Juhl [mailto:jj@...osbits.net]
> > Sent: Monday, December 13, 2010 12:48 PM
> > You are leaking memory in the failure path. If for example one or two
> > allocations succeed but one or two fail, then you'll leak the two successful
> > allocations.
> > 
> > I believe this should be
> > 
> >      if (!shut_txf_buf || !time_txf_buf || !hbeat_txf_buf) {
> >              printk(KERN_INFO
> >                     "Unable to allocate memory for receive buffer\n");
> >              kfree(hbeat_txf_buf);
> >              kfree(time_txf_buf);
> >              kfree(shut_txf_buf);
> >              return -ENOMEM;
> > ...
> > 
>  
> Oops, you are correct. Resubmitting the patch in a few minutes.
> 
Ohh and another little detail; shouldn't this log message be a 
KERN_WARNING level message?
And perhaps the log text should include "HyperV" or something so it's 
clear where it comes from..?

-- 
Jesper Juhl <jj@...osbits.net>            http://www.chaosbits.net/
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please.

--
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