summaryrefslogtreecommitdiff
path: root/rust/kernel/alloc/allocator
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2026-11-05 22:30:16 -0800
committerBartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>2026-11-09 10:25:03 +0100
commit51c85306270972f672737dc5e28332e2b41b26f1 (patch)
tree7c9f736ad4066bbe67261bd753a4f3fe6c8bf6b0 /rust/kernel/alloc/allocator
parentb2a161687acdc297aa91fec7fa0966b5aecf0d16 (diff)
gpiolib: fix fast-path cancellation in gpiod_get_array()
In gpiod_get_array(), when a pin on the same chip is not in hardware order and the preceding pins form a contiguous block, the fast path is cancelled by setting array_info to NULL. However, descs->info was already populated with the array_info pointer during the first iteration, leaving descs->info pointing to the aborted array_info. Consequently, subsequent array operations still use the fast path with remaining bits set in the masks and wrong hardware pin numbers. Clear descs->info alongside array_info when cancelling the fast path so callers do not erroneously use the aborted array_info. Fixes: c4c958aa64f3 ("gpiolib: Fix array members of same chip processed separately") Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20261105-b4-gpiolib-free-v3-2-bb47ad58642d@gmail.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'rust/kernel/alloc/allocator')
0 files changed, 0 insertions, 0 deletions