Re: [PATCH] isicom: Fix buffer allocation

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Olivier Galibert <galibert@...>, <linux-kernel@...>, <alan@...>
Date: Tuesday, April 29, 2008 - 11:59 am

On Tue, Apr 29, 2008 at 05:26:07PM +0200, Olivier Galibert wrote:

The joys of parallelism. The serial drivers mostly do this because they
are using the BKL for open/close paths being a bit prehistoric (its on
the hit list ;))

CPU #1

	open
	port->xmit_buf == NULL
	get_zeroed_page [Can sleep dropping BKL]

CPU #2

	get_zeroed_page
	port->xmit_buf == NULL
		port->xmit_buf = page

CPU #1

	port->xmit_buf != NULL
		free page

A fine example of why proper locking is good ;)

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] isicom: Fix buffer allocation, Alan Cox, (Tue Apr 29, 9:17 am)
Re: [PATCH] isicom: Fix buffer allocation, Olivier Galibert, (Tue Apr 29, 11:26 am)
Re: [PATCH] isicom: Fix buffer allocation, Alan Cox, (Tue Apr 29, 11:59 am)