[Bug 252165] usb network and mii bus media status race condition

[email protected]
Newsgroups gmane.os.freebsd.devel.net
Message-ID <[email protected]/bugzilla/>
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252165

--- Comment #38 from Ali Abdallah <[email protected]> ---
(In reply to Ali Abdallah from comment #37)
The patch in comment 37 could be a bit optimized, yes! 

The usb process/request code is completely broken when it comes to different
threads sharing ue_lock (ioctl versus uether tick), the usb request code
releases the acquired lock, making ioctl thread waiting for the same lock to be
scheduled for execution, lovely!

To be more precise.

ioctly waiting for ue_lock, which is acquired by ue_tick, but then the tick
code will call at some point usbd_do_request_flags, which will release the lock
at the beginning (and then acquire it later), but in the meantime we have our
"cute" ioctl thread waken-up only to report wrong media_status value!

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.