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



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