Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F111898161
D49273.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
709 B
Referenced Files
None
Subscribers
None
D49273.diff
View Options
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -1211,7 +1211,6 @@
static int
devclass_alloc_unit(devclass_t dc, device_t dev, int *unitp)
{
- device_t *devices;
const char *s;
int unit = *unitp;
@@ -1268,11 +1267,8 @@
int newsize;
newsize = unit + 1;
- devices = reallocf(dc->devices,
- newsize * sizeof(*dc->devices), M_BUS, M_NOWAIT);
- if (devices == NULL)
- return (ENOMEM);
- dc->devices = devices;
+ dc->devices = reallocf(dc->devices,
+ newsize * sizeof(*dc->devices), M_BUS, M_WAITOK);
memset(dc->devices + dc->maxunit, 0,
sizeof(device_t) * (newsize - dc->maxunit));
dc->maxunit = newsize;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 10, 11:45 PM (13 h, 36 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17039150
Default Alt Text
D49273.diff (709 B)
Attached To
Mode
D49273: devclass_alloc_unit: Go back to using M_WAITOK
Attached
Detach File
Event Timeline
Log In to Comment