RFC mm/damon: allow NULL or unstarted damon_ctx parameter for damon_call()
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest4 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | mm/damon/core: handle NULL ctx parameter in damon_call()mm/ | +2 | 4 replies | |
| 2/4 | mm/damon/core: set ctx->call_controls_obsolete in damon_new_ctx()mm/ | +1 | 1 reply | |
| 3/4 | mm/damon/reclaim: remove unnecessary damon_call() param validationmm/ | +0 | 1 reply | |
| 4/4 | mm/damon/lru_sort: remove unnecessary damon_call() param validationmm/ | +0 | 1 reply |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [RFC PATCH 0/4] mm/damon: allow NULL or unstarted damon_ctx parameter for damon_call()
Callers of damon_call() should validate the damon_ctx object parameter. If it is NULL or never damon_start()-ed object, damon_call() could dereference the NULL pointer or indefinitely hang. Ensuring all callers doing the validation correctly has turned out to be difficult. Handle the corner cases inside the core layer and remove callers' validations.
Patches 1 and 2 respectively allow passing NULL and not yet damon_start()-ed ctx parameter to damon_call(). Patches 3 and 4 remove the callers side validations in DMON_RECLAIM and DASMON_LRU_SORT, respectively.
SJ Park (4):
mm/damon/core: handle NULL ctx parameter in damon_call() mm/damon/core: set ctx->call_controls_obsolete in damon_new_ctx() mm/damon/reclaim: remove unnecessary damon_call() param validation mm/damon/lru_sort: remove unnecessary damon_call() param validation
mm/damon/core.c | 7 +++---- mm/damon/lru_sort.c | 8 -------- mm/damon/reclaim.c | 8 -------- 3 files changed, 3 insertions(+), 20 deletions(-)
base-commit: c8520e181a2aaf85290d0447656de0df112dbbea
Signature · 1 line
2.47.3