diff options
author | Li Zhong <zhong@linux.vnet.ibm.com> | 2014-11-16 21:52:30 -0500 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2014-11-19 00:09:13 -0500 |
commit | a49ab6eeebe5624d51466969a7bac611231eede8 (patch) | |
tree | 5f907029857ad1aad276376699bbbdfd04f3f6cc /arch/powerpc/platforms/pseries/nvram.c | |
parent | 35891d40bfc4f41fc627abb757c0894c0028f3ab (diff) |
powerpc/pseries: Initialise nvram_pstore_info's buf_lock
nvram_pstore_info's buf_lock is not initialized before registering,
which is clearly incorrect.
It causes some strange behavior when trying to obtain the lock during
kdump process.
On a UP configuration, the console stopped for a couple of seconds, then
"lockup suspected" warning printed out, but then it continued to run.
So try lock fails, and lockup reported, but then arch_spin_lock()
passes.
Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
[mpe: Edited changelog]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/platforms/pseries/nvram.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/nvram.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/nvram.c b/arch/powerpc/platforms/pseries/nvram.c index 11a3b617ef5d..054a0ed5c7ee 100644 --- a/arch/powerpc/platforms/pseries/nvram.c +++ b/arch/powerpc/platforms/pseries/nvram.c | |||
@@ -715,6 +715,8 @@ static int nvram_pstore_init(void) | |||
715 | nvram_pstore_info.buf = oops_data; | 715 | nvram_pstore_info.buf = oops_data; |
716 | nvram_pstore_info.bufsize = oops_data_sz; | 716 | nvram_pstore_info.bufsize = oops_data_sz; |
717 | 717 | ||
718 | spin_lock_init(&nvram_pstore_info.buf_lock); | ||
719 | |||
718 | rc = pstore_register(&nvram_pstore_info); | 720 | rc = pstore_register(&nvram_pstore_info); |
719 | if (rc != 0) | 721 | if (rc != 0) |
720 | pr_err("nvram: pstore_register() failed, defaults to " | 722 | pr_err("nvram: pstore_register() failed, defaults to " |