Page MenuHomeFreeBSD

ifnet: Defer detaching address family dependent data
Needs ReviewPublic

Authored by zlei on Fri, Mar 21, 3:12 PM.

Details

Reviewers
glebius
markj
Group Reviewers
network
Summary

While diagnosing PR 279653 and PR 285129, I observed that thread may
write to freed memory but the system do not crash. This hides the real
problem. A clear NULL pointer derefence is much better than writing to
freed memory.

PR: 279653
PR: 285129
MFC after: 2 weeks

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

sys/net/if.c
1022

according to the debug core I have both if_afdata_initialized and all of if_afdata was zeroed, see https://reviews.freebsd.org/D49212#1122671

sys/net/if.c
1022

according to the debug core I have both if_afdata_initialized and all of if_afdata was zeroed, see https://reviews.freebsd.org/D49212#1122671

It is also possible the writes from detaching thread is not global visible to other threads without proper sync. Then other threads may see stall data.

@markj Can the crash dump shows the cache status of different cores ?