[v2 PATCH] rhashtable: Fix rhashtable_try_insert test

2025-01-10 Thread Herbert Xu
: Michael Kelley Fixes: e1d3422c95f0 ("rhashtable: Fix potential deadlock by moving schedule_work outside lock") Signed-off-by: Herbert Xu diff --git a/lib/rhashtable.c b/lib/rhashtable.c index bf956b85455a..e36b36f3146d 100644 --- a/lib/rhashtable.c +++ b/lib/rhashtable.c @@ -611,17 +61

Re: [PATCH] rhashtable: Fix potential deadlock by moving schedule_work outside lock

2025-01-10 Thread Herbert Xu
NULL, and PTR_ERR(data) != -ENOENT? The bug arises when an insertion succeeds. So new_tbl is NULL. The original value of data should have been -ENOENT, however, it gets overwritten after rhashtable_insert_one (data is now NULL). Cheers, -- Email: Herbert Xu Home Page: http://gondor.apana.or

Re: [PATCH] rhashtable: Fix potential deadlock by moving schedule_work outside lock

2025-01-10 Thread Herbert Xu
variable data is redundant, and buggy because we will have overwritten the original value of data by this point. Reported-by: Michael Kelley Fixes: e1d3422c95f0 ("rhashtable: Fix potential deadlock by moving schedule_work outside lock") Signed-off-by: Herbert Xu diff --git a/lib/rhashtable