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: Robert Elz <kre%munnari.OZ.AU@localhost>
To: Jia-Ju Bai <baijiaju1990%163.com@localhost>
Cc: gnats-bugs%NetBSD.org@localhost, kern-bug-people%netbsd.org@localhost
Subject: Re: kern/52331: ydc driver: sleep-under-spin-mutex bugs in yds_allocmem
Date: Sun, 25 Jun 2017 21:08:33 +0700
Date: Sun, 25 Jun 2017 21:14:19 +0800
From: Jia-Ju Bai <baijiaju1990%163.com@localhost>
Message-ID: <594FB72B.4050202%163.com@localhost>
| From your words, I can see that "if (KERNADDR(p) == NULL)" is always
| not satisfied at runtime, is it?
That happens (KERNADDR(p) == NULL) when yds_init() is called the first
time from yds_attach(). That time no resources are yet allocated, and
yds_allocmem() needs to allocate them.
But that call is not from a context where sleeping is not allowed.
| If it is, I think it is okay to remove the code (including yds_allocmem)
| of this if condition.
So, no, the code is still needed, it is called, just not in the case of
concern (I think, we need to wait and see what nat@ says about just
how audio.c might influence things.)
kre
Home |
Main Index |
Thread Index |
Old Index