[Devel] [PATCH rh7] ve/cpustat: don't try to update vcpustats for root_task_group

Vladimir Davydov vdavydov at virtuozzo.com
Wed Jun 22 06:03:08 PDT 2016


On Wed, Jun 22, 2016 at 03:59:05PM +0300, Andrey Ryabinin wrote:
> root_task_group doesn't have vcpu stats. Attempt to upate those leads
> to NULL-ptr deref:
> 
> 	BUG: unable to handle kernel NULL pointer dereference at           (null)
> 	IP: [<ffffffff810b440c>] cpu_cgroup_update_vcpustat+0x13c/0x620
> 	...
> 	Call Trace:
> 	 [<ffffffff810bee3b>] cpu_cgroup_get_stat+0x7b/0x180
> 	 [<ffffffff810f1ef7>] ve_get_cpu_stat+0x27/0x70
> 	 [<ffffffffa01836a1>] fill_cpu_stat+0x91/0x1e0 [vzmon]
> 	 [<ffffffffa0183c6b>] vzcalls_ioctl+0x2bb/0x430 [vzmon]
> 	 [<ffffffffa018d0d5>] vzctl_ioctl+0x45/0x60 [vzdev]
> 	 [<ffffffff8120cfb5>] do_vfs_ioctl+0x255/0x4f0
> 	 [<ffffffff8120d2a4>] SyS_ioctl+0x54/0xa0
> 	 [<ffffffff81642ac9>] system_call_fastpath+0x16/0x1b
> 
> So, return -ENOENT if we asked for vcpu stats of root_task_group.
> 
> https://jira.sw.ru/browse/PSBM-48721
> 
> Signed-off-by: Andrey Ryabinin <aryabinin at virtuozzo.com>

Reviewed-by: Vladimir Davydov <vdavydov at virtuozzo.com>


More information about the Devel mailing list