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:	Tue, 14 Jun 2011 11:19:14 +0200
From:	Linus Walleij <linus.walleij@...aro.org>
To:	Joe Perches <joe@...ches.com>
Cc:	Linus Walleij <linus.walleij@...ricsson.com>,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	Grant Likely <grant.likely@...retlab.ca>,
	Lee Jones <lee.jones@...aro.org>,
	Martin Persson <martin.persson@...ricsson.com>,
	Stephen Warren <swarren@...dia.com>,
	Russell King <linux@....linux.org.uk>,
	Linaro Dev <linaro-dev@...ts.linaro.org>
Subject: Re: [PATCH 1/2] drivers: create a pinmux subsystem v3

Hi Joe,

thanks for the review, excellent as always.

I fixed all except the below pattern, also searched the source to make sure
there were no other cases of the same errors.

On Mon, Jun 13, 2011 at 8:11 PM, Joe Perches <joe@...ches.com> wrote:

>> +int pinctrl_register_pins_dense(struct pinctrl_pin_desc const *pins,
>> +                              unsigned num_descs, unsigned num_pins)
>> +{
>> +     int ret;
>> +     unsigned i;
>> +
>> +     ret = pinctrl_register_pins(pins, num_descs, num_pins);
>> +     if (ret) {
>> +             for (i = 0; i < num_pins; i++) {
>> +                     struct pin_desc *pindesc;
>> +
>> +                     spin_lock(&pin_desc_tree_lock);
>> +                     pindesc = radix_tree_lookup(&pin_desc_tree, i);
>> +                     if (pindesc != NULL) {
>> +                             radix_tree_delete(&pin_desc_tree, i);
>> +                             num_pins --;
>> +                     }
>> +                     spin_unlock(&pin_desc_tree_lock);
>> +                     kfree(pindesc);
>> +             }
>
> Second use of this pattern.  Maybe use pinctrl_free_pindescs?

It is quite different actually - in the second case here. we loop over a list
with holes, and we pick each one pin. We cannot loop over the entire
pin range because in this case we don't know the size of the range.

Thanks,
Linus Walleij
--
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