1
0
mirror of https://git.FreeBSD.org/src.git synced 2026-06-02 11:24:32 +00:00

net: bandaid for plugging a fw_com leak in fwip_detach()

Adding a temporary workaround for plugging a fw_com upon if_fwip unloading.

Steps to reproduce(needs two hosts connected with firewire):

  while true; do
    ifconfig fwip0 10.0.0.5 up
    fwcontrol -r
    ping -c 10.0.0.3
    kldunload if_fwip
  done

There's a chance that the unloading of if_fwip.ko triggers following warning:

	Warning: memory type fw_com leaked memory on destroy (1 allocations, 64 bytes leaked).

commit d79b6b8ec2 (origin/main, origin/HEAD)

(cherry picked from commit 25a5bb7318)
This commit is contained in:
Tai-hwa Liang
2024-02-15 01:00:49 +00:00
parent adf56b3107
commit 4f2925105e
+1
View File
@@ -801,6 +801,7 @@ firewire_ifdetach(struct ifnet *ifp)
{
bpfdetach(ifp);
if_detach(ifp);
NET_EPOCH_DRAIN_CALLBACKS();
}
void