From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ingo Molnar Subject: Re: [PATCH] parisc: fix module loading failure of large kernel modules (take 4) Date: Thu, 1 Jan 2009 15:24:01 +0100 Message-ID: <20090101142401.GA25690@elte.hu> References: <4959346E.7060600@gmx.de> <200812310915.41693.rusty@rustcorp.com.au> <495B5806.3080505@gmx.de> <20081231105425.9ccac21d.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Andrew Morton , Roland Dreier , Ian Campbell , Jeremy Fitzhardinge , Helge Deller , Rusty Russell , linux-parisc , Linux Kernel Development , Kyle McMartin , Randolph Chung , Sam Ravnborg , John David Anglin To: Linus Torvalds Return-path: In-Reply-To: List-ID: List-Id: linux-parisc.vger.kernel.org * Linus Torvalds wrote: > > > On Wed, 31 Dec 2008, Andrew Morton wrote: > > > > Adrian claimed that it was gcc-4.1.0 and 4.1.1 only. He proposed > > banning them: http://lkml.org/lkml/2008/8/5/444 > > If it really is just those releases, then yes, considering the number of > cases we apparently have, and considering how ugly it is in some cases > to move the weak function anywhere else, maybe banning those versions is > the proper thing to do. > > It probably won't hurt very many people - yeah, some people will be > forced to upgrade, but I have this memory of early 4.1 having had other > bugs anyway, so it's probably a good idea. That would be _really_ nice to do IMHO: in many cases putting the __weak definition into same-file scope with a call site is a natural approach. I think that's how we ended up having so many instances of that bug. When you use __weak as a 'default implementation' for some function, then it's very natural to put it into the same file that also uses it. It goes into separate, inactive scope only in a few special cases: such as when it's some library function that can be overriden by the architecture. But if it's some non-libray kernel code then the usage site is close to the definition site. If you look at most of the __weak fixes they IMO actually turned clean code into less clean code: they detached some natural clustering of definition and callsite. And __weak is very elegant IMO, it can avoid a lot of #ifdefs and can be used to self-document architecture interfaces - so it would be nice to make it always work, regardless of the callsite's scope. Ingo