lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1232703923.22248.230.camel@zakaz.uk.xensource.com>
Date:	Fri, 23 Jan 2009 09:45:23 +0000
From:	Ian Campbell <Ian.Campbell@...rix.com>
To:	Christian Borntraeger <borntraeger@...ibm.com>
Cc:	linux-kernel@...r.kernel.org, Milton Miller <miltonm@....com>,
	Hendrik Brueckner <brueckner@...ux.vnet.ibm.com>,
	Benjamin Herrenschmidt <benh@...nel.crashing.org>,
	Rusty Russell <rusty@...tcorp.com.au>
Subject: Re: [PATCH] HVC: do not request the irq twice.

On Thu, 2009-01-22 at 20:09 +0100, Christian Borntraeger wrote:
> Am Thursday 22 January 2009 18:56:08 schrieb Ian Campbell:
> > --- a/drivers/char/hvc_irq.c
> > +++ b/drivers/char/hvc_irq.c
> > @@ -28,6 +28,10 @@ int notifier_add_irq(struct hvc_struct *hp, int irq)
> >  		hp->irq_requested = 0;
> >  		return 0;
> >  	}
> > +
> > +	if (hp->irq_requested)
> > +		return 0;
> > +
> >  	rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED,
> >  			   "hvc_console", hp);
> >  	if (!rc)
> 
> Unfortunately I have no system with an irq based hvc console - I cannot test 
> this patch. Anyway, the patch looks sane:
> 
> Reviewed-by: Christian Borntraeger <borntraeger@...ibm.com>
> 
> If this really fixes a problem, I am asking myself, if notifier_del can be 
> called several times as well. If yes, it might be better to call free_irq at 
> the last notifier_del - which means we need proper refcounting. Otherwise the 
> console switches into polling mode....

Hmm, interesting question. It looks like the count field in struct
hvc_struct is being used to count opens and closes which should
reference count the IRQ usage too.

Oh, I see, hvc_hangup resets count but the Xen dom0 hv_ops was missing
the hangup hook to release the IRQ -- I'll fix this.

I think this patch can be ignored, real bug is on the Xen side.

Ian.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ