Re: [PATCH] module: debugging check for runaway kthreads

2012-03-01 Thread Rusty Russell
On Wed, 29 Feb 2012 19:21:13 +0400, Dmitry Antipov wrote: > Debugging option CONFIG_MODULE_KTHREAD_CHECK provides a way to check > whether all kernel threads created by the module and have used module > code as a thread worker function are really exited when the module is > unloaded. The followin

Re: [PATCH 1/3] percpu: use ZERO_SIZE_PTR / ZERO_OR_NULL_PTR

2012-01-31 Thread Rusty Russell
On Mon, 30 Jan 2012 10:16:39 -0800, Tejun Heo wrote: > On Mon, Jan 30, 2012 at 12:12:18PM -0600, Christoph Lameter wrote: > > > I thought it didn't. I rememer thinking about this and determining > > > that NULL can't be allocated for dynamic addresses. Maybe I'm > > > imagining things. Anyways,

Re: [PATCH 3/3] module: use ZERO_OR_NULL_PTR allocation pointer checking

2012-01-30 Thread Rusty Russell
On Mon, 30 Jan 2012 12:44:40 +0400, Dmitry Antipov wrote: > Use ZERO_OR_NULL_PTR allocation pointer checking where allocation > function may return ZERO_SIZE_PTR. > > Signed-off-by: Dmitry Antipov > --- > kernel/module.c | 12 ++-- > 1 files changed, 6 insertions(+), 6 deletions(-) >

Re: [PATCH] module: avoid call vmalloc if init size is zero

2012-01-30 Thread Rusty Russell
On Mon, 30 Jan 2012 11:28:12 +0400, Dmitry Antipov wrote: > On 01/27/2012 03:21 PM, Rusty Russell wrote: > > > Please fix __vmalloc_node_range() instead to return ZERO_SIZE_PTR. > > And of course, vfree() to use ZERO_OR_NULL_PTR(). > > For the convenience and unifor

Re: [PATCH] module: avoid call vmalloc if init size is zero

2012-01-27 Thread Rusty Russell
On Fri, 27 Jan 2012 11:19:16 +0400, Dmitry Antipov wrote: > For the architectures with it's own module_alloc(), if module init > size is zero, avoiding module_alloc_update_bounds() and memset() > no-op calls also eliminates warn_alloc_failed() zero-size warning > in __vmalloc_node_range(). > > S