Openwall GNU/*/Linux - a small security-enhanced Linux distro for servers
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 11 Apr 2018 03:44:33 +0000
From: Rasmus Villemoes <linux@...musvillemoes.dk>
To: Laura Abbott <labbott@...hat.com>
Cc: Linus Walleij <linus.walleij@...aro.org>, Kees Cook <keescook@...omium.org>, 
	Lukas Wunner <lukas@...ner.de>, linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org, 
	kernel-hardening@...ts.openwall.com
Subject: Re: [PATCHv4] gpio: Remove VLA from gpiolib

On Wed, Apr 11, 2018, 03:04 Laura Abbott <labbott@...hat.com> wrote:

>                 ret = gpio_chip_get_multiple(chip, mask, bits);
> -               if (ret)
> +               if (ret) {
> +                       /*
> +                        * Go against style and intentionally do the check
> for
> +                        * performance reasons
> +                        */
> +                       if (mask != fastpath)
> +                               kfree(mask);
>

Sorry, but that comment is now both unnecessary and actively wrong. You
can't kfree a stack array, so the check is  required, hence certainly not
against style :-)

Content of type "text/html" skipped

Powered by blists - more mailing lists

Your e-mail address:

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.