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] [day] [month] [year] [list]
Message-ID: <CAFRkauDR_XuMrihptQu1=Oq4nzOqcmne89LwsOHPzQrWCQQgMA@mail.gmail.com>
Date:	Fri, 21 Aug 2015 13:08:24 +0800
From:	Axel Lin <axel.lin@...ics.com>
To:	Hongzhou Yang <hongzhou.yang@...iatek.com>
Cc:	Linus Walleij <linus.walleij@...aro.org>,
	Matthias Brugger <matthias.bgg@...il.com>,
	Yingjoe Chen <yingjoe.chen@...iatek.com>,
	Antoine Tenart <antoine.tenart@...e-electrons.com>,
	Maoguang Meng <maoguang.meng@...iatek.com>,
	Masahiro Yamada <yamada.masahiro@...ionext.com>,
	Chaotian Jing <chaotian.jing@...iatek.com>,
	"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@...ts.infradead.org>,
	linux-mediatek@...ts.infradead.org,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	srv_heupstream@...iatek.com, Sascha Hauer <kernel@...gutronix.de>,
	biao.huang@...iatek.com
Subject: Re: [PATCH v3] pinctrl: mediatek: Fix multiple registration issue.

2015-08-21 12:46 GMT+08:00 Hongzhou Yang <hongzhou.yang@...iatek.com>:
> Since our common driver need support main chip and PMU
> at the same time, that means it will register two
> pinctrl device, and the pinctrl_desc structure should
> be used two times.
>
> But pinctrl_desc use global static definition, then
> the latest registered pinctrl device will overwrite
> the old one's, all members in pinctrl_desc will set to
> the new one's, such as name, pins and pins numbers, etc.
> This is a bug. Changing to use devm_kzalloc to fix it.
>
> Cc: stable@...r.kernel.org # v4.1+
> Signed-off-by: Hongzhou Yang <hongzhou.yang@...iatek.com>
> ---
>  Use dynamic allocation to fix multiple registration issue.

The code looks good to me but the commit log needs fix.
You don't use devm_kzalloc now.
Just embedded struct pinctrl_desc pctl_desc to struct mtk_pinctrl.

Reviewed-by: Axel Lin <axel.lin@...ics.com>
--
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