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]
Message-ID: <CACRpkdYmfB6vaM=tFqsZO24_Rah8sFmnriHd-FT+RvPK=xxEnw@mail.gmail.com>
Date:   Wed, 28 Dec 2016 14:13:16 +0100
From:   Linus Walleij <linus.walleij@...aro.org>
To:     Bartosz Golaszewski <bgolaszewski@...libre.com>
Cc:     Bamvor Jian Zhang <bamvor.zhangjian@...aro.org>,
        Alexandre Courbot <gnurou@...il.com>,
        "linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] gpio: mockup: dynamically allocate memory for chip name

On Tue, Dec 20, 2016 at 12:28 PM, Bartosz Golaszewski
<bgolaszewski@...libre.com> wrote:

> Currently the chip name buffer is allocated on the stack and the
> address of the buffer is passed to the gpio framework. It's invalid
> after probe() returns, so the sysfs label attribute displays garbage.
>
> Use devm_kasprintf() for each string instead.
>
> Signed-off-by: Bartosz Golaszewski <bgolaszewski@...libre.com>

Patch applied.

Yours,
Linus Walleij

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ