From: Sowmini Varadhan <sowmini.varadhan@oracle.com>
To: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, rds-devel@oss.oracle.com
Subject: Re: [PATCH net-next] rds: avoid lock hierarchy violation between m_rs_lock and rs_recv_lock
Date: Wed, 8 Aug 2018 18:18:11 -0400 [thread overview]
Message-ID: <20180808221811.GA16895@oracle.com> (raw)
In-Reply-To: <392e9286-e98c-1dbe-d598-9afca1818cf6@oracle.com>
On (08/08/18 14:51), Santosh Shilimkar wrote:
> This bug doesn't make sense since two different transports are using
> same socket (Loop and rds_tcp) and running together.
> For same transport, such race can't happen with MSG_ON_SOCK flag.
> CPU1-> rds_loop_inc_free
> CPU0 -> rds_tcp_cork ...
>
The test is just reporting a lock hierarchy violation
As far as I can tell, this wasn't an actual deadlock that happened
because as you point out, either a socket has the rds_tcp transport
or the rds_loop transport, so this particular pair of stack traces
would not happen with the code as it exists today.
but there is a valid lock hierachy violation here, and
imho it's a good idea to get that cleaned up.
It also avoids needlessly holding down the rs_recv_lock
when doing an rds_inc_put.
--Sowmini
next prev parent reply other threads:[~2018-08-09 0:39 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-08 20:57 [PATCH net-next] rds: avoid lock hierarchy violation between m_rs_lock and rs_recv_lock Sowmini Varadhan
2018-08-08 21:51 ` Santosh Shilimkar
2018-08-08 22:18 ` Sowmini Varadhan [this message]
2018-08-08 22:37 ` Santosh Shilimkar
2018-08-11 18:22 ` David Miller
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=20180808221811.GA16895@oracle.com \
--to=sowmini.varadhan@oracle.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=rds-devel@oss.oracle.com \
--cc=santosh.shilimkar@oracle.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).