From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.4 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1E63C35677 for ; Thu, 27 Feb 2020 16:46:25 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9898E2469F for ; Thu, 27 Feb 2020 16:46:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=ziepe.ca header.i=@ziepe.ca header.b="Bgg8JAo4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730546AbgB0QqY (ORCPT ); Thu, 27 Feb 2020 11:46:24 -0500 Received: from mail-qv1-f67.google.com ([209.85.219.67]:39714 "EHLO mail-qv1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730033AbgB0QqX (ORCPT ); Thu, 27 Feb 2020 11:46:23 -0500 Received: by mail-qv1-f67.google.com with SMTP id y8so1843247qvk.6 for ; Thu, 27 Feb 2020 08:46:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+39Zg09IW1UqskBXG22m/r+7Tun0l/AA6e5ypJPRWkM=; b=Bgg8JAo4Hi+CWH2DBZAX8yCbFJALWRDS9rPmNvtmTs4L+yM0hUNzQjmgpMV3DWGG5P JnZAVmWOefAbrhDhL0Z0TJL8eI6A0xyDqdPZ/eJ/jsRrRHujKy7PGCnmY5nfaHbUbT7f vR4UhSRyPyJTRlJNt3Sf+31FZie2TP1iKA2B2YFWTug5IrJtgcio/n91jcH5pgdfNcty V5reYAhoWxrlxv6cq82ulFH2d44sMeJvwo7unCZezGjA+Jw0pfvwo7aVCFBLa73GIYJZ hObIMgxqKUqruPR6xJEobp4kCtRSOtRvzp0i/4B2QRh3td2pUbj0T9Y0tw8Ep/aX6yCu fxEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+39Zg09IW1UqskBXG22m/r+7Tun0l/AA6e5ypJPRWkM=; b=lts6b1HjzKhC2+/kBQTHLmkuMaPmdD/E6Ateh0J4+x/Ty1cjhwq3r0F7XZyYZ8w7Lp tuIxj7+PuRR0WCynNrYAj0Uw8bcCJE3k+eJs0mzyuhndUhnWBOpc8v7Tiy8QCggJSzuE EuBwQQcWg/8jjcdYwddQXedXyPgSxuiWM0DeQiW4pNLt6o/GXP86HqlgDJLz6/llk61N qmg8CZoxrGtVeu9/U65PA3R1Sc8tefDhPmDxSjjEiLrV3vd5TP05/NFcSxFroRb9CUAL OSUUh/Gy43FgmpOAZj/yOaREEMIxfItpt2+cLhJoJT5n5xzqS2oJxgEGpCg78j0+m5WI mDYA== X-Gm-Message-State: APjAAAVViN/h+btqmNXGBiqEBz5ZeRIh1Tax0gEqEQfFzYmSCNgieYBK 5GdwWg+4c+ROT2M5IrAphrbMUg== X-Google-Smtp-Source: APXvYqwrHZYEIEuESwvmFkEWQhgGRxwXw41iGxF56msahSCCRfVrEFUbqncWow7/3rMzl4WgyhO+GQ== X-Received: by 2002:a0c:fa92:: with SMTP id o18mr615449qvn.125.1582821982930; Thu, 27 Feb 2020 08:46:22 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-68-57-212.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.68.57.212]) by smtp.gmail.com with ESMTPSA id p92sm3344990qtd.14.2020.02.27.08.46.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 27 Feb 2020 08:46:22 -0800 (PST) Received: from jgg by mlx.ziepe.ca with local (Exim 4.90_1) (envelope-from ) id 1j7MIo-0001k5-2a; Thu, 27 Feb 2020 12:46:22 -0400 Date: Thu, 27 Feb 2020 12:46:22 -0400 From: Jason Gunthorpe To: Bernard Metzler Cc: syzbot , 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: possible deadlock in cma_netdev_callback Message-ID: <20200227164622.GJ31668@ziepe.ca> References: <20200227155335.GI31668@ziepe.ca> <20200226204238.GC31668@ziepe.ca> <000000000000153fac059f740693@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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" , > >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