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:	Thu, 26 Mar 2015 08:34:20 +0000
From:	Lee Jones <lee.jones@...aro.org>
To:	Johan Hovold <johan@...nel.org>
Cc:	Support Opensource <support.opensource@...semi.com>,
	Samuel Ortiz <sameo@...ux.intel.com>,
	Liam Girdwood <lgirdwood@...il.com>,
	Mark Brown <broonie@...nel.org>, linux-kernel@...r.kernel.org,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>,
	Milo Kim <milo.kim@...com>,
	patches@...nsource.wolfsonmicro.com,
	Fabio Estevam <fabio.estevam@...escale.com>,
	Marek Szyprowski <m.szyprowski@...sung.com>,
	stable <stable@...r.kernel.org>
Subject: Re: [PATCH 2/2] mfd: core: fix platform-device name collisions

On Wed, 25 Mar 2015, Johan Hovold wrote:

> Since commit 6e3f62f0793e ("mfd: core: Fix platform-device id
> generation") we honour PLATFORM_DEVID_AUTO and PLATFORM_DEVID_NONE when
> registering mfd-devices.
> 
> Unfortunately, some mfd-drivers rely on the old behaviour of generating
> platform-device ids by adding the cell id also to the special value of
> PLATFORM_DEVID_NONE. The resulting platform ids are not only used to
> generate device-unique names, but are also used instead of the cell id
> to identify cells when probing subdevices.
> 
> These drivers should be updated to use PLATFORM_DEVID_AUTO, which would
> also allow more than one device to be registered without resorting to
> hacks (see for example wm831x), but lets fix the regression first by
> partially reverting the above mentioned commit with respect to
> PLATFORM_DEVID_NONE.
> 
> Fixes: 6e3f62f0793e ("mfd: core: Fix platform-device id generation")
> Cc: stable <stable@...r.kernel.org>	# v3.19
> Reported-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@...sung.com>
> Signed-off-by: Johan Hovold <johan@...nel.org>
> ---
>  drivers/mfd/mfd-core.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

> diff --git a/drivers/mfd/mfd-core.c b/drivers/mfd/mfd-core.c
> index 2a87f69be53d..1aed3b7b8d9b 100644
> --- a/drivers/mfd/mfd-core.c
> +++ b/drivers/mfd/mfd-core.c
> @@ -128,7 +128,7 @@ static int mfd_add_device(struct device *parent, int id,
>  	int platform_id;
>  	int r;
>  
> -	if (id < 0)
> +	if (id == PLATFORM_DEVID_AUTO)
>  		platform_id = id;
>  	else
>  		platform_id = id + cell->id;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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