diff --git a/fs/pstore/blk.c b/fs/pstore/blk.c index de8cf5d75f34..65b2473e22ff 100644 --- a/fs/pstore/blk.c +++ b/fs/pstore/blk.c @@ -241,7 +241,7 @@ err: /* get information of pstore/blk */ int pstore_blk_get_config(struct pstore_blk_config *info) { - strncpy(info->device, blkdev, 80); + strscpy(info->device, blkdev); info->max_reason = max_reason; info->kmsg_size = check_size(kmsg_size, 4096); info->pmsg_size = check_size(pmsg_size, 4096); -- knotmirror 0.0.1 From 9b3c13c9ea4ecb2b95948f666560b8df8f358b40 Mon Sep 17 00:00:00 2001 From: Jeff Johnson Date: Thu, 13 Jun 2024 21:39:42 -0700 Subject: [PATCH 2/2] pstore: platform: add missing MODULE_DESCRIPTION() macro With ARCH=csky, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in fs/pstore/pstore.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-off-by: Jeff Johnson Link: https://lore.kernel.org/r/20240613-md-csky-fs-pstore-v1-1-c525f636b1cb@quicinc.com Signed-off-by: Kees Cook --- fs/pstore/platform.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c index 03425928d2fb..3497ede88aa0 100644 --- a/fs/pstore/platform.c +++ b/fs/pstore/platform.c @@ -761,4 +761,5 @@ static void __exit pstore_exit(void) module_exit(pstore_exit) MODULE_AUTHOR("Tony Luck "); +MODULE_DESCRIPTION("Persistent Storage - platform driver interface"); MODULE_LICENSE("GPL");