uti: Allow tracer to call release_handler() for the main process
Change-Id: I934a6eefbcb87473e87c109d6b4d32c7ab486894
This commit is contained in:
@ -335,7 +335,7 @@ static long mcexec_debug_log(ihk_os_t os, unsigned long arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mcexec_close_exec(ihk_os_t os);
|
int mcexec_close_exec(ihk_os_t os, int pid);
|
||||||
int mcexec_destroy_per_process_data(ihk_os_t os, int pid);
|
int mcexec_destroy_per_process_data(ihk_os_t os, int pid);
|
||||||
|
|
||||||
static void release_handler(ihk_os_t os, void *param)
|
static void release_handler(ihk_os_t os, void *param)
|
||||||
@ -355,7 +355,7 @@ static void release_handler(ihk_os_t os, void *param)
|
|||||||
}
|
}
|
||||||
write_unlock_irqrestore(&host_thread_lock, flags);
|
write_unlock_irqrestore(&host_thread_lock, flags);
|
||||||
|
|
||||||
mcexec_close_exec(os);
|
mcexec_close_exec(os, info->pid);
|
||||||
|
|
||||||
mcexec_destroy_per_process_data(os, info->pid);
|
mcexec_destroy_per_process_data(os, info->pid);
|
||||||
|
|
||||||
@ -1912,7 +1912,7 @@ out:
|
|||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
int mcexec_close_exec(ihk_os_t os)
|
int mcexec_close_exec(ihk_os_t os, int pid)
|
||||||
{
|
{
|
||||||
struct mckernel_exec_file *mcef = NULL;
|
struct mckernel_exec_file *mcef = NULL;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
@ -1924,7 +1924,7 @@ int mcexec_close_exec(ihk_os_t os)
|
|||||||
|
|
||||||
down(&mckernel_exec_file_lock);
|
down(&mckernel_exec_file_lock);
|
||||||
list_for_each_entry(mcef, &mckernel_exec_files, list) {
|
list_for_each_entry(mcef, &mckernel_exec_files, list) {
|
||||||
if (mcef->os == os && mcef->pid == task_tgid_vnr(current)) {
|
if (mcef->os == os && mcef->pid == pid) {
|
||||||
allow_write_access(mcef->fp);
|
allow_write_access(mcef->fp);
|
||||||
fput(mcef->fp);
|
fput(mcef->fp);
|
||||||
list_del(&mcef->list);
|
list_del(&mcef->list);
|
||||||
@ -3075,7 +3075,7 @@ long __mcctrl_control(ihk_os_t os, unsigned int req, unsigned long arg,
|
|||||||
return mcexec_open_exec(os, (char *)arg);
|
return mcexec_open_exec(os, (char *)arg);
|
||||||
|
|
||||||
case MCEXEC_UP_CLOSE_EXEC:
|
case MCEXEC_UP_CLOSE_EXEC:
|
||||||
return mcexec_close_exec(os);
|
return mcexec_close_exec(os, task_tgid_vnr(current));
|
||||||
|
|
||||||
case MCEXEC_UP_PREPARE_DMA:
|
case MCEXEC_UP_PREPARE_DMA:
|
||||||
return mcexec_pin_region(os, (unsigned long *)arg);
|
return mcexec_pin_region(os, (unsigned long *)arg);
|
||||||
|
|||||||
Reference in New Issue
Block a user