diff options
| author | 2026-04-28 18:14:19 +0200 | |
|---|---|---|
| committer | 2026-05-05 16:12:07 +0800 | |
| commit | d1fa83ecac31093a550534a79a33bc7f4ba8fc10 (patch) | |
| tree | 53e406c8ac9c7396ddca3ab02b0ada5d8d4bc73a /tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com | |
| parent | mm/slab: Add kvfree_atomic() helper (diff) | |
rhashtable: Add bucket_table_free_atomic() helper
rhashtable_insert_rehash() allocates a new bucket table
with GFP_ATOMIC, as it is called from an RCU read-side
critical section.
If rhashtable_rehash_attach() then fails, the new table
is freed via kvfree(). This is unsafe, since kvfree() may
fall back to vfree() for vmalloc-backed allocations, which
can sleep and trigger:
BUG: sleeping function called from invalid context
Add bucket_table_free_atomic(), which uses kvfree_atomic()
so the table can be freed safely from non-sleeping context.
Signed-off-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'tools/testing/selftests/dm-verity/git:/ssh:/git@git.zx2c4.com')
0 files changed, 0 insertions, 0 deletions
