Page MenuHomeFreeBSD

ipfilter: Don't reinitialize lock in timer function
Needs ReviewPublic

Authored by cy on Nov 12 2024, 3:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 9 2024, 1:40 PM
Unknown Object (File)
Nov 17 2024, 1:05 PM
Unknown Object (File)
Nov 13 2024, 12:10 PM
Unknown Object (File)
Nov 13 2024, 11:33 AM
Unknown Object (File)
Nov 13 2024, 9:14 AM
Unknown Object (File)
Nov 13 2024, 3:55 AM
Unknown Object (File)
Nov 13 2024, 3:40 AM

Details

Reviewers
markj
emaste
Summary

This is unnecessary and may result in a deadlock.

Fixes: 1fa6daaafd74

Test Plan

I will test on my firewall here at home.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

cy requested review of this revision.Nov 12 2024, 3:42 PM

This is not sufficient to fix the referenced commit, it'll still deadlock after this change.

The problem is that callout_init_rw() causes the callout framework to acquire the rwlock before executing the timeout function, and that timeout function will try to acquire it again.