[PATCH 4/4] rhashtable: fix vmalloc() deadlock in atomic rehash

Matthew Wilcox willy at infradead.org
Thu Oct 29 13:02:32 PDT 2026


On Wed, Oct 28, 2026 at 11:42:18AM -0400, Liam R. Howlett (Google) wrote:
> Below, one CPU adds an FDB entry for an RTM_NEWNEIGH netlink request,
> while another CPU is inside vmalloc() or vfree():
> 
>     RTM_NEWNEIGH                      vmalloc() or vfree()
>     ============                      ====================
>     spin_lock_bh(&br->hash_lock)
>                                       spin_lock(&vn->busy.lock)
>     rhashtable_insert_rehash()
>       kvmalloc(GFP_ATOMIC)
>         vmalloc()
>           spin_lock(&vn->busy.lock)
>             waits for the other CPU
>                                       softirq: a frame for the bridge
>                                         spin_lock(&br->hash_lock)
>                                           waits for RTM_NEWNEIGH

This seems like the kind of deadlock that lockdep can catch.  Why
hasn't it?  Do we need to add a fake lock for RTM_NEWNEIGH?




More information about the maple-tree mailing list