From f9832afb69046809c461dea052876ff05c9d5ce6 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 4 Apr 2012 12:26:57 -0700 Subject: [PATCH] 3.0-stable patches added patches: acpica-fix-regression-in-fadt-revision-checks.patch acpi-do-cpufreq-clamping-for-throttling-per-package-v2.patch drm-radeon-kms-fix-fans-after-resume.patch drm-validate-requested-virtual-size-against-allocated-fb-size.patch genirq-adjust-irq-thread-affinity-on-irq_set_mask_ok_nocopy-return-value.patch m68k-mac-add-missing-platform-check-before-registering-platform-devices.patch mac80211-fix-possible-tid_rx-reorder_timer-use-after-free.patch modpost-fix-all_init_data_sections.patch pnpacpi-fix-device-ref-leaking-in-acpi_pnp_match.patch tracing-fix-ent_size-in-trace-output.patch tracing-fix-ftrace-stack-trace-entries.patch --- ...amping-for-throttling-per-package-v2.patch | 129 ++++++++++++++++++ ...x-regression-in-fadt-revision-checks.patch | 67 +++++++++ ...drm-radeon-kms-fix-fans-after-resume.patch | 71 ++++++++++ ...rtual-size-against-allocated-fb-size.patch | 45 ++++++ ...-irq_set_mask_ok_nocopy-return-value.patch | 52 +++++++ ...-before-registering-platform-devices.patch | 31 +++++ ...-tid_rx-reorder_timer-use-after-free.patch | 49 +++++++ .../modpost-fix-all_init_data_sections.patch | 30 ++++ ...device-ref-leaking-in-acpi_pnp_match.patch | 41 ++++++ queue-3.0/series | 11 ++ ...tracing-fix-ent_size-in-trace-output.patch | 56 ++++++++ ...acing-fix-ftrace-stack-trace-entries.patch | 73 ++++++++++ 12 files changed, 655 insertions(+) create mode 100644 queue-3.0/acpi-do-cpufreq-clamping-for-throttling-per-package-v2.patch create mode 100644 queue-3.0/acpica-fix-regression-in-fadt-revision-checks.patch create mode 100644 queue-3.0/drm-radeon-kms-fix-fans-after-resume.patch create mode 100644 queue-3.0/drm-validate-requested-virtual-size-against-allocated-fb-size.patch create mode 100644 queue-3.0/genirq-adjust-irq-thread-affinity-on-irq_set_mask_ok_nocopy-return-value.patch create mode 100644 queue-3.0/m68k-mac-add-missing-platform-check-before-registering-platform-devices.patch create mode 100644 queue-3.0/mac80211-fix-possible-tid_rx-reorder_timer-use-after-free.patch create mode 100644 queue-3.0/modpost-fix-all_init_data_sections.patch create mode 100644 queue-3.0/pnpacpi-fix-device-ref-leaking-in-acpi_pnp_match.patch create mode 100644 queue-3.0/tracing-fix-ent_size-in-trace-output.patch create mode 100644 queue-3.0/tracing-fix-ftrace-stack-trace-entries.patch diff --git a/queue-3.0/acpi-do-cpufreq-clamping-for-throttling-per-package-v2.patch b/queue-3.0/acpi-do-cpufreq-clamping-for-throttling-per-package-v2.patch new file mode 100644 index 00000000000..bf796719716 --- /dev/null +++ b/queue-3.0/acpi-do-cpufreq-clamping-for-throttling-per-package-v2.patch @@ -0,0 +1,129 @@ +From 2815ab92ba3ab27556212cc306288dc95692824b Mon Sep 17 00:00:00 2001 +From: Andi Kleen +Date: Mon, 6 Feb 2012 08:17:11 -0800 +Subject: ACPI: Do cpufreq clamping for throttling per package v2 + +From: Andi Kleen + +commit 2815ab92ba3ab27556212cc306288dc95692824b upstream. + +On Intel CPUs the processor typically uses the highest frequency +set by any logical CPU. When the system overheats +Linux first forces the frequency to the lowest available one +to lower the temperature. + +However this was done only per logical CPU, which means all +logical CPUs in a package would need to go through this before +the frequency is actually lowered. + +Worse this delay actually prevents real throttling, because +the real throttle code only proceeds when the lowest frequency +is already reached. + +So when a throttle event happens force the lowest frequency +for all CPUs in the package where it happened. The per CPU +state is now kept per package, not per logical CPU. An alternative +would be to do it per cpufreq unit, but since we want to bring +down the temperature of the complete chip it's better +to do it for all. + +In principle it may even make sense to do it for all CPUs, +but I kept it on the package for now. + +With this change the frequency is actually lowered, which +in terms also allows real throttling to proceed. + +I also removed an unnecessary per cpu variable initialization. + +v2: Fix package mapping + +Signed-off-by: Andi Kleen +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/processor_thermal.c | 45 ++++++++++++++++++++++++++++++++------- + 1 file changed, 37 insertions(+), 8 deletions(-) + +--- a/drivers/acpi/processor_thermal.c ++++ b/drivers/acpi/processor_thermal.c +@@ -58,6 +58,27 @@ ACPI_MODULE_NAME("processor_thermal"); + static DEFINE_PER_CPU(unsigned int, cpufreq_thermal_reduction_pctg); + static unsigned int acpi_thermal_cpufreq_is_init = 0; + ++#define reduction_pctg(cpu) \ ++ per_cpu(cpufreq_thermal_reduction_pctg, phys_package_first_cpu(cpu)) ++ ++/* ++ * Emulate "per package data" using per cpu data (which should really be ++ * provided elsewhere) ++ * ++ * Note we can lose a CPU on cpu hotunplug, in this case we forget the state ++ * temporarily. Fortunately that's not a big issue here (I hope) ++ */ ++static int phys_package_first_cpu(int cpu) ++{ ++ int i; ++ int id = topology_physical_package_id(cpu); ++ ++ for_each_online_cpu(i) ++ if (topology_physical_package_id(i) == id) ++ return i; ++ return 0; ++} ++ + static int cpu_has_cpufreq(unsigned int cpu) + { + struct cpufreq_policy policy; +@@ -77,7 +98,7 @@ static int acpi_thermal_cpufreq_notifier + + max_freq = ( + policy->cpuinfo.max_freq * +- (100 - per_cpu(cpufreq_thermal_reduction_pctg, policy->cpu) * 20) ++ (100 - reduction_pctg(policy->cpu) * 20) + ) / 100; + + cpufreq_verify_within_limits(policy, 0, max_freq); +@@ -103,16 +124,28 @@ static int cpufreq_get_cur_state(unsigne + if (!cpu_has_cpufreq(cpu)) + return 0; + +- return per_cpu(cpufreq_thermal_reduction_pctg, cpu); ++ return reduction_pctg(cpu); + } + + static int cpufreq_set_cur_state(unsigned int cpu, int state) + { ++ int i; ++ + if (!cpu_has_cpufreq(cpu)) + return 0; + +- per_cpu(cpufreq_thermal_reduction_pctg, cpu) = state; +- cpufreq_update_policy(cpu); ++ reduction_pctg(cpu) = state; ++ ++ /* ++ * Update all the CPUs in the same package because they all ++ * contribute to the temperature and often share the same ++ * frequency. ++ */ ++ for_each_online_cpu(i) { ++ if (topology_physical_package_id(i) == ++ topology_physical_package_id(cpu)) ++ cpufreq_update_policy(i); ++ } + return 0; + } + +@@ -120,10 +153,6 @@ void acpi_thermal_cpufreq_init(void) + { + int i; + +- for (i = 0; i < nr_cpu_ids; i++) +- if (cpu_present(i)) +- per_cpu(cpufreq_thermal_reduction_pctg, i) = 0; +- + i = cpufreq_register_notifier(&acpi_thermal_cpufreq_notifier_block, + CPUFREQ_POLICY_NOTIFIER); + if (!i) diff --git a/queue-3.0/acpica-fix-regression-in-fadt-revision-checks.patch b/queue-3.0/acpica-fix-regression-in-fadt-revision-checks.patch new file mode 100644 index 00000000000..34229a50263 --- /dev/null +++ b/queue-3.0/acpica-fix-regression-in-fadt-revision-checks.patch @@ -0,0 +1,67 @@ +From 3e80acd1af40fcd91a200b0416a7616b20c5d647 Mon Sep 17 00:00:00 2001 +From: Julian Anastasov +Date: Thu, 23 Feb 2012 22:40:43 +0200 +Subject: ACPICA: Fix regression in FADT revision checks + +From: Julian Anastasov + +commit 3e80acd1af40fcd91a200b0416a7616b20c5d647 upstream. + + commit 64b3db22c04586997ab4be46dd5a5b99f8a2d390 (2.6.39), +"Remove use of unreliable FADT revision field" causes regression +for old P4 systems because now cst_control and other fields are +not reset to 0. + + The effect is that acpi_processor_power_init will notice +cst_control != 0 and a write to CST_CNT register is performed +that should not happen. As result, the system oopses after the +"No _CST, giving up" message, sometimes in acpi_ns_internalize_name, +sometimes in acpi_ns_get_type, usually at random places. May be +during migration to CPU 1 in acpi_processor_get_throttling. + + Every one of these settings help to avoid this problem: + - acpi=off + - processor.nocst=1 + - maxcpus=1 + + The fix is to update acpi_gbl_FADT.header.length after +the original value is used to check for old revisions. + +https://bugzilla.kernel.org/show_bug.cgi?id=42700 +https://bugzilla.redhat.com/show_bug.cgi?id=727865 + +Signed-off-by: Julian Anastasov +Acked-by: Bob Moore +Signed-off-by: Len Brown +Cc: Jonathan Nieder +Cc: Josh Boyer +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/acpica/tbfadt.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/acpi/acpica/tbfadt.c ++++ b/drivers/acpi/acpica/tbfadt.c +@@ -350,10 +350,6 @@ static void acpi_tb_convert_fadt(void) + u32 address32; + u32 i; + +- /* Update the local FADT table header length */ +- +- acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt); +- + /* + * Expand the 32-bit FACS and DSDT addresses to 64-bit as necessary. + * Later code will always use the X 64-bit field. Also, check for an +@@ -395,6 +391,10 @@ static void acpi_tb_convert_fadt(void) + acpi_gbl_FADT.boot_flags = 0; + } + ++ /* Update the local FADT table header length */ ++ ++ acpi_gbl_FADT.header.length = sizeof(struct acpi_table_fadt); ++ + /* + * Expand the ACPI 1.0 32-bit addresses to the ACPI 2.0 64-bit "X" + * generic address structures as necessary. Later code will always use diff --git a/queue-3.0/drm-radeon-kms-fix-fans-after-resume.patch b/queue-3.0/drm-radeon-kms-fix-fans-after-resume.patch new file mode 100644 index 00000000000..ee9af16f003 --- /dev/null +++ b/queue-3.0/drm-radeon-kms-fix-fans-after-resume.patch @@ -0,0 +1,71 @@ +From 402976fe51b2d1a58a29ba06fa1ca5ace3a4cdcd Mon Sep 17 00:00:00 2001 +From: Alex Deucher +Date: Thu, 29 Mar 2012 19:04:08 -0400 +Subject: drm/radeon/kms: fix fans after resume +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Alex Deucher + +commit 402976fe51b2d1a58a29ba06fa1ca5ace3a4cdcd upstream. + +On pre-R600 asics, the SpeedFanControl table is not +executed as part of ASIC_Init as it is on newer asics. + +Fixes: +https://bugzilla.kernel.org/show_bug.cgi?id=29412 + +Signed-off-by: Alex Deucher +Reviewed-by: Michel Dänzer +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/radeon/atom.c | 15 ++++++++++++++- + drivers/gpu/drm/radeon/atom.h | 1 + + 2 files changed, 15 insertions(+), 1 deletion(-) + +--- a/drivers/gpu/drm/radeon/atom.c ++++ b/drivers/gpu/drm/radeon/atom.c +@@ -1301,8 +1301,11 @@ struct atom_context *atom_parse(struct c + + int atom_asic_init(struct atom_context *ctx) + { ++ struct radeon_device *rdev = ctx->card->dev->dev_private; + int hwi = CU16(ctx->data_table + ATOM_DATA_FWI_PTR); + uint32_t ps[16]; ++ int ret; ++ + memset(ps, 0, 64); + + ps[0] = cpu_to_le32(CU32(hwi + ATOM_FWI_DEFSCLK_PTR)); +@@ -1312,7 +1315,17 @@ int atom_asic_init(struct atom_context * + + if (!CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_INIT)) + return 1; +- return atom_execute_table(ctx, ATOM_CMD_INIT, ps); ++ ret = atom_execute_table(ctx, ATOM_CMD_INIT, ps); ++ if (ret) ++ return ret; ++ ++ memset(ps, 0, 64); ++ ++ if (rdev->family < CHIP_R600) { ++ if (CU16(ctx->cmd_table + 4 + 2 * ATOM_CMD_SPDFANCNTL)) ++ atom_execute_table(ctx, ATOM_CMD_SPDFANCNTL, ps); ++ } ++ return ret; + } + + void atom_destroy(struct atom_context *ctx) +--- a/drivers/gpu/drm/radeon/atom.h ++++ b/drivers/gpu/drm/radeon/atom.h +@@ -44,6 +44,7 @@ + #define ATOM_CMD_SETSCLK 0x0A + #define ATOM_CMD_SETMCLK 0x0B + #define ATOM_CMD_SETPCLK 0x0C ++#define ATOM_CMD_SPDFANCNTL 0x39 + + #define ATOM_DATA_FWI_PTR 0xC + #define ATOM_DATA_IIO_PTR 0x32 diff --git a/queue-3.0/drm-validate-requested-virtual-size-against-allocated-fb-size.patch b/queue-3.0/drm-validate-requested-virtual-size-against-allocated-fb-size.patch new file mode 100644 index 00000000000..a669a90758e --- /dev/null +++ b/queue-3.0/drm-validate-requested-virtual-size-against-allocated-fb-size.patch @@ -0,0 +1,45 @@ +From 62fb376e214d3c1bfdf6fbb77dac162f6da04d7e Mon Sep 17 00:00:00 2001 +From: Chris Wilson +Date: Mon, 26 Mar 2012 21:15:53 +0100 +Subject: drm: Validate requested virtual size against allocated fb size + +From: Chris Wilson + +commit 62fb376e214d3c1bfdf6fbb77dac162f6da04d7e upstream. + +mplayer -vo fbdev tries to create a screen that is twice as tall as the +allocated framebuffer for "doublebuffering". By default, and all in-tree +users, only sufficient memory is allocated and mapped to satisfy the +smallest framebuffer and the virtual size is no larger than the actual. +For these users, we should therefore reject any userspace request to +create a screen that requires a buffer larger than the framebuffer +originally allocated. + +References: https://bugs.freedesktop.org/show_bug.cgi?id=38138 +Signed-off-by: Chris Wilson +Reviewed-by: Daniel Vetter +Signed-off-by: Dave Airlie +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/gpu/drm/drm_fb_helper.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +--- a/drivers/gpu/drm/drm_fb_helper.c ++++ b/drivers/gpu/drm/drm_fb_helper.c +@@ -610,9 +610,13 @@ int drm_fb_helper_check_var(struct fb_va + return -EINVAL; + + /* Need to resize the fb object !!! */ +- if (var->bits_per_pixel > fb->bits_per_pixel || var->xres > fb->width || var->yres > fb->height) { ++ if (var->bits_per_pixel > fb->bits_per_pixel || ++ var->xres > fb->width || var->yres > fb->height || ++ var->xres_virtual > fb->width || var->yres_virtual > fb->height) { + DRM_DEBUG("fb userspace requested width/height/bpp is greater than current fb " +- "object %dx%d-%d > %dx%d-%d\n", var->xres, var->yres, var->bits_per_pixel, ++ "request %dx%d-%d (virtual %dx%d) > %dx%d-%d\n", ++ var->xres, var->yres, var->bits_per_pixel, ++ var->xres_virtual, var->yres_virtual, + fb->width, fb->height, fb->bits_per_pixel); + return -EINVAL; + } diff --git a/queue-3.0/genirq-adjust-irq-thread-affinity-on-irq_set_mask_ok_nocopy-return-value.patch b/queue-3.0/genirq-adjust-irq-thread-affinity-on-irq_set_mask_ok_nocopy-return-value.patch new file mode 100644 index 00000000000..cdd0f3391f9 --- /dev/null +++ b/queue-3.0/genirq-adjust-irq-thread-affinity-on-irq_set_mask_ok_nocopy-return-value.patch @@ -0,0 +1,52 @@ +From f5cb92ac82d06cb583c1f66666314c5c0a4d7913 Mon Sep 17 00:00:00 2001 +From: Jiang Liu +Date: Fri, 30 Mar 2012 23:11:33 +0800 +Subject: genirq: Adjust irq thread affinity on IRQ_SET_MASK_OK_NOCOPY return value + +From: Jiang Liu + +commit f5cb92ac82d06cb583c1f66666314c5c0a4d7913 upstream. + +irq_move_masked_irq() checks the return code of +chip->irq_set_affinity() only for 0, but IRQ_SET_MASK_OK_NOCOPY is +also a valid return code, which is there to avoid a redundant copy of +the cpumask. But in case of IRQ_SET_MASK_OK_NOCOPY we not only avoid +the redundant copy, we also fail to adjust the thread affinity of an +eventually threaded interrupt handler. + +Handle IRQ_SET_MASK_OK (==0) and IRQ_SET_MASK_OK_NOCOPY(==1) return +values correctly by checking the valid return values seperately. + +Signed-off-by: Jiang Liu +Cc: Jiang Liu +Cc: Keping Chen +Link: http://lkml.kernel.org/r/1333120296-13563-2-git-send-email-jiang.liu@huawei.com +Signed-off-by: Thomas Gleixner +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/irq/migration.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +--- a/kernel/irq/migration.c ++++ b/kernel/irq/migration.c +@@ -43,12 +43,16 @@ void irq_move_masked_irq(struct irq_data + * masking the irqs. + */ + if (likely(cpumask_any_and(desc->pending_mask, cpu_online_mask) +- < nr_cpu_ids)) +- if (!chip->irq_set_affinity(&desc->irq_data, +- desc->pending_mask, false)) { ++ < nr_cpu_ids)) { ++ int ret = chip->irq_set_affinity(&desc->irq_data, ++ desc->pending_mask, false); ++ switch (ret) { ++ case IRQ_SET_MASK_OK: + cpumask_copy(desc->irq_data.affinity, desc->pending_mask); ++ case IRQ_SET_MASK_OK_NOCOPY: + irq_set_thread_affinity(desc); + } ++ } + + cpumask_clear(desc->pending_mask); + } diff --git a/queue-3.0/m68k-mac-add-missing-platform-check-before-registering-platform-devices.patch b/queue-3.0/m68k-mac-add-missing-platform-check-before-registering-platform-devices.patch new file mode 100644 index 00000000000..e8347f0b785 --- /dev/null +++ b/queue-3.0/m68k-mac-add-missing-platform-check-before-registering-platform-devices.patch @@ -0,0 +1,31 @@ +From 6cfeba53911d6d2f17ebbd1246893557d5ff5aeb Mon Sep 17 00:00:00 2001 +From: Geert Uytterhoeven +Date: Sun, 18 Mar 2012 13:21:38 +0100 +Subject: m68k/mac: Add missing platform check before registering platform devices + +From: Geert Uytterhoeven + +commit 6cfeba53911d6d2f17ebbd1246893557d5ff5aeb upstream. + +On multi-platform kernels, the Mac platform devices should be registered +when running on Mac only. Else it may crash later. + +Signed-off-by: Geert Uytterhoeven +Signed-off-by: Greg Kroah-Hartman + +--- + arch/m68k/mac/config.c | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/m68k/mac/config.c ++++ b/arch/m68k/mac/config.c +@@ -950,6 +950,9 @@ int __init mac_platform_init(void) + { + u8 *swim_base; + ++ if (!MACH_IS_MAC) ++ return -ENODEV; ++ + /* + * Serial devices + */ diff --git a/queue-3.0/mac80211-fix-possible-tid_rx-reorder_timer-use-after-free.patch b/queue-3.0/mac80211-fix-possible-tid_rx-reorder_timer-use-after-free.patch new file mode 100644 index 00000000000..42651ff6a12 --- /dev/null +++ b/queue-3.0/mac80211-fix-possible-tid_rx-reorder_timer-use-after-free.patch @@ -0,0 +1,49 @@ +From d72308bff5c2fa207949a5925b020bce74495e33 Mon Sep 17 00:00:00 2001 +From: Stanislaw Gruszka +Date: Mon, 19 Mar 2012 16:00:26 +0100 +Subject: mac80211: fix possible tid_rx->reorder_timer use after free + +From: Stanislaw Gruszka + +commit d72308bff5c2fa207949a5925b020bce74495e33 upstream. + +Is possible that we will arm the tid_rx->reorder_timer after +del_timer_sync() in ___ieee80211_stop_rx_ba_session(). We need to stop +timer after RCU grace period finish, so move it to +ieee80211_free_tid_rx(). Timer will not be armed again, as +rcu_dereference(sta->ampdu_mlme.tid_rx[tid]) will return NULL. + +Debug object detected problem with the following warning: +ODEBUG: free active (active state 0) object type: timer_list hint: sta_rx_agg_reorder_timer_expired+0x0/0xf0 [mac80211] + +Bug report (with all warning messages): +https://bugzilla.redhat.com/show_bug.cgi?id=804007 + +Reported-by: "jan p. springer" +Signed-off-by: Stanislaw Gruszka +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + net/mac80211/agg-rx.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/net/mac80211/agg-rx.c ++++ b/net/mac80211/agg-rx.c +@@ -48,6 +48,8 @@ static void ieee80211_free_tid_rx(struct + container_of(h, struct tid_ampdu_rx, rcu_head); + int i; + ++ del_timer_sync(&tid_rx->reorder_timer); ++ + for (i = 0; i < tid_rx->buf_size; i++) + dev_kfree_skb(tid_rx->reorder_buf[i]); + kfree(tid_rx->reorder_buf); +@@ -87,7 +89,6 @@ void ___ieee80211_stop_rx_ba_session(str + tid, 0, reason); + + del_timer_sync(&tid_rx->session_timer); +- del_timer_sync(&tid_rx->reorder_timer); + + call_rcu(&tid_rx->rcu_head, ieee80211_free_tid_rx); + } diff --git a/queue-3.0/modpost-fix-all_init_data_sections.patch b/queue-3.0/modpost-fix-all_init_data_sections.patch new file mode 100644 index 00000000000..32f73de7d19 --- /dev/null +++ b/queue-3.0/modpost-fix-all_init_data_sections.patch @@ -0,0 +1,30 @@ +From 9aaf440f8fabcebf9ea79a62ccf4c212e6544b49 Mon Sep 17 00:00:00 2001 +From: Jan Beulich +Date: Thu, 8 Mar 2012 09:41:25 +0000 +Subject: modpost: fix ALL_INIT_DATA_SECTIONS + +From: Jan Beulich + +commit 9aaf440f8fabcebf9ea79a62ccf4c212e6544b49 upstream. + +This was lacking a comma between two supposed to be separate strings. + +Signed-off-by: Jan Beulich +Signed-off-by: Michal Marek +Signed-off-by: Greg Kroah-Hartman + +--- + scripts/mod/modpost.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/scripts/mod/modpost.c ++++ b/scripts/mod/modpost.c +@@ -822,7 +822,7 @@ static void check_section(const char *mo + + #define ALL_INIT_DATA_SECTIONS \ + ".init.setup$", ".init.rodata$", \ +- ".devinit.rodata$", ".cpuinit.rodata$", ".meminit.rodata$" \ ++ ".devinit.rodata$", ".cpuinit.rodata$", ".meminit.rodata$", \ + ".init.data$", ".devinit.data$", ".cpuinit.data$", ".meminit.data$" + #define ALL_EXIT_DATA_SECTIONS \ + ".exit.data$", ".devexit.data$", ".cpuexit.data$", ".memexit.data$" diff --git a/queue-3.0/pnpacpi-fix-device-ref-leaking-in-acpi_pnp_match.patch b/queue-3.0/pnpacpi-fix-device-ref-leaking-in-acpi_pnp_match.patch new file mode 100644 index 00000000000..3a8e12dd0fe --- /dev/null +++ b/queue-3.0/pnpacpi-fix-device-ref-leaking-in-acpi_pnp_match.patch @@ -0,0 +1,41 @@ +From 89e96ada572fb216e582dbe3f64e1a6939a37f74 Mon Sep 17 00:00:00 2001 +From: Yinghai Lu +Date: Sat, 3 Mar 2012 13:29:20 -0800 +Subject: PNPACPI: Fix device ref leaking in acpi_pnp_match + +From: Yinghai Lu + +commit 89e96ada572fb216e582dbe3f64e1a6939a37f74 upstream. + +During testing pci root bus removal, found some root bus bridge is not freed. +If booting with pnpacpi=off, those hostbridge could be freed without problem. +It turns out that some devices reference are not released during acpi_pnp_match. +that match should not hold one device ref during every calling. +Add pu_device calling before returning. + +Signed-off-by: Yinghai Lu +Signed-off-by: Len Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/pnp/pnpacpi/core.c | 7 ++++++- + 1 file changed, 6 insertions(+), 1 deletion(-) + +--- a/drivers/pnp/pnpacpi/core.c ++++ b/drivers/pnp/pnpacpi/core.c +@@ -320,9 +320,14 @@ static int __init acpi_pnp_match(struct + { + struct acpi_device *acpi = to_acpi_device(dev); + struct pnp_dev *pnp = _pnp; ++ struct device *physical_device; ++ ++ physical_device = acpi_get_physical_device(acpi->handle); ++ if (physical_device) ++ put_device(physical_device); + + /* true means it matched */ +- return !acpi_get_physical_device(acpi->handle) ++ return !physical_device + && compare_pnp_id(pnp->id, acpi_device_hid(acpi)); + } + diff --git a/queue-3.0/series b/queue-3.0/series index 250e84e6983..e07adf1c9a3 100644 --- a/queue-3.0/series +++ b/queue-3.0/series @@ -5,3 +5,14 @@ mtd-sst25l-initialize-writebufsize.patch mtd-block2mtd-initialize-writebufsize.patch mtd-lart-initialize-writebufsize.patch mtd-m25p80-set-writebufsize.patch +acpi-do-cpufreq-clamping-for-throttling-per-package-v2.patch +pnpacpi-fix-device-ref-leaking-in-acpi_pnp_match.patch +acpica-fix-regression-in-fadt-revision-checks.patch +modpost-fix-all_init_data_sections.patch +genirq-adjust-irq-thread-affinity-on-irq_set_mask_ok_nocopy-return-value.patch +tracing-fix-ftrace-stack-trace-entries.patch +tracing-fix-ent_size-in-trace-output.patch +m68k-mac-add-missing-platform-check-before-registering-platform-devices.patch +mac80211-fix-possible-tid_rx-reorder_timer-use-after-free.patch +drm-validate-requested-virtual-size-against-allocated-fb-size.patch +drm-radeon-kms-fix-fans-after-resume.patch diff --git a/queue-3.0/tracing-fix-ent_size-in-trace-output.patch b/queue-3.0/tracing-fix-ent_size-in-trace-output.patch new file mode 100644 index 00000000000..be8cbef438c --- /dev/null +++ b/queue-3.0/tracing-fix-ent_size-in-trace-output.patch @@ -0,0 +1,56 @@ +From 12b5da349a8b94c9dbc3430a6bc42eabd9eaf50b Mon Sep 17 00:00:00 2001 +From: Steven Rostedt +Date: Tue, 27 Mar 2012 10:43:28 -0400 +Subject: tracing: Fix ent_size in trace output + +From: Steven Rostedt + +commit 12b5da349a8b94c9dbc3430a6bc42eabd9eaf50b upstream. + +When reading the trace file, the records of each of the per_cpu buffers +are examined to find the next event to print out. At the point of looking +at the event, the size of the event is recorded. But if the first event is +chosen, the other events in the other CPU buffers will reset the event size +that is stored in the iterator descriptor, causing the event size passed to +the output functions to be incorrect. + +In most cases this is not a problem, but for the case of stack traces, it +is. With the change to the stack tracing to record a dynamic number of +back traces, the output depends on the size of the entry instead of the +fixed 8 back traces. When the entry size is not correct, the back traces +would not be fully printed. + +Note, reading from the per-cpu trace files were not affected. + +Reported-by: Thomas Gleixner +Tested-by: Thomas Gleixner +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/trace/trace.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/kernel/trace/trace.c ++++ b/kernel/trace/trace.c +@@ -1549,6 +1549,7 @@ __find_next_entry(struct trace_iterator + int cpu_file = iter->cpu_file; + u64 next_ts = 0, ts; + int next_cpu = -1; ++ int next_size = 0; + int cpu; + + /* +@@ -1580,9 +1581,12 @@ __find_next_entry(struct trace_iterator + next_cpu = cpu; + next_ts = ts; + next_lost = lost_events; ++ next_size = iter->ent_size; + } + } + ++ iter->ent_size = next_size; ++ + if (ent_cpu) + *ent_cpu = next_cpu; + diff --git a/queue-3.0/tracing-fix-ftrace-stack-trace-entries.patch b/queue-3.0/tracing-fix-ftrace-stack-trace-entries.patch new file mode 100644 index 00000000000..e6f95b18dba --- /dev/null +++ b/queue-3.0/tracing-fix-ftrace-stack-trace-entries.patch @@ -0,0 +1,73 @@ +From 01de982abf8c9e10fc3089e10585cd2cc914bdab Mon Sep 17 00:00:00 2001 +From: Wolfgang Mauerer +Date: Thu, 22 Mar 2012 11:18:20 +0100 +Subject: tracing: Fix ftrace stack trace entries + +From: Wolfgang Mauerer + +commit 01de982abf8c9e10fc3089e10585cd2cc914bdab upstream. + +8 hex characters tell only half the tale for 64 bit CPUs, +so use the appropriate length. + +Link: http://lkml.kernel.org/r/1332411501-8059-2-git-send-email-wolfgang.mauerer@siemens.com + +Signed-off-by: Wolfgang Mauerer +Signed-off-by: Steven Rostedt +Signed-off-by: Greg Kroah-Hartman + +--- + kernel/trace/trace_entries.h | 16 ++++++++++++---- + kernel/trace/trace_export.c | 2 +- + 2 files changed, 13 insertions(+), 5 deletions(-) + +--- a/kernel/trace/trace_entries.h ++++ b/kernel/trace/trace_entries.h +@@ -156,6 +156,12 @@ FTRACE_ENTRY_DUP(wakeup, ctx_switch_entr + + #define FTRACE_STACK_ENTRIES 8 + ++#ifndef CONFIG_64BIT ++# define IP_FMT "%08lx" ++#else ++# define IP_FMT "%016lx" ++#endif ++ + FTRACE_ENTRY(kernel_stack, stack_entry, + + TRACE_STACK, +@@ -164,8 +170,9 @@ FTRACE_ENTRY(kernel_stack, stack_entry, + __array( unsigned long, caller, FTRACE_STACK_ENTRIES ) + ), + +- F_printk("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n" +- "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", ++ F_printk("\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" ++ "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" ++ "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n", + __entry->caller[0], __entry->caller[1], __entry->caller[2], + __entry->caller[3], __entry->caller[4], __entry->caller[5], + __entry->caller[6], __entry->caller[7]) +@@ -180,8 +187,9 @@ FTRACE_ENTRY(user_stack, userstack_entry + __array( unsigned long, caller, FTRACE_STACK_ENTRIES ) + ), + +- F_printk("\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n" +- "\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n\t=> (%08lx)\n", ++ F_printk("\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" ++ "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n" ++ "\t=> (" IP_FMT ")\n\t=> (" IP_FMT ")\n", + __entry->caller[0], __entry->caller[1], __entry->caller[2], + __entry->caller[3], __entry->caller[4], __entry->caller[5], + __entry->caller[6], __entry->caller[7]) +--- a/kernel/trace/trace_export.c ++++ b/kernel/trace/trace_export.c +@@ -150,7 +150,7 @@ ftrace_define_fields_##name(struct ftrac + #define __dynamic_array(type, item) + + #undef F_printk +-#define F_printk(fmt, args...) #fmt ", " __stringify(args) ++#define F_printk(fmt, args...) __stringify(fmt) ", " __stringify(args) + + #undef FTRACE_ENTRY + #define FTRACE_ENTRY(call, struct_name, etype, tstruct, print) \ -- 2.47.3