[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220525151809.1.I43128ef59eb08247ec093f8b19d05aa91f721afb@changeid>
Date: Wed, 25 May 2022 15:18:55 -0700
From: pso@...omium.org
To: LKML <linux-kernel@...r.kernel.org>
Cc: Dmitry Torokhov <dtor@...omium.org>,
Paramjit Oberoi <pso@...omium.org>,
Anton Vorontsov <anton@...msg.org>,
Colin Cross <ccross@...roid.com>,
Kees Cook <keescook@...omium.org>,
Tony Luck <tony.luck@...el.com>
Subject: [PATCH] pstore/ram: Fix pmsg address when per-cpu ftrace buffers are enabled
From: Paramjit Oberoi <pso@...omium.org>
When allocating ftrace pstore zones, there may be space left over at the
end of the region. The paddr pointer needs to be advanced to account for
this so that the next region (pmsg) ends up at the correct location.
Signed-off-by: Paramjit Oberoi <pso@...omium.org>
---
fs/pstore/ram.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/pstore/ram.c b/fs/pstore/ram.c
index fefe3d391d3af..3bca6cd34c02a 100644
--- a/fs/pstore/ram.c
+++ b/fs/pstore/ram.c
@@ -554,10 +554,12 @@ static int ramoops_init_przs(const char *name,
goto fail;
}
*paddr += zone_sz;
+ mem_sz -= zone_sz;
prz_ar[i]->type = pstore_name_to_type(name);
}
*przs = prz_ar;
+ *paddr += mem_sz;
return 0;
fail:
--
2.36.1.124.g0e6072fb45-goog
Powered by blists - more mailing lists