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=-1.0 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS autolearn=ham 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 48EF5C43381 for ; Tue, 26 Feb 2019 03:07:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0481B21841 for ; Tue, 26 Feb 2019 03:07:50 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=netronome-com.20150623.gappssmtp.com header.i=@netronome-com.20150623.gappssmtp.com header.b="b00gQWbV" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726185AbfBZDHs (ORCPT ); Mon, 25 Feb 2019 22:07:48 -0500 Received: from mail-qt1-f195.google.com ([209.85.160.195]:44901 "EHLO mail-qt1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726099AbfBZDHs (ORCPT ); Mon, 25 Feb 2019 22:07:48 -0500 Received: by mail-qt1-f195.google.com with SMTP id d2so13233443qti.11 for ; Mon, 25 Feb 2019 19:07:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netronome-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :organization:mime-version:content-transfer-encoding; bh=Hi+1AWnwD2hQvYb5jpSM5UbWWEwlWFBP/41miE1E5vc=; b=b00gQWbVpyUi2YK4r1jmoDI73WYApBBDARwyFeEFvqyz5qa/oqFzTQ/NJ7EAQDG7uv pwcTsQM395LhzfGwahAHglgMt0iU6m9ZsXiUFHIpDZN411rkxD6xO0RU/QGgszjCCa6p yqnJ7r4UP2+afy5hUeYzclxsAO5SD098wBk1/yarY/vRSzacNBB9zN26UwAs7FuINwwg aDYWxmKzP5Y/fb10pj6nmpVgZ01arBmuuU3/uyWNS2IoJzBh6CTDtCnPfmot+Bkbm0Y3 jejxsVdNjiuZ9zvE3KnbprgHIT49DqIoHn5qToNbGrQwqbQZg60Dz3G/PrTfVbrt+Cp6 6DfA== 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:in-reply-to :references:organization:mime-version:content-transfer-encoding; bh=Hi+1AWnwD2hQvYb5jpSM5UbWWEwlWFBP/41miE1E5vc=; b=PJuKiwaHwc5B1hArs+9Ok8clgCRN95wKBPpZJhKEV3359duKFoC58NTH9Bb/yZKjHo km80dEvZ37a3ewagzeAn/65muHEpi/km13m7cLDDHnMt/IjXsBETpv2ZFiE/leC3rgn8 ZqZrtCikDaphLdiso9QPXHBZihJ64Ji0wSAeiJI4OfjLbd8JW0fLCUXcXJN67x53zebp 6VSxmj/BeRRWG33KscsfXCism0ixOAbSVMFZqeWs5qYoQWXs9h1+5t2ejnrRjHMQnBwd LWxIY0uYROOh29DcKt16VybzUuQ+qmvUKKh7hDx/N4aegfLkT577GzyknhTfRQtXS5RU XiVg== X-Gm-Message-State: AHQUAuYPEW7VGhSXcKz9/Igaia8niWCutsEbMUHzrtM6Tojn6CejcCom UP3IveT9iGXC2/6HWRwxb5FFXsIIY+E= X-Google-Smtp-Source: AHgI3Iby8CGYm1p/saBLPJUqICtvVl67MlanRfv6YWPchyNwCqgb7if2nSHppP6HpI4KEb9Sqcn2rQ== X-Received: by 2002:ac8:1851:: with SMTP id n17mr638622qtk.42.1551150467520; Mon, 25 Feb 2019 19:07:47 -0800 (PST) Received: from cakuba.netronome.com ([66.60.152.14]) by smtp.gmail.com with ESMTPSA id o2sm8290193qtf.46.2019.02.25.19.07.46 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 25 Feb 2019 19:07:47 -0800 (PST) Date: Mon, 25 Feb 2019 19:07:40 -0800 From: Jakub Kicinski To: Jiri Pirko Cc: davem@davemloft.net, mkubecek@suse.cz, andrew@lunn.ch, f.fainelli@gmail.com, netdev@vger.kernel.org, oss-drivers@netronome.com Subject: Re: [PATCH net-next v3 5/6] devlink: hold a reference to the netdevice around ethtool compat Message-ID: <20190225190740.6eb29ea5@cakuba.netronome.com> In-Reply-To: <20190225103127.4f17f900@cakuba.netronome.com> References: <20190222220758.7117-1-jakub.kicinski@netronome.com> <20190222220758.7117-6-jakub.kicinski@netronome.com> <20190224110003.GI2759@nanopsycho.orion> <20190225103127.4f17f900@cakuba.netronome.com> Organization: Netronome Systems, Ltd. MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Mon, 25 Feb 2019 10:31:27 -0800, Jakub Kicinski wrote: > +static bool devlink_is_registered(struct devlink *devlink) > +{ > + return list_empty(&devlink->list); > +} Nevermind, this won't really help the drivers that much, those registering devlink after netdevs will have to take care of the potential race by marking the devlink instance as dead in their priv data structure from the thread doing the devlink_unregister, using their own locking.