kni: fix ioctl in container
authorWenfeng Liu <liuwf@arraynetworks.com.cn>
Mon, 15 Jun 2015 04:07:33 +0000 (00:07 -0400)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Wed, 17 Jun 2015 13:16:44 +0000 (15:16 +0200)
commit790aa264bc34a07bbcc44465b79536fc0a3144b8
treea52bcea31e0490e21c11b40749c5cb539d4319b2
parent3c8aa16a89c52728e9110a8dfb9fa58588e9532d
kni: fix ioctl in container

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@arraynetworks.com.cn>
Acked-by: Helin Zhang <helin.zhang@intel.com>
lib/librte_eal/linuxapp/kni/kni_misc.c