From: Greg Kroah-Hartman Date: Tue, 25 Mar 2014 21:03:55 +0000 (-0700) Subject: 3.4-stable patches X-Git-Tag: v3.4.85~13 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51eba33ec5cacc922cb16b326e988503ab4dc770;p=thirdparty%2Fkernel%2Fstable-queue.git 3.4-stable patches added patches: deb-pkg-fix-cross-building-linux-headers-package.patch i7300_edac-fix-device-reference-count.patch p54-clamp-properly-instead-of-just-truncating.patch x86-bpf_jit-support-negative-offsets.patch --- diff --git a/queue-3.4/deb-pkg-fix-cross-building-linux-headers-package.patch b/queue-3.4/deb-pkg-fix-cross-building-linux-headers-package.patch new file mode 100644 index 00000000000..5485eaaa623 --- /dev/null +++ b/queue-3.4/deb-pkg-fix-cross-building-linux-headers-package.patch @@ -0,0 +1,58 @@ +From f8ce239dfc7ba9add41d9ecdc5e7810738f839fa Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Thu, 5 Dec 2013 14:37:35 +0000 +Subject: deb-pkg: Fix cross-building linux-headers package + +From: Ben Hutchings + +commit f8ce239dfc7ba9add41d9ecdc5e7810738f839fa upstream. + +builddeb generates a control file that says the linux-headers package +can only be built for the build system primary architecture. This +breaks cross-building configurations. We should use $debarch for this +instead. + +Since $debarch is not yet set when generating the control file, set +Architecture: any and use control file variables to fill in the +description. + +Fixes: cd8d60a20a45 ('kbuild: create linux-headers package in deb-pkg') +Reported-and-tested-by: "Niew, Sh." +Signed-off-by: Ben Hutchings +Signed-off-by: Michal Marek +Signed-off-by: Greg Kroah-Hartman + +--- + scripts/package/builddeb | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +--- a/scripts/package/builddeb ++++ b/scripts/package/builddeb +@@ -62,7 +62,7 @@ create_package() { + fi + + # Create the package +- dpkg-gencontrol -isp $forcearch -p$pname -P"$pdir" ++ dpkg-gencontrol -isp $forcearch -Vkernel:debarch="${debarch:-$(dpkg --print-architecture)}" -p$pname -P"$pdir" + dpkg --build "$pdir" .. + } + +@@ -252,15 +252,14 @@ mkdir -p "$destdir" + (cd $objtree; tar -c -f - -T "$objtree/debian/hdrobjfiles") | (cd $destdir; tar -xf -) + ln -sf "/usr/src/linux-headers-$version" "$kernel_headers_dir/lib/modules/$version/build" + rm -f "$objtree/debian/hdrsrcfiles" "$objtree/debian/hdrobjfiles" +-arch=$(dpkg --print-architecture) + + cat <> debian/control + + Package: $kernel_headers_packagename + Provides: linux-headers, linux-headers-2.6 +-Architecture: $arch +-Description: Linux kernel headers for $KERNELRELEASE on $arch +- This package provides kernel header files for $KERNELRELEASE on $arch ++Architecture: any ++Description: Linux kernel headers for $KERNELRELEASE on \${kernel:debarch} ++ This package provides kernel header files for $KERNELRELEASE on \${kernel:debarch} + . + This is useful for people who need to build external modules + EOF diff --git a/queue-3.4/i7300_edac-fix-device-reference-count.patch b/queue-3.4/i7300_edac-fix-device-reference-count.patch new file mode 100644 index 00000000000..1b80b65e036 --- /dev/null +++ b/queue-3.4/i7300_edac-fix-device-reference-count.patch @@ -0,0 +1,89 @@ +From 75135da0d68419ef8a925f4c1d5f63d8046e314d Mon Sep 17 00:00:00 2001 +From: Jean Delvare +Date: Tue, 25 Feb 2014 09:43:13 +0100 +Subject: i7300_edac: Fix device reference count + +From: Jean Delvare + +commit 75135da0d68419ef8a925f4c1d5f63d8046e314d upstream. + +pci_get_device() decrements the reference count of "from" (last +argument) so when we break off the loop successfully we have only one +device reference - and we don't know which device we have. If we want +a reference to each device, we must take them explicitly and let +the pci_get_device() walk complete to avoid duplicate references. + +This is serious, as over-putting device references will cause +the device to eventually disappear. Without this fix, the kernel +crashes after a few insmod/rmmod cycles. + +Tested on an Intel S7000FC4UR system with a 7300 chipset. + +Signed-off-by: Jean Delvare +Link: http://lkml.kernel.org/r/20140224111656.09bbb7ed@endymion.delvare +Cc: Mauro Carvalho Chehab +Cc: Doug Thompson +Cc: stable@vger.kernel.org +Signed-off-by: Borislav Petkov +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/edac/i7300_edac.c | 38 ++++++++++++++++++++------------------ + 1 file changed, 20 insertions(+), 18 deletions(-) + +--- a/drivers/edac/i7300_edac.c ++++ b/drivers/edac/i7300_edac.c +@@ -962,33 +962,35 @@ static int __devinit i7300_get_devices(s + + /* Attempt to 'get' the MCH register we want */ + pdev = NULL; +- while (!pvt->pci_dev_16_1_fsb_addr_map || +- !pvt->pci_dev_16_2_fsb_err_regs) { +- pdev = pci_get_device(PCI_VENDOR_ID_INTEL, +- PCI_DEVICE_ID_INTEL_I7300_MCH_ERR, pdev); +- if (!pdev) { +- /* End of list, leave */ +- i7300_printk(KERN_ERR, +- "'system address,Process Bus' " +- "device not found:" +- "vendor 0x%x device 0x%x ERR funcs " +- "(broken BIOS?)\n", +- PCI_VENDOR_ID_INTEL, +- PCI_DEVICE_ID_INTEL_I7300_MCH_ERR); +- goto error; +- } +- ++ while ((pdev = pci_get_device(PCI_VENDOR_ID_INTEL, ++ PCI_DEVICE_ID_INTEL_I7300_MCH_ERR, ++ pdev))) { + /* Store device 16 funcs 1 and 2 */ + switch (PCI_FUNC(pdev->devfn)) { + case 1: +- pvt->pci_dev_16_1_fsb_addr_map = pdev; ++ if (!pvt->pci_dev_16_1_fsb_addr_map) ++ pvt->pci_dev_16_1_fsb_addr_map = ++ pci_dev_get(pdev); + break; + case 2: +- pvt->pci_dev_16_2_fsb_err_regs = pdev; ++ if (!pvt->pci_dev_16_2_fsb_err_regs) ++ pvt->pci_dev_16_2_fsb_err_regs = ++ pci_dev_get(pdev); + break; + } + } + ++ if (!pvt->pci_dev_16_1_fsb_addr_map || ++ !pvt->pci_dev_16_2_fsb_err_regs) { ++ /* At least one device was not found */ ++ i7300_printk(KERN_ERR, ++ "'system address,Process Bus' device not found:" ++ "vendor 0x%x device 0x%x ERR funcs (broken BIOS?)\n", ++ PCI_VENDOR_ID_INTEL, ++ PCI_DEVICE_ID_INTEL_I7300_MCH_ERR); ++ goto error; ++ } ++ + debugf1("System Address, processor bus- PCI Bus ID: %s %x:%x\n", + pci_name(pvt->pci_dev_16_0_fsb_ctlr), + pvt->pci_dev_16_0_fsb_ctlr->vendor, diff --git a/queue-3.4/p54-clamp-properly-instead-of-just-truncating.patch b/queue-3.4/p54-clamp-properly-instead-of-just-truncating.patch new file mode 100644 index 00000000000..2d4aeacb207 --- /dev/null +++ b/queue-3.4/p54-clamp-properly-instead-of-just-truncating.patch @@ -0,0 +1,32 @@ +From 608cfbe4abaf76e9d732efd7ed1cfa3998163d91 Mon Sep 17 00:00:00 2001 +From: Dan Carpenter +Date: Mon, 13 Jan 2014 22:05:23 +0300 +Subject: p54: clamp properly instead of just truncating + +From: Dan Carpenter + +commit 608cfbe4abaf76e9d732efd7ed1cfa3998163d91 upstream. + +The call to clamp_t() first truncates the variable signed 8 bit and as a +result, the actual clamp is a no-op. + +Fixes: 0d78156eef1d ('p54: improve site survey') +Signed-off-by: Dan Carpenter +Signed-off-by: John W. Linville +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/net/wireless/p54/txrx.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/net/wireless/p54/txrx.c ++++ b/drivers/net/wireless/p54/txrx.c +@@ -583,7 +583,7 @@ static void p54_rx_stats(struct p54_comm + chan = priv->curchan; + if (chan) { + struct survey_info *survey = &priv->survey[chan->hw_value]; +- survey->noise = clamp_t(s8, priv->noise, -128, 127); ++ survey->noise = clamp(priv->noise, -128, 127); + survey->channel_time = priv->survey_raw.active; + survey->channel_time_tx = priv->survey_raw.tx; + survey->channel_time_busy = priv->survey_raw.tx + diff --git a/queue-3.4/series b/queue-3.4/series index 1abafd3a81b..da394a37543 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -2,3 +2,7 @@ alsa-compress-pass-through-return-value-of-open-ops-callback.patch hid-microsoft-add-id-s-for-surface-type-touch-cover-2.patch libceph-resend-all-writes-after-the-osdmap-loses-the-full-flag.patch iwlwifi-complete-backport-of-iwlwifi-always-copy-first-16-bytes-of-commands.patch +x86-bpf_jit-support-negative-offsets.patch +deb-pkg-fix-cross-building-linux-headers-package.patch +p54-clamp-properly-instead-of-just-truncating.patch +i7300_edac-fix-device-reference-count.patch diff --git a/queue-3.4/x86-bpf_jit-support-negative-offsets.patch b/queue-3.4/x86-bpf_jit-support-negative-offsets.patch new file mode 100644 index 00000000000..83c97add32f --- /dev/null +++ b/queue-3.4/x86-bpf_jit-support-negative-offsets.patch @@ -0,0 +1,40 @@ +From fdfaf64e75397567257e1051931f9a3377360665 Mon Sep 17 00:00:00 2001 +From: Alexei Starovoitov +Date: Mon, 10 Mar 2014 15:56:51 -0700 +Subject: x86: bpf_jit: support negative offsets + +From: Alexei Starovoitov + +commit fdfaf64e75397567257e1051931f9a3377360665 upstream. + +Commit a998d4342337 claimed to introduce negative offset support to x86 jit, +but it couldn't be working, since at the time of the execution +of LD+ABS or LD+IND instructions via call into +bpf_internal_load_pointer_neg_helper() the %edx (3rd argument of this func) +had junk value instead of access size in bytes (1 or 2 or 4). + +Store size into %edx instead of %ecx (what original commit intended to do) + +Fixes: a998d4342337 ("bpf jit: Let the x86 jit handle negative offsets") +Signed-off-by: Alexei Starovoitov +Cc: Jan Seiffert +Cc: Eric Dumazet +Acked-by: Eric Dumazet +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman + +--- + arch/x86/net/bpf_jit.S | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/net/bpf_jit.S ++++ b/arch/x86/net/bpf_jit.S +@@ -140,7 +140,7 @@ bpf_slow_path_byte_msh: + push %r9; \ + push SKBDATA; \ + /* rsi already has offset */ \ +- mov $SIZE,%ecx; /* size */ \ ++ mov $SIZE,%edx; /* size */ \ + call bpf_internal_load_pointer_neg_helper; \ + test %rax,%rax; \ + pop SKBDATA; \