[dpdk-dev] [PATCH] kni: Passing task_pid_vnr(current) to get_net_ns_by_pid() in kni_ioctl_create()

Zhang, Helin helin.zhang at intel.com
Wed Jun 17 07:51:12 CEST 2015



> -----Original Message-----
> From: Wenfeng Liu [mailto:liuwf at arraynetworks.com.cn]
> Sent: Monday, June 15, 2015 12:08 PM
> To: Zhang, Helin; dev at dpdk.org
> Subject: [PATCH] kni: Passing task_pid_vnr(current) to get_net_ns_by_pid() in
> kni_ioctl_create()
> 
> In containers like docker, current->pid returns current process's global PID
> instead of its own PID under containers's PID namespace, and
> get_net_ns_by_pid() suppose to accept a virtual PID under its own namespace,
> so we should use task_pid_vnr(current) to get current process's virtual PID
> instead of current->pid.
> 
> Signed-off-by: Wenfeng Liu <liuwf at arraynetworks.com.cn>
Acked-by: Helin Zhang <helin.zhang at intel.com>


More information about the dev mailing list