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: <20131024091857.GG31415@sirena.org.uk>
Date:	Thu, 24 Oct 2013 10:18:57 +0100
From:	Mark Brown <broonie@...nel.org>
To:	Tero Kristo <t-kristo@...com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] regmap: debugfs: Fix a boot time crash with early regmap
 init

On Thu, Oct 24, 2013 at 12:07:48PM +0300, Tero Kristo wrote:

> +	if (!regmap_debugfs_root) {
> +		struct regmap_debugfs_node *node;
> +		node = kzalloc(sizeof(*node), GFP_KERNEL);
> +		if (!node)
> +			return;
> +		node->map = map;
> +		node->name = name;
> +		list_add(&node->link, &regmap_debugfs_early);
> +		return;
> +	}
> +

init is somewhat parallel so I'd be happier if we locked the list to
make sure that we don't corrupt the list.

We also need something to handle removal of items from the list if the
regmap is destroyed prior to the initcall running (for example in error
handling cases), otherwise we could end up creating debugfs files
pointing at devices that no longer exist.

Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ