| skipped 177 lines |
178 | 178 | | |
179 | 179 | | static int kdat_x86_has_ptrace_fpu_xsave_bug_child(void *arg) |
180 | 180 | | { |
181 | | - | ptrace(PTRACE_TRACEME, 0, 0, 0); |
182 | | - | kill(getpid(), SIGSTOP); |
| 181 | + | if (ptrace(PTRACE_TRACEME, 0, 0, 0)) { |
| 182 | + | pr_perror("%d: ptrace(PTRACE_TRACEME) failed", getpid()); |
| 183 | + | _exit(1); |
| 184 | + | } |
| 185 | + | |
| 186 | + | if (kill(getpid(), SIGSTOP)) |
| 187 | + | pr_perror("%d: failed to kill myself", getpid()); |
| 188 | + | |
183 | 189 | | pr_err("Continue after SIGSTOP.. Urr what?\n"); |
184 | 190 | | _exit(1); |
185 | 191 | | } |
| skipped 57 lines |
243 | 249 | | ret = !xsave.i387.mxcsr; |
244 | 250 | | |
245 | 251 | | out_kill: |
246 | | - | kill(child, SIGKILL); |
247 | | - | waitpid(child, &stat, 0); |
| 252 | + | if (kill(child, SIGKILL)) |
| 253 | + | pr_perror("Failed to kill my own child"); |
| 254 | + | if (waitpid(child, &stat, 0) < 0) |
| 255 | + | pr_perror("Failed wait for a dead child"); |
| 256 | + | |
248 | 257 | | return ret; |
249 | 258 | | } |
250 | 259 | | |