projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a5f4d9d
)
loadpin: stop using bdevname
author
Christoph Hellwig
<hch@lst.de>
Thu, 12 May 2022 06:20:14 +0000
(08:20 +0200)
committer
Kees Cook
<keescook@chromium.org>
Mon, 16 May 2022 23:02:21 +0000
(16:02 -0700)
Use the %pg format specifier to save on stack consuption and code size.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link:
https://lore.kernel.org/r/20220512062014.1826835-1-hch@lst.de
security/loadpin/loadpin.c
patch
|
blob
|
history
diff --git
a/security/loadpin/loadpin.c
b/security/loadpin/loadpin.c
index b12f7d986b1e3bdb04c0c63a36bd200280048802..ad4e6756c03863df854f0b85625a3da7d45082f0 100644
(file)
--- a/
security/loadpin/loadpin.c
+++ b/
security/loadpin/loadpin.c
@@
-78,11
+78,8
@@
static void check_pinning_enforcement(struct super_block *mnt_sb)
* device, allow sysctl to change modes for testing.
*/
if (mnt_sb->s_bdev) {
- char bdev[BDEVNAME_SIZE];
-
ro = bdev_read_only(mnt_sb->s_bdev);
- bdevname(mnt_sb->s_bdev, bdev);
- pr_info("%s (%u:%u): %s\n", bdev,
+ pr_info("%pg (%u:%u): %s\n", mnt_sb->s_bdev,
MAJOR(mnt_sb->s_bdev->bd_dev),
MINOR(mnt_sb->s_bdev->bd_dev),
ro ? "read-only" : "writable");