lib/idr: Fixes for infinite loop and memory leak
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v3 Latest2 patches 3 repliesIn review
- v21 patch 2 repliesSuperseded
- v11 patch 0 repliesSuperseded
Changes in v3 from the cover letter
- Added idr-test.c updates to both commits to formally test the fix conditions.
Patches in v3 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | lib/idr: fix infinite loop in idr_get_next()lib/ tools/ | +4 | 3 replies | |
| 2/2 | lib/idr: fix memory leak in ida_alloc_range() error pathtools/ | +17 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.
Cover letter [PATCH v3 0/2] lib/idr: Fixes for infinite loop and memory leak
This series includes two fixes for the IDR and IDA APIs, along with their corresponding test cases as requested by reviewers.
1. Fix an infinite loop condition in idr_get_next() that occurs when iterating over an ID > INT_MAX.
2. Fix a memory leak in ida_alloc_range() where an intermediate allocated bitmap is not freed if a subsequent XArray insertion fails.
Both fixes update tools/testing/radix-tree/idr-test.c to ensure the error paths are covered by the test suite.
Changes since v2:
- Added idr-test.c updates to both commits to formally test the fix conditions.
Josh Law (2):
lib/idr: fix infinite loop in idr_get_next() lib/idr: fix memory leak in ida_alloc_range() error path
lib/idr.c | 4 +++- tools/testing/radix-tree/idr-test.c | 19 ++++++++++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-)
Signature · 1 line
2.34.1