linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bernard Metzler" <BMT@zurich.ibm.com>
To: "Jason Gunthorpe" <jgg@ziepe.ca>
Cc: "syzbot" <syzbot+55de90ab5f44172b0c90@syzkaller.appspotmail.com>,
	chuck.lever@oracle.com, dledford@redhat.com, leon@kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	netdev@vger.kernel.org, parav@mellanox.com,
	syzkaller-bugs@googlegroups.com, willy@infradead.org
Subject: Re: Re: possible deadlock in cma_netdev_callback
Date: Fri, 28 Feb 2020 13:05:53 +0000	[thread overview]
Message-ID: <OFF9E6CFC6.7E79459D-ON0025851C.00472582-0025851C.0047F357@notes.na.collabserv.com> (raw)
In-Reply-To: <20200227164622.GJ31668@ziepe.ca>

-----"Jason Gunthorpe" <jgg@ziepe.ca> wrote: -----

>To: "Bernard Metzler" <BMT@zurich.ibm.com>
>From: "Jason Gunthorpe" <jgg@ziepe.ca>
>Date: 02/27/2020 05:46PM
>Cc: "syzbot" <syzbot+55de90ab5f44172b0c90@syzkaller.appspotmail.com>,
>chuck.lever@oracle.com, dledford@redhat.com, leon@kernel.org,
>linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
>netdev@vger.kernel.org, parav@mellanox.com,
>syzkaller-bugs@googlegroups.com, willy@infradead.org
>Subject: [EXTERNAL] Re: possible deadlock in cma_netdev_callback
>
>On Thu, Feb 27, 2020 at 04:21:21PM +0000, Bernard Metzler wrote:
>> 
>> >To: "Bernard Metzler" <BMT@zurich.ibm.com>
>> >From: "Jason Gunthorpe" <jgg@ziepe.ca>
>> >Date: 02/27/2020 04:53PM
>> >Cc: "syzbot"
><syzbot+55de90ab5f44172b0c90@syzkaller.appspotmail.com>,
>> >chuck.lever@oracle.com, dledford@redhat.com, leon@kernel.org,
>> >linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
>> >netdev@vger.kernel.org, parav@mellanox.com,
>> >syzkaller-bugs@googlegroups.com, willy@infradead.org
>> >Subject: [EXTERNAL] Re: possible deadlock in cma_netdev_callback
>> >
>> >On Thu, Feb 27, 2020 at 10:11:13AM +0000, Bernard Metzler wrote:
>> >
>> >> Thanks for letting me know! Hmm, we cannot use RCU locks since
>> >> we potentially sleep. One solution would be to create a list
>> >> of matching interfaces while under lock, unlock and use that
>> >> list for calling siw_listen_address() (which may sleep),
>> >> right...?
>> >
>> >Why do you need to iterate over addresses anyhow? Shouldn't the
>> >listen
>> >just be done with the address the user gave and a BIND DEVICE to
>the
>> >device siw is connected to?
>> 
>> The user may give a wildcard local address, so we'd have
>> to bind to all addresses of that device...
>
>AFAIK a wild card bind using BIND DEVICE works just fine?
>
>Jason
>
Thanks Jason, absolutely! And it makes things so easy...

Let me prepare and send a patch which drops all that
jumbo mumbo logic to iterate over interface addresses
if the socket interface does the right things anyway.

It implies further simplifications to the siw connection
management, since with that we never have to maintain a
list of listening siw endpoints on a given cm_id; it will
always be max one. I'll cleanup the code accordingly and
prepare an extra cleanup patch, which I can send only
later (have a very tight schedule this week).

Bernard.


  parent reply	other threads:[~2020-02-28 13:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-26  5:39 possible deadlock in cma_netdev_callback syzbot
2020-02-26 20:42 ` Jason Gunthorpe
2020-02-27 10:11 ` Bernard Metzler
2020-02-27 15:53   ` Jason Gunthorpe
2020-02-27 16:21   ` Bernard Metzler
2020-02-27 16:46     ` Jason Gunthorpe
2020-02-28 13:05     ` Bernard Metzler [this message]
2020-02-28 13:35       ` Jason Gunthorpe
2020-02-28 16:42       ` Bernard Metzler
2020-02-28 16:49         ` Jason Gunthorpe

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=OFF9E6CFC6.7E79459D-ON0025851C.00472582-0025851C.0047F357@notes.na.collabserv.com \
    --to=bmt@zurich.ibm.com \
    --cc=chuck.lever@oracle.com \
    --cc=dledford@redhat.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=parav@mellanox.com \
    --cc=syzbot+55de90ab5f44172b0c90@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=willy@infradead.org \
    /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).