Skip to contentSkip to conversation

md/bitmap.c:bitmap_status(): Fix filename escaping

PATCH New Nominal Animal 1 participant 1 message May 30, 2016 MD RAID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 md/bitmap.c:bitmap_status(): Fix filename escaping

The call to seq_file_path() does not include backslash itself in the set of file names escaped. This results in files named "foo\t-\nbar" and "foo\\011-\\012bar" being both shown as "foo\\011-\\012bar". Fix this by including backslash in the escaped set.

drivers/md/bitmap.c +1 -1
diff -Nabpur linux-4.6/drivers/md/bitmap.c linux-new/drivers/md/bitmap.c
@@ -1928,7 +1928,7 @@ void bitmap_status(struct seq_file *seq,
 		   chunk_kb ? "KB" : "B");
 	if (bitmap->storage.file) {
 		seq_printf(seq, ", file: ");
-		seq_file_path(seq, bitmap->storage.file, " \t\n");
+		seq_file_path(seq, bitmap->storage.file, " \t\n\\");
 	}
 
 	seq_printf(seq, "\n");

Regards,
Nominal Animal