Skip to contentSkip to conversation

s390: channel measurement fix.

PATCH New Martin Schwidefsky 1 participant 1 message Jun 14, 2006

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 5/24 s390: channel measurement fix.

From: Cornelia Huck <[email protected]>

[S390] channel measurement fix.

Specify correct sizeof() in chp_measurement_read() and return correct amount of read data.

---

 drivers/s390/cio/chsc.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)
drivers/s390/cio/chsc.c +2 -1
diff -urpN linux-2.6/drivers/s390/cio/chsc.c linux-2.6-patched/drivers/s390/cio/chsc.c
@@ -918,12 +918,13 @@ chp_measurement_read(struct kobject *kob
 	chp = to_channelpath(container_of(kobj, struct device, kobj));
 	css = to_css(chp->dev.parent);
 
-	size = sizeof(struct cmg_chars);
+	size = sizeof(struct cmg_entry);
 
 	/* Only allow single reads. */
 	if (off || count < size)
 		return 0;
 	chp_measurement_copy_block((struct cmg_entry *)buf, css, chp->id);
+	count = size;
 	return count;
 }