lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20180721222849.GA23331@vnote>
Date:   Sun, 22 Jul 2018 01:28:49 +0300
From:   Eugene Korenevsky <ekorenevsky@...il.com>
To:     Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org,
        linux-block@...r.kernel.org
Subject: [PATCH] genhd: register_disk: inform about dev_set_name() failure

Although dev_set_name() failure is not fatal, it is better to print
a warning message into dmesg about it.

Signed-off-by: Eugene Korenevsky <ekorenevsky@...il.com>
---
 block/genhd.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/block/genhd.c b/block/genhd.c
index f1543a45e73b..071f8cbd529a 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -577,7 +577,9 @@ static void register_disk(struct device *parent, struct gendisk *disk)
 
 	ddev->parent = parent;
 
-	dev_set_name(ddev, "%s", disk->disk_name);
+	err = dev_set_name(ddev, "%s", disk->disk_name);
+	if (err)
+		pr_warn("%s: cannot set disk name: %d", __func__, err);
 
 	/* delay uevents, until we scanned partition table */
 	dev_set_uevent_suppress(ddev, 1);
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ