--- - branch: MAIN date: Sun Mar 6 09:03:42 UTC 2022 files: - new: '1.199' old: '1.198' path: src/sys/dev/usb/usb.c pathrev: src/sys/dev/usb/usb.c@1.199 type: modified id: 20220306T090342Z.029417aab104fa3c17143fe555311f6fc464bed9 log: | usb(4): Use atomics for usb_async_proc. This is written under proc_lock and read without it in usb_add_event, so using atomics pacifies the sanitizer. No memory ordering needed because the value isn't actually used until the softint runs, using it under proc_lock. Kind of a micro-optimization, but let's avoid contention on proc_lock in the common case of no usb_async_proc set up (why is this a system global, anyway? and why is there a softint if usb_add_event always runs at IPL_NONE?). Reported-by: syzbot+1b2fa68535e5b0f3dcaa@syzkaller.appspotmail.com module: src subject: 'CVS commit: src/sys/dev/usb' unixtime: '1646557422' user: riastradh