Page MenuHomeFreeBSD

kern: dup: do not assume oldfde is valid
ClosedPublic

Authored by kevans on Nov 22 2020, 5:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 21, 4:01 AM
Unknown Object (File)
Wed, Jul 15, 3:07 AM
Unknown Object (File)
Mon, Jul 13, 6:03 AM
Unknown Object (File)
Thu, Jul 2, 11:16 AM
Unknown Object (File)
Mon, Jun 29, 10:07 AM
Unknown Object (File)
Jun 4 2026, 1:26 AM
Unknown Object (File)
May 16 2026, 9:00 PM
Unknown Object (File)
May 16 2026, 9:00 PM
Subscribers

Details

Summary

oldfde may be invalidated if the table has grown due to the operation that we're performing, either via fdalloc() or a direct fdgrowtable_exp().

This was technically OK before rS367927 because the old table remained valid until the filedesc became unused, but now it may be freed immediately if it's an unshared table in a single-threaded process, so it is no longer a good assumption to make.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 34959

Event Timeline

I can confirm this fixes the panic that I introduced in r367927.

This revision is now accepted and ready to land.Nov 22 2020, 10:38 PM
This revision was automatically updated to reflect the committed changes.