diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2009-07-08 14:13:20 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2009-07-08 14:13:20 +0200 |
commit | a073cfa844e04010a2695f309b273c906ada271a (patch) | |
tree | 25c76165c846fded3d493980013afba91e34b8c9 /udev | |
parent | 871a36bd7e37a9d27e633b93ae0119a4553195ec (diff) |
udevd: detach event from worker if we kill a worker
Jul 8 09:36:41 udevd[663]: worker [5491] did not accept message, kill it
Jul 8 09:36:41 udevd[663]: worker [5491] unexpectedly returned with 0
Jul 8 09:36:41 udevd[663]: worker [5551] unexpectedly returned with 0
Jul 8 09:36:41 kernel: [ 156.832086] <6>udevd[663]: segfault at 4 ip 00959fbc sp bfbe7b78 error 6 in udevd[94f000+1c000]
https://bugs.launchpad.net/ubuntu/+source/udev/+bug/396957
Diffstat (limited to 'udev')
-rw-r--r-- | udev/udevd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/udev/udevd.c b/udev/udevd.c index b2e4a022c5..cfb8823f4c 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -328,8 +328,9 @@ static void event_run(struct event *event) event->state = EVENT_RUNNING; count = udev_monitor_send_device(monitor, worker->monitor, event->dev); if (count < 0) { - err(event->udev, "worker [%u] did not accept message, kill it\n", worker->pid); event->state = EVENT_QUEUED; + worker->event = NULL; + err(event->udev, "worker [%u] did not accept message %zi (%m), kill it\n", worker->pid, count); worker->state = WORKER_KILLED; kill(worker->pid, SIGKILL); continue; @@ -521,6 +522,9 @@ static void worker_returned(void) if (worker->pid != msg.pid) continue; + if (worker->state != WORKER_RUNNING) + break; + /* worker returned */ worker->event->exitcode = msg.exitcode; event_queue_delete(worker->event); |