Skip to content

Commit

Permalink
xfrm interface: don't take extra reference to netdev
Browse files Browse the repository at this point in the history
I don't see any reason to do this. Maybe needed before
commit 56c5ee1 ("xfrm interface: fix memory leak on creation").

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
  • Loading branch information
Nicolas Dichtel authored and Steffen Klassert committed Apr 27, 2020
1 parent b6246f4 commit e62905a
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/xfrm/xfrm_interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit e62905a

Please sign in to comment.