From: Jon Maloy <donmal...@gmail.com> Date: Mon, 26 Nov 2018 12:26:14 -0500
> We see the following lockdep warning: ... > The reason is that the node timer handler sometimes needs to delete a > node which has been disconnected for too long. To do this, it grabs > the lock 'node_list_lock', which may at the same time be held by the > generic node cleanup function, tipc_node_stop(), during module removal. > Since the latter is calling del_timer_sync() inside the same lock, we > have a potential deadlock. > > We fix this letting the timer cleanup function use spin_trylock() > instead of just spin_lock(), and when it fails to grab the lock it > just returns so that the timer handler can terminate its execution. > This is safe to do, since tipc_node_stop() anyway is about to > delete both the timer and the node instance. > > Fixes: 6a939f365bdb ("tipc: Auto removal of peer down node instance") > Acked-by: Ying Xue <ying....@windriver.com> > Signed-off-by: Jon Maloy <jon.ma...@ericsson.com> Applied and queued up for -stable, thanks Jon.