NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

kern/58166: dead branches in tap(4) close/detach



>Number:         58166
>Category:       kern
>Synopsis:       dead branches in tap(4) close/detach
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Apr 17 18:30:01 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, ...
>Organization:
The TapBSD Foundation
>Environment:
>Description:
1. tap_dev_close never fails, should return void => caller branches are dead and should be pruned
2. tap_detach never fails so config_detach(dev, ...) never fails so tap_dev_destroyer can't fail => config_detach should be kasserted, caller branches are dead and should be pruned
3. access to sc->sc_dev is racy with config_detach => should maybe use device_acquire, under some appropriate lock, and config_detach_release; might need a list of tap files for each device to invalidate their sc_dev pointers
>How-To-Repeat:
code inspection
>Fix:
Yes, please!



Home | Main Index | Thread Index | Old Index