Subject: patch for the thread leaks in sysinfo
From: Ghislain Adnet <gadnet@aqueos.com>
Date: Mon, 10 Dec 2018 18:12:59 +0100

hi,

  i have a little patch for the sysinfo thread number leak. Tell me what you think ok
it:

--- ../linux-4.9.135/kernel/sys.c       2018-10-21 11:45:32.308498677 +0200
+++ ./kernel/sys.c      2018-12-09 15:34:50.446725064 +0100
@@ -2339,7 +2339,8 @@ static int do_sysinfo(struct sysinfo *in

         get_avenrun(info->loads, 0, SI_LOAD_SHIFT - FSHIFT);

-       info->procs = nr_threads;
+       struct vx_info *vxi = current_vx_info();
+       info->procs = atomic_read(&vxi->cvirt.nr_threads);

         si_meminfo(info);
         si_swapinfo(info);


regards,
GHislain.