pstore/platform: Switch pstore_info::name to const

In order to more cleanly pass around backend names, make the "name" member
const. This means the module param needs to be dynamic (technically, it
was before, so this actually cleans up a minor memory leak if a backend
was specified and then gets unloaded.)

Link: https://lore.kernel.org/lkml/20200510202436.63222-3-keescook@chromium.org/
Signed-off-by: Kees Cook <keescook@chromium.org>
This commit is contained in:
Kees Cook
2020-05-08 09:16:02 -07:00
parent b7753fc7f6
commit 563ca40ddf
2 changed files with 3 additions and 2 deletions

View File

@@ -170,7 +170,7 @@ struct pstore_record {
*/
struct pstore_info {
struct module *owner;
char *name;
const char *name;
struct semaphore buf_lock;
char *buf;