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

Commit 7f32c9c6 authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt
Browse files

powerpc: Check RTAS extended log flag before checking length



The spec suggests we should first check the extended log flag before checking
the length field.

Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent d368514c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -160,7 +160,7 @@ static int log_rtas_len(char * buf)
	/* rtas fixed header */
	len = 8;
	err = (struct rtas_error_log *)buf;
	if (err->extended_log_length) {
	if (err->extended && err->extended_log_length) {

		/* extended header */
		len += err->extended_log_length;