Date: Fri, 16 Jun 2017 07:59:31 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 220032] [if_alc] sys/dev/alc/if_alc.c: sleep-under-mutex bugs Message-ID: <bug-220032-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D220032 Bug ID: 220032 Summary: [if_alc] sys/dev/alc/if_alc.c: sleep-under-mutex bugs Product: Base System Version: 11.0-RELEASE Hardware: i386 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: baijiaju1990@163.com The alc driver may sleep under a mutex, and the function call paths in file "sys/dev/alc/if_alc.c" in FreeBSD 11.0 is: alc_resume [line 2648: acquire the mutex] alc_init_locked [line 2664] alc_init_rx_ring [line 3911] alc_newbuf [line 4469] bus_dmamap_load_mbuf_sg(BUS_DMA_WAITOK) [line 3472] --> may sleep alc_int_task [line 3330: acquire the mutex] alc_start_locked [line 3372] alc_encap [line 2942] bus_dmamap_load_mbuf_sg(BUS_DMA_WAITOK) [line 2780] --> may sleep The possible fix of these bugs is to set the last parameter in bus_dmamap_load_mbuf_sg to "BUS_DMA_NOWAIT". This bug is found by a static analysis tool written by myself, and it is checked by my review of the FreeBSD code. By the way, I am a freshman in developing FreeBSD drivers, and I am willing= to submit a patch. But I do not know how to write and submit a patch, and wher= e to submit, so I am looking forward to useful advice :) Jia-Ju Bai --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-220032-8>