[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250423164354.2780635-1-arnd@kernel.org>
Date: Wed, 23 Apr 2025 18:43:49 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: "Theodore Ts'o" <tytso@....edu>,
Andreas Dilger <adilger.kernel@...ger.ca>
Cc: Arnd Bergmann <arnd@...db.de>,
Jan Kara <jack@...e.cz>,
Zhang Yi <yi.zhang@...wei.com>,
Ojaswin Mujoo <ojaswin@...ux.ibm.com>,
"Darrick J. Wong" <djwong@...nel.org>,
"Matthew Wilcox (Oracle)" <willy@...radead.org>,
"Ritesh Harjani (IBM)" <ritesh.list@...il.com>,
Shida Zhang <zhangshida@...inos.cn>,
Baokun Li <libaokun1@...wei.com>,
Jann Horn <jannh@...gle.com>,
Brian Foster <bfoster@...hat.com>,
linux-ext4@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH] ext4: avoid -Wformat-security warning
From: Arnd Bergmann <arnd@...db.de>
check_igot_inode() prints a variable string, which causes a harmless
warning with 'make W=1':
fs/ext4/inode.c:4763:45: error: format string is not a string literal (potentially insecure) [-Werror,-Wformat-security]
4763 | ext4_error_inode(inode, function, line, 0, err_str);
Use a trivial "%s" format string instead.
Signed-off-by: Arnd Bergmann <arnd@...db.de>
---
fs/ext4/inode.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 94c7d2d828a6..3cfb1b670ea4 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -4760,7 +4760,7 @@ static int check_igot_inode(struct inode *inode, ext4_iget_flags flags,
return 0;
error:
- ext4_error_inode(inode, function, line, 0, err_str);
+ ext4_error_inode(inode, function, line, 0, "%s", err_str);
return -EFSCORRUPTED;
}
--
2.39.5
Powered by blists - more mailing lists