From: Kumar Gala <galak@kernel.crashing.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Andrew Morton <akpm@osdl.org>,
wim@iguana.be, LKML List <linux-kernel@vger.kernel.org>,
"Linuxppc-Embedded ((E-Mail))" <linuxppc-embedded@ozlabs.org>,
Marcelo Tosatti <marcelo.tosatti@cyclades.com>
Subject: Re: [PATCH] powerpc: remove useless spinlock from mpc83xx watchdog
Date: Thu, 19 Jan 2006 08:21:14 -0600 [thread overview]
Message-ID: <0D215BB4-D75D-439C-BB33-4880315C1191@kernel.crashing.org> (raw)
In-Reply-To: <1137664156.8471.16.camel@localhost.localdomain>
On Jan 19, 2006, at 3:49 AM, Alan Cox wrote:
> 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
Thanks, you learn something new every day.
- kumar
next prev parent reply other threads:[~2006-01-19 14:21 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
2006-01-19 14:21 ` Kumar Gala [this message]
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=0D215BB4-D75D-439C-BB33-4880315C1191@kernel.crashing.org \
--to=galak@kernel.crashing.org \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-embedded@ozlabs.org \
--cc=marcelo.tosatti@cyclades.com \
--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).