From patchwork Thu Apr 23 09:39:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nicolas Dichtel X-Patchwork-Id: 220705 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=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 A6C56C55186 for ; Thu, 23 Apr 2020 09:39:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 870AC214AF for ; Thu, 23 Apr 2020 09:39:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726936AbgDWJj0 (ORCPT ); Thu, 23 Apr 2020 05:39:26 -0400 Received: from host.76.145.23.62.rev.coltfrance.com ([62.23.145.76]:33087 "EHLO proxy.6wind.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726661AbgDWJj0 (ORCPT ); Thu, 23 Apr 2020 05:39:26 -0400 Received: from bretzel.dev.6wind.com (unknown [10.16.0.19]) by proxy.6wind.com (Postfix) with ESMTPS id E6A8B3E240F; Thu, 23 Apr 2020 11:39:23 +0200 (CEST) Received: from dichtel by bretzel.dev.6wind.com with local (Exim 4.92) (envelope-from ) id 1jRYKJ-0006Fn-SB; Thu, 23 Apr 2020 11:39:23 +0200 From: Nicolas Dichtel To: steffen.klassert@secunet.com Cc: netdev@vger.kernel.org, Nicolas Dichtel Subject: [PATCH ipsec-next] xfrm interface: don't take extra reference to netdev Date: Thu, 23 Apr 2020 11:39:20 +0200 Message-Id: <20200423093920.23962-1-nicolas.dichtel@6wind.com> X-Mailer: git-send-email 2.24.0 MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org I don't see any reason to do this. Maybe needed before commit 56c5ee1a5823 ("xfrm interface: fix memory leak on creation"). Signed-off-by: Nicolas Dichtel --- net/xfrm/xfrm_interface.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/net/xfrm/xfrm_interface.c b/net/xfrm/xfrm_interface.c index 3361e3ac5714..eb9928c0a87c 100644 --- a/net/xfrm/xfrm_interface.c +++ b/net/xfrm/xfrm_interface.c @@ -145,7 +145,6 @@ static int xfrmi_create(struct net_device *dev) if (err < 0) goto out; - dev_hold(dev); xfrmi_link(xfrmn, xi); return 0; @@ -175,7 +174,6 @@ static void xfrmi_dev_uninit(struct net_device *dev) struct xfrmi_net *xfrmn = net_generic(xi->net, xfrmi_net_id); xfrmi_unlink(xfrmn, xi); - dev_put(dev); } static void xfrmi_scrub_packet(struct sk_buff *skb, bool xnet)