[PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Hank Janssen
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

Re: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Jesper Juhl
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

RE: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Hank Janssen
From: Jesper Juhl [mailto:j...@chaosbits.net] Sent: Monday, December 13, 2010 1:22 PM I can't spot any problems with these changes now, so feel free to add Reviewed-by: Jesper Juhl j...@chaosbits.net if you like. Thank you for your help Jesper. Greg, do you want me to resubmit with

Re: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Greg KH
On Mon, Dec 13, 2010 at 09:31:09PM +, Hank Janssen wrote: From: Jesper Juhl [mailto:j...@chaosbits.net] Sent: Monday, December 13, 2010 1:22 PM I can't spot any problems with these changes now, so feel free to add Reviewed-by: Jesper Juhl j...@chaosbits.net if you like.

Re: [PATCH 1/1] hv: Use only one txf buffer per channel and kmalloc on initialize

2010-12-13 Thread Evgeniy Polyakov
On Mon, Dec 13, 2010 at 01:14:21PM -0800, Hank Janssen (hjans...@microsoft.com) wrote: +static u8 *shut_txf_buf; +static u8 *time_txf_buf; +static u8 *hbeat_txf_buf; Those are accessed without any kind of synchronization. I do not know exact context, but are you sure it is single-threaded?