Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757280Ab0LMV2f (ORCPT ); Mon, 13 Dec 2010 16:28:35 -0500 Received: from swampdragon.chaosbits.net ([90.184.90.115]:21108 "EHLO swampdragon.chaosbits.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756594Ab0LMV2e (ORCPT ); Mon, 13 Dec 2010 16:28:34 -0500 Date: Mon, 13 Dec 2010 22:22:11 +0100 (CET) From: Jesper Juhl To: Hank Janssen cc: gregkh@suse.de, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, virtualization@lists.osdl.org, Haiyang Zhang , Evgeniy Polyakov , Ky Srinivasan Subject: Re: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize In-Reply-To: <1292274861-29673-1-git-send-email-hjanssen@microsoft.com> Message-ID: References: <1292274861-29673-1-git-send-email-hjanssen@microsoft.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1338 Lines: 36 On Mon, 13 Dec 2010, Hank Janssen wrote: > Correct issue with not checking kmalloc return value. > This fix now only uses one receive buffer for all hv_utils > channels, and will do only one kmalloc on init and will return > with a -ENOMEM if kmalloc fails on initialize. > > And properly clean up memory on failure. > > Thanks to Evgeniy Polyakov for pointing this out. > And thanks to Jesper Juhl and Ky Srinivasan > for suggesting a better implementation of > my original patch. > > Signed-off-by: Haiyang Zhang > Signed-off-by: Hank Janssen > Cc: Evgeniy Polyakov > Cc: Jesper Juhl > Cc: Ky Srinivasan > I can't spot any problems with these changes now, so feel free to add Reviewed-by: Jesper Juhl if you like. -- Jesper Juhl 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/