Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e68129e6 authored by Michael Mueller's avatar Michael Mueller Committed by Greg Kroah-Hartman
Browse files

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: 1ec2772e ("s390/diag: add a statistic for diagnose calls")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarMichael Mueller <mimu@linux.ibm.com>
Reviewed-by: default avatarHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d1b6feb4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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)