From: David Miller <davem@davemloft.net>
To: donmalo99@gmail.com
Cc: netdev@vger.kernel.org, gordan.mihaljevic@dektech.com.au,
tung.q.nguyen@dektech.com.au, hoang.h.le@dektech.com.au,
jon.maloy@ericsson.com, maloy@donjonn.com, xinl@redhat.com,
ying.xue@windriver.com, tipc-discussion@lists.sourceforge.net
Subject: Re: [net 1/1] tipc: fix lockdep warning during node delete
Date: Tue, 27 Nov 2018 16:31:32 -0800 (PST) [thread overview]
Message-ID: <20181127.163132.16083522702492801.davem@davemloft.net> (raw)
In-Reply-To: <1543253174-5430-1-git-send-email-jon.maloy@ericsson.com>
From: Jon Maloy <donmalo99@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.xue@windriver.com>
> Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Applied and queued up for -stable, thanks Jon.
prev parent reply other threads:[~2018-11-28 11:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-26 17:26 [net 1/1] tipc: fix lockdep warning during node delete Jon Maloy
2018-11-28 0:31 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181127.163132.16083522702492801.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=donmalo99@gmail.com \
--cc=gordan.mihaljevic@dektech.com.au \
--cc=hoang.h.le@dektech.com.au \
--cc=jon.maloy@ericsson.com \
--cc=maloy@donjonn.com \
--cc=netdev@vger.kernel.org \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=tung.q.nguyen@dektech.com.au \
--cc=xinl@redhat.com \
--cc=ying.xue@windriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).