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]
Date:	Wed, 23 Sep 2015 11:01:34 -0700
From:	Kevin Hilman <khilman@...nel.org>
To:	Thierry Reding <thierry.reding@...il.com>
Cc:	Takashi Iwai <tiwai@...e.com>, alsa-devel@...a-project.org,
	Tyler Baker <tyler.baker@...aro.org>,
	Jon Hunter <jonathanh@...dia.com>, linux-tegra@...r.kernel.org,
	linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 0/3] ALSA: hda - Avoid potential deadlock

Thierry Reding <thierry.reding@...il.com> writes:

> From: Thierry Reding <treding@...dia.com>
>
> The Tegra HDA controller driver committed in v3.16 causes deadlocks when
> loaded as a module. The reason is that the driver core will lock the HDA
> controller device upon calling its probe callback and the probe callback
> then goes on to create child devices for detected codecs and loads their
> modules via a request_module() call. This is problematic because the new
> driver will immediately be bound to the device, which will in turn cause
> the parent of the codec device (the HDA controller device) to be locked
> again, causing a deadlock.
>
> This problem seems to have been present since the modularization of the
> HD-audio driver in commit 1289e9e8b42f ("ALSA: hda - Modularize HD-audio
> driver"). On Intel platforms this has been worked around by splitting up
> the probe sequence into a synchronous and an asynchronous part where the
> request_module() calls are asynchronous and hence avoid the deadlock.
>
> An alternative proposal is provided in this series of patches. Rather
> than relying on explicit request_module() calls to load kernel modules
> for HDA codec drivers, this implements a uevent callback for the HDA bus
> to advertises the MODALIAS information to the userspace helper.
>
> Effectively this results in the same modules being loaded, but it uses
> the more canonical infrastructure to perform this. Deferring the module
> loading to userspace removes the need for the explicit request_module()
> calls and works around the recursive locking issue because both drivers
> will be bound from separate contexts.

Tested-by: Kevin Hilman <khilman@...aro.org>

FWIW, I tested this on top of next-20150923, and it solves the boot
problem I'm seeing on tegra124-jetson-tk1 with module loading.

Kevin

--
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