NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/52331: ydc driver: sleep-under-spin-mutex bugs in yds_allocmem
The following reply was made to PR kern/52331; it has been noted by GNATS.
From: christos%zoulas.com@localhost (Christos Zoulas)
To: Jia-Ju Bai <baijiaju1990%163.com@localhost>, Robert Elz <kre%munnari.OZ.AU@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost,
gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: Re: kern/52331: ydc driver: sleep-under-spin-mutex bugs in yds_allocmem
Date: Sun, 25 Jun 2017 12:13:30 -0400
On Jun 25, 9:14pm, baijiaju1990%163.com@localhost (Jia-Ju Bai) wrote:
-- Subject: Re: kern/52331: ydc driver: sleep-under-spin-mutex bugs in yds_al
| Thanks for your reply and detailed analysis :)
|
| From your words, I can see that "if (KERNADDR(p) == NULL)" is always
| not satisfied at runtime, is it?
| If it is, I think it is okay to remove the code (including yds_allocmem)
| of this if condition.
I fixed it a bit differently before reading this message. Since the spin
mutex is only used to protect interrupts, and the init function is not
called with the mutex held during attach, I made the init call from resume
not called with the spin mutex held, and protected the interrupt with
sc_enabled.
christos
Home |
Main Index |
Thread Index |
Old Index