Commit c40e3201 authored by Pavel Emelyanov's avatar Pavel Emelyanov

rst: Open thread core images without -nocheck

These are image files that weren't yet opened, thus should be
opened with proper checks.
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 0cf8d1e1
...@@ -1644,7 +1644,7 @@ static int sigreturn_restore(pid_t pid, struct list_head *tgt_vmas, int nr_vmas) ...@@ -1644,7 +1644,7 @@ static int sigreturn_restore(pid_t pid, struct list_head *tgt_vmas, int nr_vmas)
continue; continue;
/* Core files are to be opened */ /* Core files are to be opened */
thread_args[i].fd_core = open_image_ro_nocheck(FMT_FNAME_CORE, thread_args[i].pid); thread_args[i].fd_core = open_image_ro(CR_FD_CORE, thread_args[i].pid);
if (thread_args[i].fd_core < 0) if (thread_args[i].fd_core < 0)
goto err; goto err;
......
...@@ -145,7 +145,6 @@ long restore_thread(struct thread_restore_args *args) ...@@ -145,7 +145,6 @@ long restore_thread(struct thread_restore_args *args)
core_entry = (struct core_entry *)&args->mem_zone.heap; core_entry = (struct core_entry *)&args->mem_zone.heap;
sys_lseek(args->fd_core, MAGIC_OFFSET, SEEK_SET);
ret = sys_read(args->fd_core, core_entry, sizeof(*core_entry)); ret = sys_read(args->fd_core, core_entry, sizeof(*core_entry));
if (ret != sizeof(*core_entry)) { if (ret != sizeof(*core_entry)) {
write_num_n(__LINE__); write_num_n(__LINE__);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment