[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20120205220952.484134878@pcw.home.local>
Date: Sun, 05 Feb 2012 23:11:00 +0100
From: Willy Tarreau <w@....eu>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Richard Weinberger <richard@....at>,
Artem Bityutskiy <Artem.Bityutskiy@...ux.intel.com>,
Greg KH <gregkh@...uxfoundation.org>
Subject: [PATCH 71/91] UBI: fix nameless volumes handling
2.6.27-longterm review patch. If anyone has any objections, please let us know.
------------------
commit 4a59c797a18917a5cf3ff7ade296b46134d91e6a upstream.
Currently it's possible to create a volume without a name. E.g:
ubimkvol -n 32 -s 2MiB -t static /dev/ubi0 -N ""
After that vtbl_check() will always fail because it does not permit
empty strings.
Signed-off-by: Richard Weinberger <richard@....at>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@...ux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
---
drivers/mtd/ubi/cdev.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
Index: longterm-2.6.27/drivers/mtd/ubi/cdev.c
===================================================================
--- longterm-2.6.27.orig/drivers/mtd/ubi/cdev.c 2012-02-05 22:34:32.837915400 +0100
+++ longterm-2.6.27/drivers/mtd/ubi/cdev.c 2012-02-05 22:34:44.966914934 +0100
@@ -569,6 +569,9 @@
if (req->alignment != 1 && n)
goto bad;
+ if (!req->name[0] || !req->name_len)
+ goto bad;
+
if (req->name_len > UBI_VOL_NAME_MAX) {
err = -ENAMETOOLONG;
goto bad;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists