Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932590AbWASJuA (ORCPT ); Thu, 19 Jan 2006 04:50:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932591AbWASJt7 (ORCPT ); Thu, 19 Jan 2006 04:49:59 -0500 Received: from outpipe-village-512-1.bc.nu ([81.2.110.250]:33481 "EHLO lxorguk.ukuu.org.uk") by vger.kernel.org with ESMTP id S932590AbWASJt7 (ORCPT ); Thu, 19 Jan 2006 04:49:59 -0500 Subject: Re: [PATCH] powerpc: remove useless spinlock from mpc83xx watchdog From: Alan Cox To: Kumar Gala Cc: Andrew Morton , wim@iguana.be, linux-kernel@vger.kernel.org, linuxppc-embedded@ozlabs.org In-Reply-To: References: Content-Type: text/plain Content-Transfer-Encoding: 7bit Date: Thu, 19 Jan 2006 09:49:16 +0000 Message-Id: <1137664156.8471.16.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 (2.2.3-2.fc4) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 755 Lines: 29 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 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 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/