From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758037AbZBKAbk (ORCPT ); Tue, 10 Feb 2009 19:31:40 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756812AbZBKA2N (ORCPT ); Tue, 10 Feb 2009 19:28:13 -0500 Received: from kroah.org ([198.145.64.141]:51025 "EHLO coco.kroah.org" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1756450AbZBKA2L (ORCPT ); Tue, 10 Feb 2009 19:28:11 -0500 Date: Tue, 10 Feb 2009 16:24:34 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , Chris Wedgwood , Michael Krufky , Chuck Ebbert , Domenico Andreoli , Willy Tarreau , Rodrigo Rubira Branco , Jake Edge , Eugene Teo , torvalds@linux-foundation.org, akpm@linux-foundation.org, alan@lxorguk.ukuu.org.uk, Karsten Keil , Rusty Russell Subject: [patch 10/56] module: remove over-zealous check in __module_get() Message-ID: <20090211002434.GK14660@kroah.com> References: <20090211001439.873435357@mini.kroah.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="module-remove-over-zealous-check-in-__module_get.patch" In-Reply-To: <20090211002328.GA14660@kroah.com> User-Agent: Mutt/1.5.16 (2007-06-09) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2.6.27-stable review patch. If anyone has any objections, please let us know. ------------------ From: Rusty Russell commit 7f9a50a5b89b87f8e754f59ae9968da28be618a5 upstream. Impact: fix spurious BUG_ON() triggered under load module_refcount() isn't reliable outside stop_machine(), as demonstrated by Karsten Keil , networking can trigger it under load (an inc on one cpu and dec on another while module_refcount() is tallying can give false results, for example). Almost noone should be using __module_get, but that's another issue. Cc: Karsten Keil Signed-off-by: Rusty Russell Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- include/linux/module.h | 1 - 1 file changed, 1 deletion(-) --- a/include/linux/module.h +++ b/include/linux/module.h @@ -387,7 +387,6 @@ void symbol_put_addr(void *addr); static inline void __module_get(struct module *module) { if (module) { - BUG_ON(module_refcount(module) == 0); local_inc(&module->ref[get_cpu()].count); put_cpu(); }