[Bug 110284] [if_ethersubr] Invalid Assumption in SIOCSIFADDR in ether_ioctl()
[email protected] Mon, 08 Jun 2026 03:16:46 +0000
| Newsgroups | gmane.os.freebsd.devel.net |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=110284 --- Comment #8 from Zhenlei Huang <[email protected]> --- Note that, the `IFF_DRV_RUNNING ` flag is a driver managed flag. It should be read or written under driver managed lock. It is encouraged to handle the running state in the driver, typically the `ifp->if_init()` routine, rather than in the net stack. Many many drivers already have this ( similar ) logic in the init routine, ``` foo_init(sc) { foo_driver_lock(sc); foo_init_locked(sc); foo_driver_unlock(sc); } foo_init_locked(sc) { assert_foo_driver_locked(sc); if (ifp->if_drv_flags & IFF_DRV_RUNNING != 0) return; /* handle hw init */ .... /* ready */ ifp-> if_drv_flags |= IFF_DRV_RUNNING; } ``` So this patch is not relevant anymore. See also change https://cgit.freebsd.org/src/commit/?id=879773c18b50 which did the opposite to this patch. -- You are receiving this mail because: You are the assignee for the bug.