Re: [PATCH] rhashtable: Fix potential deadlock by moving schedule_work outside lock
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2025-01-10 10:07:25
Also in:
linux-hyperv, lkml
From: Herbert Xu <herbert@gondor.apana.org.au>
Date: 2025-01-10 10:07:25
Also in:
linux-hyperv, lkml
On Fri, Jan 10, 2025 at 01:49:44AM -0800, Breno Leitao wrote:
That is what I though originally as well, but I was not convinced. While reading the code, I understood that, if new_tbl is not NULL, then PTR_ERR(data) will be -ENOENT. In which case `net_tbl` will not be 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 [off-list ref] Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt