loadpin: stop using bdevname
Subsystems (2)
PATCH 1/1 loadpin: stop using bdevname
Use the %pg format specifier to save on stack consuption and code size.
Signed-off-by Christoph Hellwig <[email protected]>
--- security/loadpin/loadpin.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
security/loadpin/loadpin.c +1 -4
@@ -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" );
Signature · 1 line
2.30.2
Kees Cook
AppliedQuoted 1 line · Christoph Hellwig
Use the %pg format specifier to save on stack consuption and code size.
Applied to for-next/hardening, thanks!
[1/1] loadpin: stop using bdevname
https://git.kernel.org/kees/c/8c296a9ad2c8
Signature · 1 line
Kees Cook