From: Greg Kroah-Hartman Date: Tue, 25 Mar 2014 21:03:50 +0000 (-0700) Subject: 3.10-stable patches X-Git-Tag: v3.4.85~15 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=446cd084bf411f6d9454420772cd8a42102697ab;p=thirdparty%2Fkernel%2Fstable-queue.git 3.10-stable patches added patches: deb-pkg-fix-cross-building-linux-headers-package.patch p54-clamp-properly-instead-of-just-truncating.patch regulator-core-replace-direct-ops-disable-usage.patch x86-bpf_jit-support-negative-offsets.patch --- diff --git a/queue-3.10/deb-pkg-fix-cross-building-linux-headers-package.patch b/queue-3.10/deb-pkg-fix-cross-building-linux-headers-package.patch new file mode 100644 index 00000000000..5485eaaa623 --- /dev/null +++ b/queue-3.10/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.10/p54-clamp-properly-instead-of-just-truncating.patch b/queue-3.10/p54-clamp-properly-instead-of-just-truncating.patch new file mode 100644 index 00000000000..673b66416a4 --- /dev/null +++ b/queue-3.10/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 +@@ -587,7 +587,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.10/regulator-core-replace-direct-ops-disable-usage.patch b/queue-3.10/regulator-core-replace-direct-ops-disable-usage.patch new file mode 100644 index 00000000000..66367697e33 --- /dev/null +++ b/queue-3.10/regulator-core-replace-direct-ops-disable-usage.patch @@ -0,0 +1,115 @@ +From 66fda75f47dc583f1c187556e9a2c082dd64f8c6 Mon Sep 17 00:00:00 2001 +From: Markus Pargmann +Date: Thu, 20 Feb 2014 17:36:04 +0100 +Subject: regulator: core: Replace direct ops->disable usage + +From: Markus Pargmann + +commit 66fda75f47dc583f1c187556e9a2c082dd64f8c6 upstream. + +There are many places where ops->disable is called directly. Instead we +should use _regulator_do_disable() which also handles gpio regulators. + +To be able to use the wrapper function from _regulator_force_disable(), +I moved the _notifier_call_chain() call from _regulator_do_disable() to +_regulator_disable(). This way, _regulator_force_disable() can use +different flags for _notifier_call_chain() without calling it twice. + +Signed-off-by: Markus Pargmann +Signed-off-by: Mark Brown +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/regulator/core.c | 34 +++++++++++++--------------------- + 1 file changed, 13 insertions(+), 21 deletions(-) + +--- a/drivers/regulator/core.c ++++ b/drivers/regulator/core.c +@@ -1712,8 +1712,6 @@ static int _regulator_do_disable(struct + + trace_regulator_disable_complete(rdev_get_name(rdev)); + +- _notifier_call_chain(rdev, REGULATOR_EVENT_DISABLE, +- NULL); + return 0; + } + +@@ -1737,6 +1735,8 @@ static int _regulator_disable(struct reg + rdev_err(rdev, "failed to disable\n"); + return ret; + } ++ _notifier_call_chain(rdev, REGULATOR_EVENT_DISABLE, ++ NULL); + } + + rdev->use_count = 0; +@@ -1789,20 +1789,16 @@ static int _regulator_force_disable(stru + { + int ret = 0; + +- /* force disable */ +- if (rdev->desc->ops->disable) { +- /* ah well, who wants to live forever... */ +- ret = rdev->desc->ops->disable(rdev); +- if (ret < 0) { +- rdev_err(rdev, "failed to force disable\n"); +- return ret; +- } +- /* notify other consumers that power has been forced off */ +- _notifier_call_chain(rdev, REGULATOR_EVENT_FORCE_DISABLE | +- REGULATOR_EVENT_DISABLE, NULL); ++ ret = _regulator_do_disable(rdev); ++ if (ret < 0) { ++ rdev_err(rdev, "failed to force disable\n"); ++ return ret; + } + +- return ret; ++ _notifier_call_chain(rdev, REGULATOR_EVENT_FORCE_DISABLE | ++ REGULATOR_EVENT_DISABLE, NULL); ++ ++ return 0; + } + + /** +@@ -3788,8 +3784,6 @@ int regulator_suspend_finish(void) + + mutex_lock(®ulator_list_mutex); + list_for_each_entry(rdev, ®ulator_list, list) { +- struct regulator_ops *ops = rdev->desc->ops; +- + mutex_lock(&rdev->mutex); + if (rdev->use_count > 0 || rdev->constraints->always_on) { + error = _regulator_do_enable(rdev); +@@ -3798,12 +3792,10 @@ int regulator_suspend_finish(void) + } else { + if (!has_full_constraints) + goto unlock; +- if (!ops->disable) +- goto unlock; + if (!_regulator_is_enabled(rdev)) + goto unlock; + +- error = ops->disable(rdev); ++ error = _regulator_do_disable(rdev); + if (error) + ret = error; + } +@@ -3993,7 +3985,7 @@ static int __init regulator_init_complet + ops = rdev->desc->ops; + c = rdev->constraints; + +- if (!ops->disable || (c && c->always_on)) ++ if (c && c->always_on) + continue; + + mutex_lock(&rdev->mutex); +@@ -4014,7 +4006,7 @@ static int __init regulator_init_complet + /* We log since this may kill the system if it + * goes wrong. */ + rdev_info(rdev, "disabling\n"); +- ret = ops->disable(rdev); ++ ret = _regulator_do_disable(rdev); + if (ret != 0) { + rdev_err(rdev, "couldn't disable: %d\n", ret); + } diff --git a/queue-3.10/series b/queue-3.10/series index ad1a98998ec..dc430ceb36e 100644 --- a/queue-3.10/series +++ b/queue-3.10/series @@ -7,3 +7,7 @@ media-cx18-check-for-allocation-failure-in-cx18_read_eeprom.patch libceph-block-i-o-when-pause-or-full-osd-map-flags-are-set.patch libceph-resend-all-writes-after-the-osdmap-loses-the-full-flag.patch asoc-max98090-make-revision_id-readable.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 +regulator-core-replace-direct-ops-disable-usage.patch diff --git a/queue-3.10/x86-bpf_jit-support-negative-offsets.patch b/queue-3.10/x86-bpf_jit-support-negative-offsets.patch new file mode 100644 index 00000000000..83c97add32f --- /dev/null +++ b/queue-3.10/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; \