[lkml]   [2020]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Re: possible deadlock in cma_netdev_callback
-----"Jason Gunthorpe" <> wrote: -----

>To: "Bernard Metzler" <>
>From: "Jason Gunthorpe" <>
>Date: 02/27/2020 05:46PM
>Cc: "syzbot" <>,
>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" <>
>> >From: "Jason Gunthorpe" <>
>> >Date: 02/27/2020 04:53PM
>> >Cc: "syzbot"
>> >,,,
>> >,,
>> >,,
>> >,
>> >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
>> >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?
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).


 \ /
  Last update: 2020-02-28 14:06    [W:0.082 / U:1.820 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site