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: <201304191213.48631.arnd@arndb.de>
Date:	Fri, 19 Apr 2013 12:13:48 +0200
From:	Arnd Bergmann <arnd@...db.de>
To:	"Lars-Peter Clausen" <lars@...afoo.de>
Cc:	Vinod Koul <vinod.koul@...el.com>, Jon Hunter <jon-hunter@...com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] dma:of: Use a mutex to protect the of_dma_list

On Friday 19 April 2013, Lars-Peter Clausen wrote:

> This is rather ugly and unnecessary and non of the current users of
> of_dma_controller_free() check it's return value anyway. Instead protect the
> list by a mutex. The mutex will be held as long as a request operation is in
> progress. So if of_dma_controller_free() is called while a request operation is
> in progress it will be put to sleep and only wake up once the request operation
> has finished.
> 
> This means that it is no longer possible to register or unregister OF DMA
> controllers from a context where it's not possible to sleep. But I doubt that
> we'll ever need this.
> 
> Also rename of_dma_get_controller back to of_dma_find_controller.
> 
> Signed-off-by: Lars-Peter Clausen <lars@...afoo.de>

I guess we could also fix it by turning the reference count into a proper
kref with kref_put calling the destructor, but your solution seems to solve
the problem just as well.

Acked-by: Arnd Bergmann <arnd@...db.de>
--
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