diff options
-rw-r--r-- | driver-core/warn-when-statically-allocated-kobjects-are-used.patch | 138 | ||||
-rw-r--r-- | gregkh.pre/detect-atomic-counter-underflows.patch | 33 | ||||
-rw-r--r-- | gregkh.pre/sysrq-u-laptop.patch | 23 | ||||
-rw-r--r-- | gregkh/gkh-version.patch (renamed from gregkh.pre/gkh-version.patch) | 0 | ||||
-rw-r--r-- | pending/acpi-fixup-typo-in-acpi_device_remove.patch (renamed from driver-core/acpi-fixup-typo-in-acpi_device_remove.patch) | 0 | ||||
-rw-r--r-- | pending/driver-core-use-dev_get_drvdata-accessors.patch (renamed from driver-core/driver-core-use-dev_get_drvdata-accessors.patch) | 0 | ||||
-rw-r--r-- | pending/usb-gotemp.patch (renamed from gregkh.post/usb-gotemp.patch) | 0 | ||||
-rw-r--r-- | series | 12 | ||||
-rw-r--r-- | version | 2 |
9 files changed, 2 insertions, 206 deletions
diff --git a/driver-core/warn-when-statically-allocated-kobjects-are-used.patch b/driver-core/warn-when-statically-allocated-kobjects-are-used.patch deleted file mode 100644 index 44869e2cf28453..00000000000000 --- a/driver-core/warn-when-statically-allocated-kobjects-are-used.patch +++ /dev/null @@ -1,138 +0,0 @@ -From haveblue@us.ibm.com Thu Mar 16 17:30:46 2006 -From: Dave Hansen <haveblue@us.ibm.com> -Subject: warn when statically-allocated kobjects are used -Cc: gregkh@suse.de, Dave Hansen <haveblue@us.ibm.com> -Date: Thu, 16 Mar 2006 17:30:16 -0800 -Message-Id: <20060317013016.5C643E69@localhost.localdomain> - - -One of the top ten sysfs problems is that users use statically -allocated kobjects. This patch reminds them that this is a -naughty thing. - -One _really_ nice thing this patch does, is us the kallsyms -mechanism to print out exactly which symbol is being complained -about: - - The kobject at, or inside 'statickobj.2'@(0xc040d020) is not dynamically allocated. - -This patch replaces the previous implementation's use of a -_sdata symbol in favor of using kallsyms_lookup(). If a -kobject's address is a resolvable symbol, then it isn't -dynamically allocated. - -The one exception to this is init symbols. The patch also -checks to see whether __init memory has been freed and if -it has will allow kobjects in those sections. - -Signed-off-by: Dave Hansen <haveblue@us.ibm.com> -Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> - - ---- - include/linux/init.h | 1 + - init/main.c | 9 +++++++++ - lib/kobject.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 60 insertions(+) - ---- a/include/linux/init.h -+++ b/include/linux/init.h -@@ -147,6 +147,7 @@ extern int do_one_initcall(initcall_t fn - extern char __initdata boot_command_line[]; - extern char *saved_command_line; - extern unsigned int reset_devices; -+extern int initmem_now_dynamic; - - /* used by init/main.c */ - void setup_arch(char **); ---- a/init/main.c -+++ b/init/main.c -@@ -792,6 +792,14 @@ static void run_init_process(char *init_ - kernel_execve(init_filename, argv_init, envp_init); - } - -+/* -+ * __init/__init_data sections are turned into normal -+ * dynamically allocated memory later in boot. When -+ * this is 0, the memory is for the __init purposes, -+ * when it it some other value, the memory is dynamic. -+ */ -+int initmem_now_dynamic; -+ - /* This is a non __init function. Force it to be noinline otherwise gcc - * makes it inline to init() and it becomes part of init.text section - */ -@@ -801,6 +809,7 @@ static noinline int init_post(void) - /* need to finish all async __init code before freeing the memory */ - async_synchronize_full(); - free_initmem(); -+ initmem_now_dynamic = 1; - unlock_kernel(); - mark_rodata_ro(); - system_state = SYSTEM_RUNNING; ---- a/lib/kobject.c -+++ b/lib/kobject.c -@@ -17,6 +17,55 @@ - #include <linux/module.h> - #include <linux/stat.h> - #include <linux/slab.h> -+#include <linux/kallsyms.h> -+#include <asm-generic/sections.h> -+ -+#ifdef CONFIG_X86_32 -+static int ptr_in_range(void *ptr, void *start, void *end) -+{ -+ /* -+ * This should hopefully get rid of causing warnings -+ * if the architecture did not set one of the section -+ * variables up. -+ */ -+ if (start >= end) -+ return 0; -+ -+ if ((ptr >= start) && (ptr < end)) -+ return 1; -+ return 0; -+} -+ -+static void verify_dynamic_kobject_allocation(struct kobject *kobj) -+{ -+ char namebuf[KSYM_NAME_LEN]; -+ const char *ret; -+ -+ ret = kallsyms_lookup((unsigned long)kobj, NULL, NULL, NULL, namebuf); -+ /* -+ * This is the X86_32-only part of this function. -+ * This is here because it is valid to have a kobject -+ * in an __init section, but only after those -+ * sections have been freed back to the dynamic pool. -+ */ -+ if (!initmem_now_dynamic && -+ ptr_in_range(kobj, __init_begin, __init_end)) -+ goto out; -+ if (!ret || !strlen(ret)) -+ goto out; -+ pr_debug("---- begin silly warning ----\n"); -+ pr_debug("This is a janitorial warning, not a kernel bug.\n"); -+ pr_debug("The kobject '%s', at, or inside '%s'@(0x%p) is not " -+ "dynamically allocated.\n", kobject_name(kobj), namebuf, kobj); -+ pr_debug("kobjects must be dynamically allocated, not static\n"); -+ /* dump_stack(); */ -+ pr_debug("---- end silly warning ----\n"); -+out: -+ return; -+} -+#else -+static void verify_dynamic_kobject_allocation(struct kobject *kobj) { } -+#endif - - /* - * populate_dir - populate directory with attributes. -@@ -282,6 +331,7 @@ void kobject_init(struct kobject *kobj, - "object, something is seriously wrong.\n", kobj); - dump_stack(); - } -+ verify_dynamic_kobject_allocation(kobj); - - kobject_init_internal(kobj); - kobj->ktype = ktype; diff --git a/gregkh.pre/detect-atomic-counter-underflows.patch b/gregkh.pre/detect-atomic-counter-underflows.patch deleted file mode 100644 index 91773b9444fe7f..00000000000000 --- a/gregkh.pre/detect-atomic-counter-underflows.patch +++ /dev/null @@ -1,33 +0,0 @@ -From: Ingo Molnar <mingo@elte.hu> -Subject: detect atomic counter underflows - -From: Ingo Molnar <mingo@elte.hu> - -The patch below will detect atomic counter underflows. This has been -test-driven in the -RT patchset for some time. qdisc_destroy() triggered -it sometimes (in a seemingly nonfatal way, during device shutdown) - with -DaveM suggesting that it is most likely a bug in the networking code. So -it would be nice to have this in -mm for some time to validate all atomic -counters on a broader base. - -Signed-off-by: Ingo Molnar <mingo@elte.hu> -Signed-off-by: Andrew Morton <akpm@osdl.org> ---- - - arch/x86/include/asm/atomic_32.h | 5 +++++ - 1 file changed, 5 insertions(+) - ---- a/arch/x86/include/asm/atomic_32.h -+++ b/arch/x86/include/asm/atomic_32.h -@@ -113,6 +113,11 @@ static inline int atomic_dec_and_test(at - { - unsigned char c; - -+ if (!atomic_read(v)) { -+ printk("BUG: atomic counter underflow at:\n"); -+ dump_stack(); -+ } -+ - asm volatile(LOCK_PREFIX "decl %0; sete %1" - : "+m" (v->counter), "=qm" (c) - : : "memory"); diff --git a/gregkh.pre/sysrq-u-laptop.patch b/gregkh.pre/sysrq-u-laptop.patch deleted file mode 100644 index a7f7fbf4a457d3..00000000000000 --- a/gregkh.pre/sysrq-u-laptop.patch +++ /dev/null @@ -1,23 +0,0 @@ -From foo@baz Tue Apr 9 12:12:43 2002 -Date: Tue, 09 Apr 2002 12:14:34 -0700 -To: Greg KH <greg@kroah.com> -From: Greg Kroah-Hartman <gregkh@suse.de> -Subject: Stupid patch for my laptop which can't get sysrq-u - -From: Greg Kroah-Hartman <gregkh@suse.de> - ---- - drivers/char/sysrq.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - ---- a/drivers/char/sysrq.c -+++ b/drivers/char/sysrq.c -@@ -438,7 +438,7 @@ static struct sysrq_key_op *sysrq_key_ta - /* x: May be registered on ppc/powerpc for xmon */ - NULL, /* x */ - /* y: May be registered on sparc64 for global register dump */ -- NULL, /* y */ -+ &sysrq_mountro_op, /* y stupid fujitsu laptop, can't hit the U key */ - &sysrq_ftrace_dump_op, /* z */ - }; - diff --git a/gregkh.pre/gkh-version.patch b/gregkh/gkh-version.patch index 9833bbeb04ebe6..9833bbeb04ebe6 100644 --- a/gregkh.pre/gkh-version.patch +++ b/gregkh/gkh-version.patch diff --git a/driver-core/acpi-fixup-typo-in-acpi_device_remove.patch b/pending/acpi-fixup-typo-in-acpi_device_remove.patch index 1ea76cf8209333..1ea76cf8209333 100644 --- a/driver-core/acpi-fixup-typo-in-acpi_device_remove.patch +++ b/pending/acpi-fixup-typo-in-acpi_device_remove.patch diff --git a/driver-core/driver-core-use-dev_get_drvdata-accessors.patch b/pending/driver-core-use-dev_get_drvdata-accessors.patch index 88471e5b81057d..88471e5b81057d 100644 --- a/driver-core/driver-core-use-dev_get_drvdata-accessors.patch +++ b/pending/driver-core-use-dev_get_drvdata-accessors.patch diff --git a/gregkh.post/usb-gotemp.patch b/pending/usb-gotemp.patch index 87a0b37d52dbbc..87a0b37d52dbbc 100644 --- a/gregkh.post/usb-gotemp.patch +++ b/pending/usb-gotemp.patch @@ -1,7 +1,5 @@ # My specific stuff, at the top to make it easier to work stuff below. -gregkh.pre/gkh-version.patch -gregkh.pre/sysrq-u-laptop.patch -gregkh.pre/detect-atomic-counter-underflows.patch +gregkh/gkh-version.patch ##################################################################### @@ -24,13 +22,6 @@ gregkh.pre/detect-atomic-counter-underflows.patch # Driver core patches for after 2.6.30 is out ################################# -# multi driver-to-device series -#driver-core/driver-core-use-dev_get_drvdata-accessors.patch -#driver-core/acpi-fixup-typo-in-acpi_device_remove.patch - - -# helper tools, not for mainline. -driver-core/warn-when-statically-allocated-kobjects-are-used.patch ################################# # USB stuff (after 2.6.30 is out) @@ -38,7 +29,6 @@ driver-core/warn-when-statically-allocated-kobjects-are-used.patch # stuff I want in my tree, but not to go into -next -gregkh.post/usb-gotemp.patch ################################# @@ -1 +1 @@ -2.6.29 +2.6.29-git13 |