diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2020-09-15 15:58:16 +0300 |
---|---|---|
committer | Bartosz Golaszewski <bgolaszewski@baylibre.com> | 2020-09-17 13:03:37 +0300 |
commit | 5ad284ab3a01e2d6a89be2a8663ae76f4e617549 (patch) | |
tree | 42a4ed0dc765611cecc4fc00a2e54604d5965c60 /drivers/lightnvm | |
parent | 1b02d9e770cd7087f34c743f85ccf5ea8372b047 (diff) | |
download | linux-5ad284ab3a01e2d6a89be2a8663ae76f4e617549.tar.xz |
gpiolib: Fix line event handling in syscall compatible mode
The introduced line event handling ABI in the commit
61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
missed the fact that 64-bit kernel may serve for 32-bit applications.
In such case the very first check in the lineevent_read() will fail
due to alignment differences.
To workaround this introduce lineevent_get_size() helper which returns actual
size of the structure in user space.
Fixes: 61f922db7221 ("gpio: userspace ABI for reading GPIO line events")
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Tested-by: Kent Gibson <warthog618@gmail.com>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Diffstat (limited to 'drivers/lightnvm')
0 files changed, 0 insertions, 0 deletions