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: <4BE2BA55.6060109@mev.co.uk>
Date:	Thu, 6 May 2010 13:47:17 +0100
From:	Ian Abbott <abbotti@....co.uk>
To:	Tobias Klauser <klto@...w.ch>
CC:	Ian Abbott <ian.abbott@....co.uk>,
	"sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
	"gregkh@...e.de" <gregkh@...e.de>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-serial@...r.kernel.org" <linux-serial@...r.kernel.org>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"alan@...rguk.ukuu.org.uk" <alan@...rguk.ukuu.org.uk>,
	"nios2-dev@...c.et.ntust.edu.tw" <nios2-dev@...c.et.ntust.edu.tw>
Subject: Re: [Nios2-dev] [PATCH 2/2] serial: Add driver for the Altera UART

Hi Tobias,

On 06/05/10 13:03, Tobias Klauser wrote:
> I also noticed, that altera_uart_break_ctl takes the lock which might be
> not necessary as the caller in serial_core.c already takes port->mutex
> which should be enough. Or am I wrong?

It's not enough.  The spin lock is needed to protect modification of
pp->imr and writing this modified value to the control register.  Not
all paths that modify pp->imr and the control register grab port->mutex
beforehand (for example, the interrupt routine doesn't and can't).

-- 
-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@....co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-
--
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