[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACRpkdZaokvYkk-giyxPyqpcYsvJdeKQt8EMCRcTPhs-_b83og@mail.gmail.com>
Date: Tue, 20 Jun 2017 09:12:34 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: Bartosz Golaszewski <brgl@...ev.pl>
Cc: Andy Shevchenko <andy.shevchenko@...il.com>,
Alexandre Courbot <gnurou@...il.com>,
Bamvor Jian Zhang <bamvor.zhangjian@...aro.org>,
"linux-gpio@...r.kernel.org" <linux-gpio@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v3 1/8] gpio: mockup: improve the debugfs input sanitization
On Fri, Jun 9, 2017 at 1:41 PM, Bartosz Golaszewski <brgl@...ev.pl> wrote:
> We're currently only checking the first character of the input to the
> debugfs event files, so a string like '0sdfdsf' is valid and indicates
> a falling edge event.
>
> Be more strict and only allow '0', '1', '0\n' & '1\n'.
>
> While we're at it: move the sanitization code before the irq_enabled
> check so that we indicate an error on invalid input even if nobody is
> waiting for events.
>
> Signed-off-by: Bartosz Golaszewski <brgl@...ev.pl>
Patch applied.
Yours,
Linus Walleij
Powered by blists - more mailing lists