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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080710094641.0c52eaa7@the-village.bc.nu>
Date:	Thu, 10 Jul 2008 09:46:41 +0100
From:	Alan Cox <alan@...rguk.ukuu.org.uk>
To:	Uwe Kleine-König <Uwe.Kleine-Koenig@...i.com>
Cc:	Magnus Damm <magnus.damm@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"gregkh@...e.de" <gregkh@...e.de>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"hjk@...utronix.de" <hjk@...utronix.de>,
	"lethal@...ux-sh.org" <lethal@...ux-sh.org>,
	"tglx@...utronix.de" <tglx@...utronix.de>
Subject: Re: [PATCH] uio: uio_pdrv_genirq V2


> > +       else if (!irq_on && !priv->irq_disabled)
> > +               disable_irq(dev_info->irq);
> I'm not sure if this is a problem on SMP.  Should you use
> disable_irq_nosync here, too?  Probably it's OK.

That one will also deadlock.

The easiest fix is probably to use test_and_set and friends for each I/O
operation. You would then not need the lock to protect ->irq_disabled.
Propogating that throughout means your user space has to handle the case
of an IRQ arriving after disable returns but would be a fair bit saner I
think ?
--
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