linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: Kumar Gala <galak@gate.crashing.org>
Cc: Andrew Morton <akpm@osdl.org>,
	wim@iguana.be, linux-kernel@vger.kernel.org,
	linuxppc-embedded@ozlabs.org
Subject: Re: [PATCH] powerpc: remove useless spinlock from mpc83xx watchdog
Date: Thu, 19 Jan 2006 09:49:16 +0000	[thread overview]
Message-ID: <1137664156.8471.16.camel@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44.0601190057130.8484-100000@gate.crashing.org>

On Iau, 2006-01-19 at 00:58 -0600, Kumar Gala wrote:
> Since we can only open the watchdog once having a spinlock to protect
> multiple access is pointless.
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>

NAK

This is a common mistake.

open is called on the open() call and is indeed in this case 'single
open', but file handles can be inherited and many users may have access
to a single file handle.

eg

	f = open("/dev/watchdog", O_RDWR);
	fork();
	while(1) {
		write(f, "Boing", 5);
	}

Alan

  reply	other threads:[~2006-01-19 10:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-19  6:58 [PATCH] powerpc: remove useless spinlock from mpc83xx watchdog Kumar Gala
2006-01-19  9:49 ` Alan Cox [this message]
2006-01-19 14:21   ` Kumar Gala
2006-01-19 16:48   ` Marcelo Tosatti
2006-01-19 22:12     ` Alan Cox
2006-01-20 11:55       ` Wim Van Sebroeck

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=1137664156.8471.16.camel@localhost.localdomain \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=akpm@osdl.org \
    --cc=galak@gate.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-embedded@ozlabs.org \
    --cc=wim@iguana.be \
    /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).