mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@ocs.com.au>
To: Jeff Garzik <jgarzik@mandrakesoft.com>
Cc: Marcelo Tosatti <marcelo@conectiva.com.br>, linux-kernel@vger.kernel.org
Subject: Re: [patch] 2.4.16 for pointers to __devexit functions
Date: Thu, 06 Dec 2001 20:54:37 +1100	[thread overview]
Message-ID: <13818.1007632477@ocs3.intra.ocs.com.au> (raw)
In-Reply-To: Your message of "Thu, 06 Dec 2001 03:09:46 CDT." <3C0F27CA.59C22DEF@mandrakesoft.com>

On Thu, 06 Dec 2001 03:09:46 -0500, 
Jeff Garzik <jgarzik@mandrakesoft.com> wrote:
>> This patch against 2.4.16 defines __devexit_p() for pointers to
>> functions defined as __devexit, the wrapper inserts the function name
>> or NULL, based on config options.  It allows people to use the new
>> binutils on the kernel, there are some real kernel bugs that binutils
>> will find once this patch is in.
>> 
>> I have patched all the obvious references to __devexit functions,
>> leaving a few which appear to be real bugs.  I notified the maintainers
>> of the buggy code privately.
>
>Why not __attribute__((weak)) ?

Because there are some real bugs in the kernel where code incorrectly
calls routines marked __devexit, a global conversion of __devexit
functions to NULL or weak will hide the bugs as well as the good code.
Most of the bugs are on error paths, typically an init routine calling
the exit code on error.  Changing to BUG() does not help either, that
only shows up the buggy code in the unlikely event of a device error.

Using __devexit_p() will automatically remove the references that
should not exist, the new binutils can then catch the other buggy code
at link time.


  parent reply	other threads:[~2001-12-06  9:55 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-06  6:22 Keith Owens
2001-12-06  8:09 ` Jeff Garzik
2001-12-06  9:40   ` David Woodhouse
2001-12-06  9:41     ` Jeff Garzik
2001-12-06 10:17       ` Alan Cox
2001-12-06  9:50     ` Jakub Jelinek
2001-12-06  9:54   ` Keith Owens [this message]
2001-12-06 10:15   ` David S. Miller
2001-12-06 10:22     ` Jakub Jelinek
2001-12-06  8:14 ` David S. Miller
2001-12-06 16:21 ` Marcelo Tosatti
2001-12-06 16:22   ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=13818.1007632477@ocs3.intra.ocs.com.au \
    --to=kaos@ocs.com.au \
    --cc=jgarzik@mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo@conectiva.com.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome