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: <4F83ACB3.6010300@wwwdotorg.org>
Date:	Mon, 09 Apr 2012 21:44:51 -0600
From:	Stephen Warren <swarren@...dotorg.org>
To:	Dong Aisheng <aisheng.dong@...escale.com>
CC:	Dong Aisheng-B29396 <B29396@...escale.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>,
	"linus.walleij@...ricsson.com" <linus.walleij@...ricsson.com>
Subject: Re: [PATCH 1/1] pinctrl: add some error checking for user interfaces

On 04/09/2012 09:49 PM, Dong Aisheng wrote:
> On Mon, Apr 09, 2012 at 11:03:06PM +0800, Stephen Warren wrote:
>> On 04/09/2012 04:30 AM, Dong Aisheng wrote:
>>> From: Dong Aisheng <dong.aisheng@...aro.org>
>>>
>>> This patch can avoid kernel oops in case the mux or config
>>> function is not supported by driver.
...
>>>  static int pinconf_pins_show(struct seq_file *s, void *what)
>>>  {
>>>  	struct pinctrl_dev *pctldev = s->private;
>>> +	const struct pinconf_ops *ops = pctldev->desc->confops;
>>>  	unsigned i, pin;
>>>  
>>> +	if (!ops || !ops->pin_config_get)
>>> +		return 0;
>>
>> I don't think this is necessary; it looks like this function (and those
>> it calls) always checks ops where they're used.
>
> Yes, it's true.
> But it will still dump all pins configs although there's no config value
> which is almost the same as another debug entry 'pins'.
> It looks it does not make too much sense to dump this info if no config support.
> The existing pinconf_group_show did like this way(no output).
> So i changed pinconf_pins_show in the same behavior as pinconf_group_show.
> 
> Do you think it's reasonable?

OK, I guess so.

I was thinking the file wouldn't be compiled without pin config support,
but that's only the core support and doesn't necessarily imply the
individual driver has support.
--
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