diff options
author | Stewart Smith <stewart@linux.ibm.com> | 2019-06-03 17:55:15 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.ibm.com> | 2019-06-04 13:33:23 +1000 |
commit | 2d4c7f9886ee45f7c1db933885e5002b76c270ad (patch) | |
tree | b0ea683d6845687b59d4c452c704a993e2aaad3c /core | |
parent | a66f5a81000dd8efcdcae8f4a996e185d0701c49 (diff) | |
download | skiboot-2d4c7f9886ee45f7c1db933885e5002b76c270ad.zip skiboot-2d4c7f9886ee45f7c1db933885e5002b76c270ad.tar.gz skiboot-2d4c7f9886ee45f7c1db933885e5002b76c270ad.tar.bz2 |
core/cpu: Fix theoretical use-after-free if no_return job returns
Practically speaking this should/would never happen, but static analysis
caught it, and just *maybe* at some time in the future, someone will
have less of a terrible day debugging something terrible if we fix it.
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core')
-rw-r--r-- | core/cpu.c | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -361,8 +361,12 @@ void cpu_process_jobs(void) free(job); func(data); if (!list_empty(&cpu->locks_held)) { - prlog(PR_ERR, "OPAL job %s returning with locks held\n", - job->name); + if (no_return) + prlog(PR_ERR, "OPAL no-return job returned with" + "locks held!\n"); + else + prlog(PR_ERR, "OPAL job %s returning with locks held\n", + job->name); drop_my_locks(true); } lock(&cpu->job_lock); |