[Bug 252165] usb network and mii bus media status race condition
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Nov 2024 18:01:05 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=252165 --- Comment #36 from Ali Abdallah <ali.abdallah@suse.com> --- (In reply to Hans Petter Selasky from comment #26) The issue is that ioctl thread to get the media status, which basically started by userspace races with ue_tick_task. And I finally know why. The usbd_do_request_flags called releases the lock and then later acquire it (see the code). So, an ioctl waiting on the same lock will be executed together with ue_tick_task (because they aren't executed from the same thread), causing the race observed here and basically breaking all usb ethernet devices. I will shortly attach a patch to Sync ioctl/tick media status changes. -- You are receiving this mail because: You are the assignee for the bug.