Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp51041pxa; Tue, 4 Aug 2020 16:14:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzo59Wn7rqcHU8CbfT+cEQoBm3EQHDi1VAmjb0B+ZC0aWcC4qX9KNRMwmwYkGVQk7o4x6WV X-Received: by 2002:a17:906:b294:: with SMTP id q20mr428975ejz.223.1596582888210; Tue, 04 Aug 2020 16:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596582888; cv=none; d=google.com; s=arc-20160816; b=uxBHuT+leAy5DB1O9ecNLwmPhJtDiSV/A0w+L6qgURPK6O55JHQPmNjlGns2NR+LDH bMTUBVaX2yo4dFfDJzT/8usctHANxo7dlU4ZoZ8l3UzuVAeP/t6VzojtpOtc2/ZXu1rd 2/JpJ/ttyx2cz14XZYq+wgR2eB9+ZO7dRyxKALTCObCbhdCbBB12vUuyH4I7ddG2/5+H 9CuzYVfeSvrLsbpwMY68W5VvdtqOaXacnDDa6h9OCvOutZDlXRx72G7y0161EScwvCuI NLUP2fSGpUCX8l5VooS2JKRB3T/BlxqqVJWNo+7JTaCV0uDa0cILlQy1TWvSzTbInQTi JgAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:from:subject:cc:to:message-id:date; bh=VMJsiJFvDSPipsRat2nvUxv01o+96WPfnbFpL7G8q5Y=; b=VXIYd45wAtmlI14rkzr6uNKocDqsZr81UrEIKeiuvD4+biwC1WikLkvNgbzdPGGtSq LegqDcm+Z6uxHmh18ZzZlfcmQ2RtsLv/Gh+zX6eO/hBqcMr6PzVaM/D5tk6kCA1OB5FZ DL022V8Wz34slmLbvbbEnEAule92mjgnQ/NcgtBeCyg+KejR7QfKYthxGBKyrqqknvlI mvAtkOry+lSxrscGqM6KkWgwJOUd+w1UEBTDD4s7SuqwiQGLQ7gmSbz3yhoMr59BoYCh ehyLo31lvOXFZHmCH9D56A9/gHu4rzQ+4o5O0IQbAMHh1lHVX3vZ6oWu4ru8xZDMTC5+ O55A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n19si143301ejc.243.2020.08.04.16.14.24; Tue, 04 Aug 2020 16:14:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727856AbgHDXOQ (ORCPT + 99 others); Tue, 4 Aug 2020 19:14:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727045AbgHDXOQ (ORCPT ); Tue, 4 Aug 2020 19:14:16 -0400 Received: from shards.monkeyblade.net (shards.monkeyblade.net [IPv6:2620:137:e000::1:9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79419C06174A; Tue, 4 Aug 2020 16:14:16 -0700 (PDT) Received: from localhost (unknown [IPv6:2601:601:9f00:477::3d5]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) (Authenticated sender: davem-davemloft) by shards.monkeyblade.net (Postfix) with ESMTPSA id DC56E12896E76; Tue, 4 Aug 2020 15:57:29 -0700 (PDT) Date: Tue, 04 Aug 2020 16:14:14 -0700 (PDT) Message-Id: <20200804.161414.149428114422381017.davem@davemloft.net> To: izabela.bakollari@gmail.com Cc: nhorman@tuxdriver.com, kuba@kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org Subject: Re: [PATCHv2 net-next] dropwatch: Support monitoring of dropped frames From: David Miller In-Reply-To: <20200804160908.46193-1-izabela.bakollari@gmail.com> References: <20200707171515.110818-1-izabela.bakollari@gmail.com> <20200804160908.46193-1-izabela.bakollari@gmail.com> X-Mailer: Mew version 6.8 on Emacs 26.3 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Tue, 04 Aug 2020 15:57:30 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: izabela.bakollari@gmail.com Date: Tue, 4 Aug 2020 18:09:08 +0200 > @@ -1315,6 +1334,53 @@ static int net_dm_cmd_trace(struct sk_buff *skb, > return -EOPNOTSUPP; > } > > +static int net_dm_interface_start(struct net *net, const char *ifname) > +{ > + struct net_device *nd = dev_get_by_name(net, ifname); > + > + if (nd) > + interface = nd; > + else > + return -ENODEV; > + > + return 0; > +} > + > +static int net_dm_interface_stop(struct net *net, const char *ifname) > +{ > + dev_put(interface); > + interface = NULL; > + > + return 0; > +} Where is the netdev notifier that will drop this reference if the network device is unregistered?