]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
tools/kvm_stat: fix debugfs handling
authorStefan Raspl <stefan.raspl@de.ibm.com>
Thu, 22 Feb 2018 11:16:24 +0000 (12:16 +0100)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Thu, 12 Apr 2018 13:26:55 +0000 (10:26 -0300)
commit642e8b3d0f0661413fba91782cf5c085feaef9c1
tree53cf0164a0ff215bdfb1c0e6e3c9acfbbe2dfc80
parenta7f8d253f7878f9b0c893a0ca139a8c11c830307
tools/kvm_stat: fix debugfs handling

BugLink: http://bugs.launchpad.net/bugs/1734130
Te checks for debugfs assumed that debugfs is always mounted at
/sys/kernel/debug - which is likely, but not guaranteed. This is addressed
by checking /proc/mounts for the actual location.
Furthermore, when debugfs was mounted, but the kvm module not loaded, a
misleading error pointing towards debugfs not present was given.
To reproduce,
(a) run kvm_stat with debugfs mounted at a place different from
    /sys/kernel/debug
(b) run kvm_stat with debugfs mounted but kvm module not loaded

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
(cherry picked from commit 1fd6a708c8438403dee17eb411cf81ffba13cf43)
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
tools/kvm/kvm_stat/kvm_stat