From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Linas Vepstas <linas@austin.ibm.com>
Cc: Greg KH <greg@kroah.com>,
linux-pci@atrey.karlin.mff.cuni.cz,
Eric Sesterhenn <snakebyte@gmx.de>,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org
Subject: Re: Fault tolerance/bad patch, [was Re: [PATCH 29/30] [PATCH] PCI Hotplug: fake NULL pointer dereferences in IBM Hot Plug Controller Driver]
Date: Fri, 23 Jun 2006 16:28:24 +0100 [thread overview]
Message-ID: <1151076504.4549.51.camel@localhost.localdomain> (raw)
In-Reply-To: <20060623150442.GK8866@austin.ibm.com>
Ar Gwe, 2006-06-23 am 10:04 -0500, ysgrifennodd Linas Vepstas:
> If someone in the future changes the hotplug core so that it
> sometimes returns a null value, this code will potentially crash
> and/or do other bad things (corrupt, invalid state, etc.)
> This means that this routine will no longer be "robust" in the face of
> changes in other parts of the kernel.
"Potentially".
But if you replaced it with
BUG_ON(value == NULL);
you'd both clean up the if and improve the reliability even more
> I can hear the objections:
> -- Performance. B.S. This routine is not performance critical, it will
> get called once a week, once a month or less often; a few extra
> cycles are utterly irrelevant.
(and half the time gcc eliminates the test itself)
next prev parent reply other threads:[~2006-06-23 15:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1150753481625-git-send-email-greg@kroah.com>
[not found] ` <115075348565-git-send-email-greg@kroah.com>
[not found] ` <11507534883521-git-send-email-greg@kroah.com>
[not found] ` <11507534914002-git-send-email-greg@kroah.com>
[not found] ` <11507534953044-git-send-email-greg@kroah.com>
[not found] ` <11507534983982-git-send-email-greg@kroah.com>
[not found] ` <11507535021937-git-send-email-greg@kroah.com>
[not found] ` <11507535054091-git-send-email-greg@kroah.com>
[not found] ` <11507535082418-git-send-email-greg@kroah.com>
[not found] ` <11507535123764-git-send-email-greg@kroah.com>
2006-06-23 15:04 ` Fault tolerance/bad patch, [was Re: [PATCH 29/30] [PATCH] PCI Hotplug: fake NULL pointer dereferences in IBM Hot Plug Controller Driver] Linas Vepstas
2006-06-23 15:28 ` Alan Cox [this message]
2006-06-23 15:52 ` Eric Sesterhenn / Snakebyte
2006-06-23 18:33 ` Greg KH
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=1151076504.4549.51.camel@localhost.localdomain \
--to=alan@lxorguk.ukuu.org.uk \
--cc=greg@kroah.com \
--cc=gregkh@suse.de \
--cc=linas@austin.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@atrey.karlin.mff.cuni.cz \
--cc=snakebyte@gmx.de \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.