in the "stop" logic for jabra-vold, it opens & blindly kills whatever pid is listed in there. if the daemon crashed or otherwise exited, there's no guarantee that the pid in there is still valid. another process might have started up and the kill would take it out.
granted, this is unlikely due to the uid/gid usage, but it's still possible.
the way to fix this would be to have the stop logic:
- chdir(/proc/$PID) to avoid race conditions
- read the exe symlink
- if the symlink points to jabra_vold, then the process is OK to kill
- for super sanity, also check the cmdline file and see if the usb bus/dev match
Comment 1 by h...@chromium.org
, Mar 7 2017Owner: ----