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]
Date:	Wed, 14 Aug 2013 10:28:42 -0600
From:	Stephen Warren <swarren@...dotorg.org>
To:	Linus Walleij <linus.walleij@...aro.org>
CC:	Sonic Zhang <sonic.adi@...il.com>,
	Grant Likely <grant.likely@...aro.org>,
	LKML <linux-kernel@...r.kernel.org>,
	adi-buildroot-devel@...ts.sourceforge.net,
	Sonic Zhang <sonic.zhang@...log.com>
Subject: Re: [PATCH v4] pinctrl: pinmux: Don't free pins requested by other
 devices in pinmux_disable_setting.

On 08/14/2013 10:27 AM, Linus Walleij wrote:
> On Wed, Aug 14, 2013 at 6:21 PM, Stephen Warren <swarren@...dotorg.org> wrote:
>> On 08/14/2013 09:54 AM, Linus Walleij wrote:
>>> On Wed, Aug 14, 2013 at 7:26 AM, Sonic Zhang <sonic.adi@...il.com> wrote:
>>>
>>>> From: Sonic Zhang <sonic.zhang@...log.com>
>>>>
>>>> One peripheral may share part of its pins with the 2nd
>>>> peripheral and the other pins with the 3rd. If it requests all pins
>>>> when part of them has already be requested and owned by the 2nd
>>>> peripheral, this request fails and pinmux_disable_setting() is called.
>>>> The pinmux_disable_setting() frees all pins of the first peripheral
>>>> without checking if the pin is owned by itself or the 2nd, which
>>>> results in the malfunction of the 2nd peripheral driver.
>>>>
>>>> Signed-off-by: Sonic Zhang <sonic.zhang@...log.com>
>>>
>>> Hm it makes some sense so patch applied.
>>>
>>> That said I think we currently have drivers where a pin group
>>> mapped to a certain function in a certain setting  *usually*
>>> don't overlap with pins in another group used with another
>>> function, and having it so seems racy, i.e. it will be some
>>> first-come-first-serve effect.
>>>
>>> I will add a warning print.
>>
>> Surely there's a warning print already when the enable_setting() fails,
>> so we don't need to do any more warning prints when the free_setting()
>> cleans up after that?
> 
> Now I'm confused ... I added debug prints to pinmux_disable_setting()
> which is where the patch hits? free_setting() is just an empty function
> body still.

I wrote the wrong function name; s/free_setting/disable_setting/ in what
I wrote.
--
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