diff options
| author | Baek Kyu, Kim <pocj8ur4in@gmail.com> | 2026-10-18 13:44:56 +0900 |
|---|---|---|
| committer | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-10-20 14:56:05 +0200 |
| commit | 8381e1f15e27087fcb6f07046a526ac8b9b9b2b9 (patch) | |
| tree | 6f01faba690023c716ff3fd9bd4e6e56e325f62a /tools/perf/scripts/python | |
| parent | 974d2712cb15014019595799b3ed68fef5fe9695 (diff) | |
| download | lwn-8381e1f15e27087fcb6f07046a526ac8b9b9b2b9.tar.gz lwn-8381e1f15e27087fcb6f07046a526ac8b9b9b2b9.zip | |
gpiolib: Free chip resources when allocating the label fails
If desc_set_label() fails after the chip's request callback succeeds,
gpiod_request_commit() clears GPIOD_FLAG_REQUESTED without calling the
free callback. The caller receives an error and has no GPIO to release,
leaving resources acquired by the request callback held.
Call the chip's free callback, if present, before clearing the requested
bit on label allocation failure. Leave request callback errors on the
existing path to avoid freeing a failed request.
Cc: stable@vger.kernel.org
Fixes: 1f2bcb8c8ccd ("gpio: protect the descriptor label with SRCU")
Signed-off-by: Baek Kyu, Kim <pocj8ur4in@gmail.com>
Link: https://patch.msgid.link/20261018044456.1259250-1-pocj8ur4in@gmail.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions
