s390/diag: fix display of diagnose call statistics
commit6c7c851f1b
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:1ec2772e0c
("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
453fb8b20d
commit
efb9e9f723
@ -84,7 +84,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)
|
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)
|
static void *show_diag_stat_next(struct seq_file *m, void *v, loff_t *pos)
|
||||||
|
Reference in New Issue
Block a user