Add safety check that does not allow empty strings to be queued
to the devctl notification queue. Empty strings cause devctl read call to return 0 and result in devd exiting prematurely. The actual offender (ugen notes for root hubs) will be fixed by separate commit.
This commit is contained in:
parent
45260b3031
commit
ab12866f38
@ -532,6 +532,12 @@ devctl_queue_data(char *data)
|
||||
struct dev_event_info *n1 = NULL;
|
||||
struct proc *p;
|
||||
|
||||
/*
|
||||
* Do not allow empty strings to be queued, as they
|
||||
* cause devd to exit prematurely.
|
||||
*/
|
||||
if (strlen(data) == 0)
|
||||
return;
|
||||
n1 = malloc(sizeof(*n1), M_BUS, M_NOWAIT);
|
||||
if (n1 == NULL)
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user