pstore: Fix the ramoops module parameters update
authorWang Long <long.wanglong@huawei.com>
Mon, 9 Mar 2015 07:39:07 +0000 (07:39 +0000)
committerTony Luck <tony.luck@intel.com>
Mon, 16 Mar 2015 18:14:10 +0000 (11:14 -0700)
In the function ramoops_probe, the console_size, pmsg_size,
ftrace_size may be update because the value is not the power
of two. We should update the module parameter variables
as well so they are visible through /sys/module/ramoops/parameters
correctly.

Signed-off-by: Wang Long <long.wanglong@huawei.com>
Acked-by: Mark Salyzyn <salyzyn@android.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Tony Luck <tony.luck@intel.com>
fs/pstore/ram.c

index 39d1373128e94a6e2e0f91d53e2d5838e855211b..44a549beeafa1006a8055cbc23ea06c20a06929f 100644 (file)
@@ -539,6 +539,9 @@ static int ramoops_probe(struct platform_device *pdev)
        mem_address = pdata->mem_address;
        record_size = pdata->record_size;
        dump_oops = pdata->dump_oops;
+       ramoops_console_size = pdata->console_size;
+       ramoops_pmsg_size = pdata->pmsg_size;
+       ramoops_ftrace_size = pdata->ftrace_size;
 
        pr_info("attached 0x%lx@0x%llx, ecc: %d/%d\n",
                cxt->size, (unsigned long long)cxt->phys_addr,