linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] md/bitmap.c:bitmap_status(): Fix filename escaping
@ 2016-05-30 18:00 Nominal Animal
  0 siblings, 0 replies; only message in thread
From: Nominal Animal @ 2016-05-30 18:00 UTC (permalink / raw)
  To: Shaohua Li, linux-raid, linux-kernel

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.

diff -Nabpur linux-4.6/drivers/md/bitmap.c linux-new/drivers/md/bitmap.c
--- linux-4.6/drivers/md/bitmap.c	2016-05-16 01:43:13.000000000 +0300
+++ linux-new/drivers/md/bitmap.c	2016-05-30 19:56:43.791298226 +0300
@@ -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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2016-05-30 18:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-30 18:00 [PATCH 1/1] md/bitmap.c:bitmap_status(): Fix filename escaping Nominal Animal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).