From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 1/4] drivers: hwspinlock: add generic framework
Date: Fri, 26 Nov 2010 22:53:39 +0000 [thread overview]
Message-ID: <20101126225339.GA26864@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTi=h3gPN63NKKJ4wjumKNx9qDtxCKvOSbtRkr1wx@mail.gmail.com>
On Sat, Nov 27, 2010 at 12:18:55AM +0200, Ohad Ben-Cohen wrote:
> But then there's the other (quite reasonable) claim that says we
> shouldn't crash the machine because of a non fatal bug: if a crappy
> driver messes up, the user (not the developer) will most probably
> prefer the machine to keep running with degraded functionality rather
> than boot.
There's also the quite reasonable expectation that we shouldn't corrupt
user data. With locking interfaces, if someone abuses them and they
fail to work, then the risk is data corruption due to races. The safe
thing in that case is to panic - terminate that thread before it does
anything unsafe, thereby preventing data corruption.
Yes, it may mean that something becomes unavailable, but that's better
than corrupting data.
Take a look at the kernel's own spinlock implementation. Do we do lots
of checks in there for things like someone passing a NULL pointer to
the spinlock, or do we get an oops instead?
Also look at the list implementation. Do we check for NULL pointers
there, or do we get an oops instead?
Same for mutex. The same goes for lots of other infrastructure interfaces.
next prev parent reply other threads:[~2010-11-26 22:53 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 15:38 [PATCH v2 0/4] Introduce common hardware spinlock interface Ohad Ben-Cohen
2010-11-23 15:38 ` [PATCH v2 1/4] drivers: hwspinlock: add generic framework Ohad Ben-Cohen
2010-11-24 7:44 ` Kamoolkar, Mugdha
2010-11-24 19:59 ` Ohad Ben-Cohen
2010-11-25 3:59 ` David Brownell
2010-11-25 6:40 ` Ohad Ben-Cohen
2010-11-25 20:22 ` David Brownell
2010-11-26 7:34 ` Ohad Ben-Cohen
2010-11-27 1:24 ` David Brownell
2010-11-29 9:57 ` Ohad Ben-Cohen
2010-11-25 6:05 ` Kamoolkar, Mugdha
2010-11-25 14:29 ` Ohad Ben-Cohen
2010-11-26 4:59 ` Olof Johansson
2010-11-26 7:18 ` Grant Likely
2010-11-26 21:00 ` Olof Johansson
2010-11-26 8:53 ` Ohad Ben-Cohen
2010-11-26 9:18 ` Russell King - ARM Linux
2010-11-26 10:16 ` Ohad Ben-Cohen
2010-11-26 10:45 ` Russell King - ARM Linux
2010-11-26 22:18 ` Ohad Ben-Cohen
2010-11-26 22:53 ` Russell King - ARM Linux [this message]
2010-11-29 9:46 ` Ohad Ben-Cohen
2010-11-26 22:51 ` Olof Johansson
2010-11-29 21:31 ` Ohad Ben-Cohen
2010-11-30 19:00 ` Tony Lindgren
2010-11-30 22:20 ` Ohad Ben-Cohen
2010-11-30 22:23 ` Tony Lindgren
2010-11-23 15:38 ` [PATCH v2 2/4] drivers: hwspinlock: add OMAP implementation Ohad Ben-Cohen
2010-11-23 23:23 ` Ionut Nicu
2010-11-24 10:33 ` Ohad Ben-Cohen
2010-11-23 15:38 ` [PATCH v2 3/4] OMAP4: hwmod data: Add hwspinlock Ohad Ben-Cohen
2010-11-23 15:39 ` [PATCH v2 4/4] omap: add hwspinlock device Ohad Ben-Cohen
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=20101126225339.GA26864@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).