From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756438Ab0FCQ3q (ORCPT ); Thu, 3 Jun 2010 12:29:46 -0400 Received: from smtp1.linux-foundation.org ([140.211.169.13]:58338 "EHLO smtp1.linux-foundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751721Ab0FCQ3o (ORCPT ); Thu, 3 Jun 2010 12:29:44 -0400 Date: Thu, 3 Jun 2010 09:24:19 -0700 (PDT) From: Linus Torvalds To: Rusty Russell cc: Brandon Philips , Andrew Morton , "Rafael J. Wysocki" , LKML , Jon Masters , Tejun Heo , Masami Hiramatsu , Kay Sievers Subject: Re: [PATCH 2/2] module: fix bne2 "gave up waiting for init of module libcrc32c" In-Reply-To: <201006031450.53576.rusty@rustcorp.com.au> Message-ID: References: <201005252300.07739.rjw@sisk.pl> <201006022336.53024.rusty@rustcorp.com.au> <201006031450.53576.rusty@rustcorp.com.au> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 3 Jun 2010, Rusty Russell wrote: > > However, you're right that it has potential. I'll rename module_info to > load_info if you don't mind tho: contains more semantic punch IMHO. Umm. One problem is that you will almost certainly eventually want to expose that to the architecture "fixup" routines (ie things like module_frob_arch_sections(), arch_mod_section_prepend()), and at that point "load_info" is a horribly bad structure name, since it would show up in and thus be exported all over. At least call it "struct module_load_info". But yes, I do agree that the "load" part is important. > On top of this, I'm right now closing on another ideal of mine: encapsulate > all the "before we move module" into one function. That before vs. after > always made me nervous... Yeah, that should be trivial, and I agree that it would be good to not have "mod" mean two things in the same function. Especially with all the "goto failure-case", and some of the failure cases using "mod", it is a bit scary for it to point into the (before movement) 'hdr+len' structure, and then (after movement) into the relocated module allocations. I looked at that particularly when doing that whole mod = setup_module_info(&info); if (IS_ERR(mod)) { err = PTR_ERR(mod); goto free_hdr; } thing, because that made "mod" have _three_ totally different values (error, before, after) when jumping out to the failure paths. Linus