diff options
author | Bartosz Golaszewski <brgl@bgdev.pl> | 2017-06-09 13:41:25 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-06-20 09:18:33 +0200 |
commit | 6f9b3e776d171636ccafbcb39a8210b4fa37136b (patch) | |
tree | 7a600dde36983da45a92aa5c1bfe573652e9647d /scripts | |
parent | b6730b20837e7402292d35d3cb910fff4dac7099 (diff) | |
download | linux-6f9b3e776d171636ccafbcb39a8210b4fa37136b.tar.gz linux-6f9b3e776d171636ccafbcb39a8210b4fa37136b.tar.bz2 linux-6f9b3e776d171636ccafbcb39a8210b4fa37136b.zip |
gpio: mockup: improve the debugfs input sanitization
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@bgdev.pl>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions