[vserver] patch for the thread leaks in sysinfo

From: Ghislain Adnet <gadnet_at_aqueos.com>
Date: Mon 10 Dec 2018 - 17:12:59 GMT
Message-ID: <99f5bc67-3789-d609-8960-3eaefa1336c9@aqueos.com>

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.
Received on Mon Dec 10 17:02:21 2018

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Mon 10 Dec 2018 - 17:02:21 GMT by hypermail 2.1.8