Date: Mon, 08 Jun 2026 03:16:46 +0000 From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 110284] [if_ethersubr] Invalid Assumption in SIOCSIFADDR in ether_ioctl() Message-ID: <bug-110284-7501-NufweNz2GW@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-110284-7501@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=110284 --- Comment #8 from Zhenlei Huang <zlei@FreeBSD.org> --- 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.home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-110284-7501-NufweNz2GW>
