Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753779Ab0FCMxF (ORCPT ); Thu, 3 Jun 2010 08:53:05 -0400 Received: from ozlabs.org ([203.10.76.45]:53629 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752385Ab0FCMxB (ORCPT ); Thu, 3 Jun 2010 08:53:01 -0400 From: Rusty Russell To: Dave Young Subject: Re: linux-next: Tree for June 3 Date: Thu, 3 Jun 2010 22:22:56 +0930 User-Agent: KMail/1.13.2 (Linux/2.6.32-21-generic; KDE/4.4.2; i686; ; ) Cc: Stephen Rothwell , linux-next@vger.kernel.org, LKML , Linus Torvalds References: <20100603134753.710a64b3.sfr@canb.auug.org.au> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201006032222.57411.rusty@rustcorp.com.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1027 Lines: 33 On Thu, 3 Jun 2010 05:30:09 pm Dave Young wrote: > Seems for some module drop reference of 0 in following code of init_module: > > /* Drop initial reference. */ > module_put(mod); Thanks Dave, good bug report. It was "module: refactor load_module part 4" where I initialized the per-cpu pointer before allocating it: static int module_unload_init(struct module *mod) { ... /* Hold reference count during initialization. */ __this_cpu_write(mod->refptr->incs, 1); ... mod->refptr = alloc_percpu(struct module_ref); ... This also explains Stephen's crash during module load (which was more expected since refptr is NULL, though percpu ptrs don't work that way). I've fixed it (by reversing the order of those lines) for tomorrow's linux-next. Thanks! Rusty. -- 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/