Actions
Bug #7414
closediptun leaks netstacks
Start date:
2016-09-27
Due date:
% Done:
100%
Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:
Description
The iptun driver leaks netstacks simply by creating them. You can see that while the create path grabs a hold on a netstack, the destroy / free path does not. In fact, in many cases, the error paths in the iptun_create() function will leak it. If we watch a zone's netstack count:
Before-create:
> fffffffffc00d9a0::print zone_t zone_netstack->netstack_refcnt zone_netstack->netstack_refcnt = 0x22
Post-create:
> fffffffffc00d9a0::print zone_t zone_netstack->netstack_refcnt zone_netstack->netstack_refcnt = 0x24
post-destroy:
> fffffffffc00d9a0::print zone_t zone_netstack->netstack_refcnt zone_netstack->netstack_refcnt = 0x23
Simply running dladm create-iptun -t ipv4 foo0 is sufficient.
Updated by Electric Monk over 5 years ago
- Status changed from New to Closed
git commit 854956ce2a18fd37e3f6160d38ffb87fdbc2edc4
commit 854956ce2a18fd37e3f6160d38ffb87fdbc2edc4 Author: Bryan Cantrill <bryan@joyent.com> Date: 2016-10-11T18:14:30.000Z 7413 netstack leaks lead to blind netstack reuse 7414 iptun leaks netstacks 7415 ipnet_promisc_add() leaks netstacks in error paths 7416 ill_lookup_on_ifindex_global_instance() could leak netstack ids Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com> Reviewed by: Robert Mustacchi <rm@joyent.com> Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Approved by: Dan McDonald <danmcd@omniti.com>
Actions