File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -911,14 +911,14 @@ static struct {
911
911
.version = ATOMIC_INIT (0 ),
912
912
};
913
913
914
- static int ioem_get_pid_ns_inode_from_pid (unsigned int pid_nr , unsigned int * out )
914
+ static int ioem_get_pid_ns_inode_from_pid (unsigned int pid_nr , struct pid_namespace * pid_ns , unsigned int * out )
915
915
{
916
916
int ret = 0 ;
917
917
struct pid * pid ;
918
918
struct task_struct * task ;
919
919
struct pid_namespace * ns ;
920
920
921
- pid = find_vpid (pid_nr );
921
+ pid = find_pid_ns (pid_nr , pid_ns );
922
922
if (pid ) {
923
923
get_pid (pid );
924
924
} else {
@@ -976,14 +976,17 @@ int build_ioem_injection(unsigned long id, struct chaos_injection * injection)
976
976
977
977
ioem_injection -> arg .device = new_decode_dev (ioem_injection -> arg .device );
978
978
if (ioem_injection -> arg .pid_ns != 0 ) {
979
- unsigned int ns ;
979
+ unsigned int ns_inode ;
980
+ struct pid_namespace * pid_ns = get_pid_ns (task_active_pid_ns (current ));
981
+
982
+ ret = ioem_get_pid_ns_inode_from_pid (ioem_injection -> arg .pid_ns , pid_ns , & ns_inode );
983
+ put_pid_ns (pid_ns );
980
984
981
- ret = ioem_get_pid_ns_inode_from_pid (ioem_injection -> arg .pid_ns , & ns );
982
985
if (ret > 0 ) {
983
986
goto free_matcher_arg ;
984
987
}
985
988
986
- ioem_injection -> arg .pid_ns = ns ;
989
+ ioem_injection -> arg .pid_ns = ns_inode ;
987
990
}
988
991
989
992
ioem_injection -> injector_type = injection -> injector_type ;
You can’t perform that action at this time.
0 commit comments