From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id A1031DDDFD for ; Mon, 13 Oct 2008 19:43:42 +1100 (EST) Subject: Re: [RFC 1/3] hvc_console: rework setup to replace irq functions with callbacks From: Benjamin Herrenschmidt To: Christian Borntraeger In-Reply-To: <200810130951.31733.borntraeger@de.ibm.com> References: <200806031444.21945.borntraeger@de.ibm.com> <200806031445.22561.borntraeger@de.ibm.com> <1223875013.8157.230.camel@pasglop> <200810130951.31733.borntraeger@de.ibm.com> Content-Type: text/plain Date: Mon, 13 Oct 2008 19:36:12 +1100 Message-Id: <1223886972.8157.241.camel@pasglop> Mime-Version: 1.0 Cc: Jeremy Fitzhardinge , Virtualization Mailing List , Rusty Russell , LKML , Linux PPC devel , Ingo Molnar Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , > if (--hp->count == 0) { > - if (hp->ops->notifier_del) > - hp->ops->notifier_del(hp, hp->data); > - > /* We are done with the tty pointer now. */ > hp->tty = NULL; > spin_unlock_irqrestore(&hp->lock, flags); > > + if (hp->ops->notifier_del) > + hp->ops->notifier_del(hp, hp->data); > + I will try. Of course the risk here is that the interrupt happens after we set hp->tty to NULL, so we probably need to check within the interrupt handler for a NULL tty. I haven't checked if that's the case (I'm not in front of the code right now). Ben.