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]
Date:   Fri,  7 Apr 2017 14:26:22 +0800
From:   lixiubo@...s.chinamobile.com
To:     kent.overstreet@...il.com
Cc:     inux-bcache@...r.kernel.org, linux-raid@...r.kernel.org,
        linux-kernel@...r.kernel.org,
        Xiubo Li <lixiubo@...s.chinamobile.com>
Subject: [PATCH] bcache: Keep the labels the same in cache dev and cache set.

From: Xiubo Li <lixiubo@...s.chinamobile.com>

Since the unusual characters from sysfs attributes have been stript
for dc superblock label, so should here.

Signed-off-by: Xiubo Li <lixiubo@...s.chinamobile.com>
---
 drivers/md/bcache/sysfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/md/bcache/sysfs.c b/drivers/md/bcache/sysfs.c
index f90f136..d449f37 100644
--- a/drivers/md/bcache/sysfs.c
+++ b/drivers/md/bcache/sysfs.c
@@ -249,7 +249,7 @@
 		bch_write_bdev_super(dc, NULL);
 		if (dc->disk.c) {
 			memcpy(dc->disk.c->uuids[dc->disk.id].label,
-			       buf, SB_LABEL_SIZE);
+			       dc->sb.label, strlen(dc->sb.label));
 			bch_uuid_write(dc->disk.c);
 		}
 		env = kzalloc(sizeof(struct kobj_uevent_env), GFP_KERNEL);
-- 
1.8.3.1



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ