mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 22:51:42 +00:00
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: Anton Blanchard <anton@samba.org> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
d368514c30
commit
7f32c9c600
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user