From: Sebastian Ott Date: Fri, 9 Oct 2015 09:07:06 +0000 (+0200) Subject: s390/pci: reshuffle struct used to write debug data X-Git-Tag: v4.14-rc1~4433^2~30 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7cc8944e13c73374b6f33b39ca24c0891c87b077;p=platform%2Fkernel%2Flinux-rpi.git s390/pci: reshuffle struct used to write debug data zpci_err_insn writes stale stack content to the debugfs. Ensure that the struct in zpci_err_insn is ordered in a way that we don't have uninitialized holes in it. In addition to that add the packed attribute. Fixes: 3d8258e (s390/pci: move debug messages to debugfs) Signed-off-by: Sebastian Ott Reviewed-by: Gerald Schaefer Signed-off-by: Martin Schwidefsky --- diff --git a/arch/s390/pci/pci_insn.c b/arch/s390/pci/pci_insn.c index dcc2634..10ca15d 100644 --- a/arch/s390/pci/pci_insn.c +++ b/arch/s390/pci/pci_insn.c @@ -16,11 +16,11 @@ static inline void zpci_err_insn(u8 cc, u8 status, u64 req, u64 offset) { struct { - u8 cc; - u8 status; u64 req; u64 offset; - } data = {cc, status, req, offset}; + u8 cc; + u8 status; + } __packed data = {req, offset, cc, status}; zpci_err_hex(&data, sizeof(data)); }