Skip to content

Commit

Permalink
powerpc: Check RTAS extended log flag before checking length
Browse files Browse the repository at this point in the history
The spec suggests we should first check the extended log flag before checking
the length field.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
  • Loading branch information
Anton Blanchard authored and Benjamin Herrenschmidt committed Jan 21, 2011
1 parent d368514 commit 7f32c9c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/powerpc/kernel/rtasd.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7f32c9c

Please sign in to comment.