diff --git a/net/netlink/af_netlink.c b/net/netlink/af_netlink.c
index acbbae1e89b580cddd91f8d425052ca200540b43..274d977166b73289de7ffa96c16dfc700ac49929 100644
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -545,7 +545,7 @@ static int netlink_autobind(struct socket *sock)
 	struct hlist_head *head;
 	struct sock *osk;
 	struct hlist_node *node;
-	s32 pid = current->tgid;
+	s32 pid = task_tgid_vnr(current);
 	int err;
 	static s32 rover = -4097;