summaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorMichael Mueller <mimu@linux.ibm.com>2020-03-03 18:42:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-04-24 09:00:44 +0300
commit63579acd788ec978591b345b5eaa55937116116b (patch)
tree5344ca491799e3984779d87be4ad1d4cc86ee8a6 /arch/s390
parentd1c7651d8b49d1e3a8ad824c2f191d9e9dffb441 (diff)
downloadlinux-63579acd788ec978591b345b5eaa55937116116b.tar.xz
s390/diag: fix display of diagnose call statistics
commit 6c7c851f1b666a8a455678a0b480b9162de86052 upstream. Show the full diag statistic table and not just parts of it. The issue surfaced in a KVM guest with a number of vcpus defined smaller than NR_DIAG_STAT. Fixes: 1ec2772e0c3c ("s390/diag: add a statistic for diagnose calls") Cc: stable@vger.kernel.org Signed-off-by: Michael Mueller <mimu@linux.ibm.com> Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/diag.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kernel/diag.c b/arch/s390/kernel/diag.c
index 53a5316cc4b7..35c842aa8705 100644
--- a/arch/s390/kernel/diag.c
+++ b/arch/s390/kernel/diag.c
@@ -79,7 +79,7 @@ static int show_diag_stat(struct seq_file *m, void *v)
static void *show_diag_stat_start(struct seq_file *m, loff_t *pos)
{
- return *pos <= nr_cpu_ids ? (void *)((unsigned long) *pos + 1) : NULL;
+ return *pos <= NR_DIAG_STAT ? (void *)((unsigned long) *pos + 1) : NULL;
}
static void *show_diag_stat_next(struct seq_file *m, void *v, loff_t *pos)