diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-12 18:01:31 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-12 18:55:44 -0400 |
commit | 7d4ee289d139d27b619c08c9809e7b1088c100aa (patch) | |
tree | b69eeae574a3888517ade9dfacd1813aa5b58b0e /arch/sparc64/kernel | |
parent | 80a56ab626c70468be92e74cf3d288ffaed23fdb (diff) |
sparc: Fix user_regset 'n' field values.
As noticed by Russell King, we were not setting this properly
to the number of entries, but rather the total size.
This results in the core dumping code allocating waayyyy too
much memory.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel')
-rw-r--r-- | arch/sparc64/kernel/ptrace.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/sparc64/kernel/ptrace.c b/arch/sparc64/kernel/ptrace.c index bd578cc4856d..10306e476e38 100644 --- a/arch/sparc64/kernel/ptrace.c +++ b/arch/sparc64/kernel/ptrace.c | |||
@@ -443,7 +443,7 @@ static const struct user_regset sparc64_regsets[] = { | |||
443 | */ | 443 | */ |
444 | [REGSET_GENERAL] = { | 444 | [REGSET_GENERAL] = { |
445 | .core_note_type = NT_PRSTATUS, | 445 | .core_note_type = NT_PRSTATUS, |
446 | .n = 36 * sizeof(u64), | 446 | .n = 36, |
447 | .size = sizeof(u64), .align = sizeof(u64), | 447 | .size = sizeof(u64), .align = sizeof(u64), |
448 | .get = genregs64_get, .set = genregs64_set | 448 | .get = genregs64_get, .set = genregs64_set |
449 | }, | 449 | }, |
@@ -455,7 +455,7 @@ static const struct user_regset sparc64_regsets[] = { | |||
455 | */ | 455 | */ |
456 | [REGSET_FP] = { | 456 | [REGSET_FP] = { |
457 | .core_note_type = NT_PRFPREG, | 457 | .core_note_type = NT_PRFPREG, |
458 | .n = 35 * sizeof(u64), | 458 | .n = 35, |
459 | .size = sizeof(u64), .align = sizeof(u64), | 459 | .size = sizeof(u64), .align = sizeof(u64), |
460 | .get = fpregs64_get, .set = fpregs64_set | 460 | .get = fpregs64_get, .set = fpregs64_set |
461 | }, | 461 | }, |
@@ -801,7 +801,7 @@ static const struct user_regset sparc32_regsets[] = { | |||
801 | */ | 801 | */ |
802 | [REGSET_GENERAL] = { | 802 | [REGSET_GENERAL] = { |
803 | .core_note_type = NT_PRSTATUS, | 803 | .core_note_type = NT_PRSTATUS, |
804 | .n = 38 * sizeof(u32), | 804 | .n = 38, |
805 | .size = sizeof(u32), .align = sizeof(u32), | 805 | .size = sizeof(u32), .align = sizeof(u32), |
806 | .get = genregs32_get, .set = genregs32_set | 806 | .get = genregs32_get, .set = genregs32_set |
807 | }, | 807 | }, |
@@ -817,7 +817,7 @@ static const struct user_regset sparc32_regsets[] = { | |||
817 | */ | 817 | */ |
818 | [REGSET_FP] = { | 818 | [REGSET_FP] = { |
819 | .core_note_type = NT_PRFPREG, | 819 | .core_note_type = NT_PRFPREG, |
820 | .n = 99 * sizeof(u32), | 820 | .n = 99, |
821 | .size = sizeof(u32), .align = sizeof(u32), | 821 | .size = sizeof(u32), .align = sizeof(u32), |
822 | .get = fpregs32_get, .set = fpregs32_set | 822 | .get = fpregs32_get, .set = fpregs32_set |
823 | }, | 823 | }, |