From: Greg Kroah-Hartman Date: Mon, 16 Jan 2012 19:04:25 +0000 (-0800) Subject: 3.0-stable patches X-Git-Tag: v3.1.10~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=918e080492a744dc8190327a2a18e8ff8cced946;p=thirdparty%2Fkernel%2Fstable-queue.git 3.0-stable patches added patches: ubi-fix-debugging-messages.patch ubi-fix-nameless-volumes-handling.patch ubifs-fix-debugging-messages.patch --- diff --git a/queue-3.0/series b/queue-3.0/series index 471db1b54ca..89cc4045675 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -32,3 +32,6 @@ rtl8192se-fix-bug-caused-by-failure-to-check-skb-allocation.patch mac80211-fix-rx-key-null-pointer-dereference-in-promiscuous-mode.patch memcg-add-mem_cgroup_replace_page_cache-to-fix-lru-issue.patch x86-fix-mmap-random-address-range.patch +ubi-fix-nameless-volumes-handling.patch +ubi-fix-debugging-messages.patch +ubifs-fix-debugging-messages.patch diff --git a/queue-3.0/ubi-fix-debugging-messages.patch b/queue-3.0/ubi-fix-debugging-messages.patch new file mode 100644 index 00000000000..a41c1e35008 --- /dev/null +++ b/queue-3.0/ubi-fix-debugging-messages.patch @@ -0,0 +1,40 @@ +From 72f0d453d81d35087b1d3ad7c8285628c2be6e1d Mon Sep 17 00:00:00 2001 +From: Artem Bityutskiy +Date: Tue, 10 Jan 2012 19:32:30 +0200 +Subject: UBI: fix debugging messages + +From: Artem Bityutskiy + +commit 72f0d453d81d35087b1d3ad7c8285628c2be6e1d upstream. + +Patch ab50ff684707031ed4bad2fdd313208ae392e5bb broke UBI debugging messages: +before that commit when UBI debugging was enabled, users saw few useful +debugging messages after attaching an MTD device. However, that patch turned +'dbg_msg()' into 'pr_debug()', so to enable the debugging messages users have +to enable them first via /sys/kernel/debug/dynamic_debug/control, which is +very impractical. + +This commit makes 'dbg_msg()' to use 'printk()' instead of 'pr_debug()', just +as it was before the breakage. + +Signed-off-by: Artem Bityutskiy +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mtd/ubi/debug.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/drivers/mtd/ubi/debug.h ++++ b/drivers/mtd/ubi/debug.h +@@ -51,7 +51,10 @@ struct ubi_mkvol_req; + pr_debug("UBI DBG " type ": " fmt "\n", ##__VA_ARGS__) + + /* Just a debugging messages not related to any specific UBI subsystem */ +-#define dbg_msg(fmt, ...) ubi_dbg_msg("msg", fmt, ##__VA_ARGS__) ++#define dbg_msg(fmt, ...) \ ++ printk(KERN_DEBUG "UBI DBG (pid %d): %s: " fmt "\n", \ ++ current->pid, __func__, ##__VA_ARGS__) ++ + /* General debugging messages */ + #define dbg_gen(fmt, ...) ubi_dbg_msg("gen", fmt, ##__VA_ARGS__) + /* Messages from the eraseblock association sub-system */ diff --git a/queue-3.0/ubi-fix-nameless-volumes-handling.patch b/queue-3.0/ubi-fix-nameless-volumes-handling.patch new file mode 100644 index 00000000000..d50b9df53d2 --- /dev/null +++ b/queue-3.0/ubi-fix-nameless-volumes-handling.patch @@ -0,0 +1,35 @@ +From 4a59c797a18917a5cf3ff7ade296b46134d91e6a Mon Sep 17 00:00:00 2001 +From: Richard Weinberger +Date: Fri, 13 Jan 2012 15:07:40 +0100 +Subject: UBI: fix nameless volumes handling + +From: Richard Weinberger + +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 +Signed-off-by: Artem Bityutskiy +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/mtd/ubi/cdev.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/drivers/mtd/ubi/cdev.c ++++ b/drivers/mtd/ubi/cdev.c +@@ -628,6 +628,9 @@ static int verify_mkvol_req(const struct + 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; diff --git a/queue-3.0/ubifs-fix-debugging-messages.patch b/queue-3.0/ubifs-fix-debugging-messages.patch new file mode 100644 index 00000000000..e1a8fd4a329 --- /dev/null +++ b/queue-3.0/ubifs-fix-debugging-messages.patch @@ -0,0 +1,39 @@ +From d34315da9146253351146140ea4b277193ee5e5f Mon Sep 17 00:00:00 2001 +From: Artem Bityutskiy +Date: Tue, 10 Jan 2012 19:32:30 +0200 +Subject: UBIFS: fix debugging messages + +From: Artem Bityutskiy + +commit d34315da9146253351146140ea4b277193ee5e5f upstream. + +Patch 56e46742e846e4de167dde0e1e1071ace1c882a5 broke UBIFS debugging messages: +before that commit when UBIFS debugging was enabled, users saw few useful +debugging messages after mount. However, that patch turned 'dbg_msg()' into +'pr_debug()', so to enable the debugging messages users have to enable them +first via /sys/kernel/debug/dynamic_debug/control, which is very impractical. + +This commit makes 'dbg_msg()' to use 'printk()' instead of 'pr_debug()', just +as it was before the breakage. + +Signed-off-by: Artem Bityutskiy +Signed-off-by: Greg Kroah-Hartman + +--- + fs/ubifs/debug.h | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +--- a/fs/ubifs/debug.h ++++ b/fs/ubifs/debug.h +@@ -134,7 +134,10 @@ const char *dbg_key_str1(const struct ub + } while (0) + + /* Just a debugging messages not related to any specific UBIFS subsystem */ +-#define dbg_msg(fmt, ...) ubifs_dbg_msg("msg", fmt, ##__VA_ARGS__) ++#define dbg_msg(fmt, ...) \ ++ printk(KERN_DEBUG "UBIFS DBG (pid %d): %s: " fmt "\n", current->pid, \ ++ __func__, ##__VA_ARGS__) ++ + /* General messages */ + #define dbg_gen(fmt, ...) ubifs_dbg_msg("gen", fmt, ##__VA_ARGS__) + /* Additional journal messages */