Re: [PATCH net v2] net: netrom: fix lock order inversion in nr_add_node, nr_del_node and nr_dec_obs
From: Mashiro Chen
Date: Fri Apr 10 2026 - 01:04:36 EST
On Mon, 6 Apr 2026 Jakub Kicinski wrote:
> Can we please merge nr_node_list_lock and nr_neigh_list_lock
> into one instead?
This makes more sense, thanks for the suggestion.
I'll rework the patch to merge the two locks into one and
repost next week.
On 4/10/26 10:54, Jakub Kicinski wrote:
On Mon, 6 Apr 2026 19:49:04 +0800 Mashiro Chen wrote:
nr_del_node() and nr_dec_obs() acquire nr_node_list_lock first, thenCan we please merge nr_node_list_lock and nr_neigh_list_lock
call nr_remove_neigh() which internally acquires nr_neigh_list_lock.
nr_add_node() acquires node_lock first, then calls nr_remove_neigh()
which acquires nr_neigh_list_lock.
into one instead?
Lets try to simplify this code as much as possible.
It's a maintenance nightmare and has fewer users than syzbot reports
(i'm not joking).