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

Commit 7cc8944e authored by Sebastian Ott's avatar Sebastian Ott Committed by Martin Schwidefsky
Browse files

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: 3d8258e4 (s390/pci: move debug messages to debugfs)
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: default avatarGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 48002bd5
Loading
Loading
Loading
Loading
+3 −3
Original line number Original line Diff line number Diff line
@@ -16,11 +16,11 @@
static inline void zpci_err_insn(u8 cc, u8 status, u64 req, u64 offset)
static inline void zpci_err_insn(u8 cc, u8 status, u64 req, u64 offset)
{
{
	struct {
	struct {
		u8 cc;
		u8 status;
		u64 req;
		u64 req;
		u64 offset;
		u64 offset;
	} data = {cc, status, req, offset};
		u8 cc;
		u8 status;
	} __packed data = {req, offset, cc, status};


	zpci_err_hex(&data, sizeof(data));
	zpci_err_hex(&data, sizeof(data));
}
}