aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc
diff options
context:
space:
mode:
authorAnton Blanchard <anton@samba.org>2011-01-11 19:51:31 +0000
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2011-01-21 14:08:38 +1100
commit7f32c9c60089bfdb5eeeaae6e9f59046db998234 (patch)
treeaddedd0786354bcebbc5f391d2900fac98339407 /arch/powerpc
parentd368514c3097a48a109b6ba64e12047106c7473d (diff)
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/kernel/rtasd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kernel/rtasd.c b/arch/powerpc/kernel/rtasd.c
index 0438f819fe6..049dbecb5db 100644
--- a/arch/powerpc/kernel/rtasd.c
+++ b/arch/powerpc/kernel/rtasd.c
@@ -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;