Hi, i noticed this small detail:
+ if (strcmp(params->script, "none")) {
+ pid = fork();
+ if (pid == 0) {
+ execl(params->script, params->script,
net_device.tap_name, NULL);
+ _exit(1);
+ } else {
+ waitpid(pid, &status, 0);
+ if (WIFEXITED(status) && WEXITSTATUS(status) != 0) {
+ warning("Fail to setup tap by %s",
params->script);
+ goto fail;
+ }
+ }
this path does not seem to have robust error handling: both fork() and
waitpid() can (and sometimes do) fail. If waitpid() fails then 'status' might
be ununitialized as well, IIRC.
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html