* [01/15] perf evsel: Fix an issue where perf report fails to show the proper percentage
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [02/15] perf tools: Fix perf stack to non executable on x86_64 Greg KH
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: torvalds, akpm, alan, Ananth N Mavinakayanahalli, Ingo Molnar,
Robert Richter, Srikar Dronamraju, Naveen N. Rao,
Arnaldo Carvalho de Melo
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
commit a4a03fc7ef89020baca4f19174e6a43767c6d78a upstream.
This patch fixes an issue where perf report shows nan% for certain
perf.data files. The below is from a report for a do_fork probe:
-nan% sshd [kernel.kallsyms] [k] do_fork
-nan% packagekitd [kernel.kallsyms] [k] do_fork
-nan% dbus-daemon [kernel.kallsyms] [k] do_fork
-nan% bash [kernel.kallsyms] [k] do_fork
A git bisect shows commit f3bda2c as the cause. However, looking back
through the git history, I saw commit 640c03c which seems to have
removed the required initialization for perf_sample->period. The problem
only started showing after commit f3bda2c. The below patch re-introduces
the initialization and it fixes the problem for me.
With the below patch, for the same perf.data:
73.08% bash [kernel.kallsyms] [k] do_fork
8.97% 11-dhclient [kernel.kallsyms] [k] do_fork
6.41% sshd [kernel.kallsyms] [k] do_fork
3.85% 20-chrony [kernel.kallsyms] [k] do_fork
2.56% sendmail [kernel.kallsyms] [k] do_fork
This patch applies over current linux-tip commit 9949284.
Problem introduced in:
$ git describe 640c03c
v2.6.37-rc3-83-g640c03c
Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Robert Richter <robert.richter@amd.com>
Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
Link: http://lkml.kernel.org/r/20120203170113.5190.25558.stgit@localhost6.localdomain6
Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/perf/util/evsel.c | 1 +
1 file changed, 1 insertion(+)
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -348,6 +348,7 @@ int perf_event__parse_sample(const union
data->cpu = data->pid = data->tid = -1;
data->stream_id = data->id = data->time = -1ULL;
+ data->period = 1;
if (event->header.type != PERF_RECORD_SAMPLE) {
if (!sample_id_all)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [02/15] perf tools: Fix perf stack to non executable on x86_64
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
2012-02-17 0:55 ` [01/15] perf evsel: Fix an issue where perf report fails to show the proper percentage Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [03/15] drm/i915: no lvds quirk for AOpen MP45 Greg KH
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: torvalds, akpm, alan, Clark Williams, Eric Dumazet,
Corey Ashford, Ingo Molnar, Paul Mackerras, Peter Zijlstra,
Jiri Olsa, Arnaldo Carvalho de Melo
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiri Olsa <jolsa@redhat.com>
commit 7a0153ee15575a4d07b5da8c96b79e0b0fd41a12 upstream.
By adding following objects:
bench/mem-memcpy-x86-64-asm.o
the x86_64 perf binary ended up with executable stack.
The reason was that above object are assembler sourced and is missing the
GNU-stack note section. In such case the linker assumes that the final binary
should not be restricted at all and mark the stack as RWX.
Adding section ".note.GNU-stack" definition to mentioned object, with all
flags disabled, thus omiting this object from linker stack flags decision.
Problem introduced in:
$ git describe ea7872b
v2.6.37-rc2-19-gea7872b
Reported-at: https://bugzilla.redhat.com/show_bug.cgi?id=783570
Reported-by: Clark Williams <williams@redhat.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1328100848-5630-1-git-send-email-jolsa@redhat.com
Signed-off-by: Jiri Olsa <jolsa@redhat.com>
[ committer note: Backported fix to perf/urgent (3.3-rc2+) ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
tools/perf/bench/mem-memcpy-x86-64-asm.S | 6 ++++++
1 file changed, 6 insertions(+)
--- a/tools/perf/bench/mem-memcpy-x86-64-asm.S
+++ b/tools/perf/bench/mem-memcpy-x86-64-asm.S
@@ -1,2 +1,8 @@
#include "../../../arch/x86/lib/memcpy_64.S"
+/*
+ * We need to provide note.GNU-stack section, saying that we want
+ * NOT executable stack. Otherwise the final linking will assume that
+ * the ELF stack should not be restricted at all and set it RWX.
+ */
+.section .note.GNU-stack,"",@progbits
^ permalink raw reply [flat|nested] 16+ messages in thread
* [03/15] drm/i915: no lvds quirk for AOpen MP45
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
2012-02-17 0:55 ` [01/15] perf evsel: Fix an issue where perf report fails to show the proper percentage Greg KH
2012-02-17 0:55 ` [02/15] perf tools: Fix perf stack to non executable on x86_64 Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [04/15] hwmon: (f75375s) Fix bit shifting in f75375_write16 Greg KH
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: torvalds, akpm, alan, Chris Wilson, Daniel Vetter, Keith Packard
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Vetter <daniel.vetter@ffwll.ch>
commit e57b6886f555ab57f40a01713304e2053efe51ec upstream.
According to a bug report, it doesn't have one.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44263
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpu/drm/i915/intel_lvds.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -714,6 +714,14 @@ static const struct dmi_system_id intel_
},
{
.callback = intel_no_lvds_dmi_callback,
+ .ident = "AOpen i45GMx-I",
+ .matches = {
+ DMI_MATCH(DMI_BOARD_VENDOR, "AOpen"),
+ DMI_MATCH(DMI_BOARD_NAME, "i45GMx-I"),
+ },
+ },
+ {
+ .callback = intel_no_lvds_dmi_callback,
.ident = "Aopen i945GTt-VFA",
.matches = {
DMI_MATCH(DMI_PRODUCT_VERSION, "AO00001JW"),
^ permalink raw reply [flat|nested] 16+ messages in thread
* [04/15] hwmon: (f75375s) Fix bit shifting in f75375_write16
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (2 preceding siblings ...)
2012-02-17 0:55 ` [03/15] drm/i915: no lvds quirk for AOpen MP45 Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [05/15] lib: proportion: lower PROP_MAX_SHIFT to 32 on 64-bit kernel Greg KH
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Nikolaus Schulz, Guenter Roeck
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikolaus Schulz <schulz@macnetix.de>
commit eb2f255b2d360df3f500042a2258dcf2fcbe89a2 upstream.
In order to extract the high byte of the 16-bit word, shift the word to
the right, not to the left.
Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hwmon/f75375s.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hwmon/f75375s.c
+++ b/drivers/hwmon/f75375s.c
@@ -159,7 +159,7 @@ static inline void f75375_write8(struct
static inline void f75375_write16(struct i2c_client *client, u8 reg,
u16 value)
{
- int err = i2c_smbus_write_byte_data(client, reg, (value << 8));
+ int err = i2c_smbus_write_byte_data(client, reg, (value >> 8));
if (err)
return;
i2c_smbus_write_byte_data(client, reg + 1, (value & 0xFF));
^ permalink raw reply [flat|nested] 16+ messages in thread
* [05/15] lib: proportion: lower PROP_MAX_SHIFT to 32 on 64-bit kernel
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (3 preceding siblings ...)
2012-02-17 0:55 ` [04/15] hwmon: (f75375s) Fix bit shifting in f75375_write16 Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [06/15] relay: prevent integer overflow in relay_open() Greg KH
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: torvalds, akpm, alan, Peter Zijlstra, Ilya Tumaykin, Wu Fengguang
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wu Fengguang <fengguang.wu@intel.com>
commit 3310225dfc71a35a2cc9340c15c0e08b14b3c754 upstream.
PROP_MAX_SHIFT should be set to <=32 on 64-bit box. This fixes two bugs
in the below lines of bdi_dirty_limit():
bdi_dirty *= numerator;
do_div(bdi_dirty, denominator);
1) divide error: do_div() only uses the lower 32 bit of the denominator,
which may trimmed to be 0 when PROP_MAX_SHIFT > 32.
2) overflow: (bdi_dirty * numerator) could easily overflow if numerator
used up to 48 bits, leaving only 16 bits to bdi_dirty
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reported-by: Ilya Tumaykin <librarian_rus@yahoo.com>
Tested-by: Ilya Tumaykin <librarian_rus@yahoo.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/linux/proportions.h | 4 ++++
1 file changed, 4 insertions(+)
--- a/include/linux/proportions.h
+++ b/include/linux/proportions.h
@@ -81,7 +81,11 @@ void prop_inc_percpu(struct prop_descrip
* Limit the time part in order to ensure there are some bits left for the
* cycle counter and fraction multiply.
*/
+#if BITS_PER_LONG == 32
#define PROP_MAX_SHIFT (3*BITS_PER_LONG/4)
+#else
+#define PROP_MAX_SHIFT (BITS_PER_LONG/2)
+#endif
#define PROP_FRAC_SHIFT (BITS_PER_LONG - PROP_MAX_SHIFT - 1)
#define PROP_FRAC_BASE (1UL << PROP_FRAC_SHIFT)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [06/15] relay: prevent integer overflow in relay_open()
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (4 preceding siblings ...)
2012-02-17 0:55 ` [05/15] lib: proportion: lower PROP_MAX_SHIFT to 32 on 64-bit kernel Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [07/15] mac80211: timeout a single frame in the rx reorder buffer Greg KH
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Dan Carpenter, Jens Axboe
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <dan.carpenter@oracle.com>
commit f6302f1bcd75a042df69866d98b8d775a668f8f1 upstream.
"subbuf_size" and "n_subbufs" come from the user and they need to be
capped to prevent an integer overflow.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
kernel/relay.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -164,10 +164,14 @@ depopulate:
*/
static struct rchan_buf *relay_create_buf(struct rchan *chan)
{
- struct rchan_buf *buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
- if (!buf)
+ struct rchan_buf *buf;
+
+ if (chan->n_subbufs > UINT_MAX / sizeof(size_t *))
return NULL;
+ buf = kzalloc(sizeof(struct rchan_buf), GFP_KERNEL);
+ if (!buf)
+ return NULL;
buf->padding = kmalloc(chan->n_subbufs * sizeof(size_t *), GFP_KERNEL);
if (!buf->padding)
goto free_buf;
@@ -574,6 +578,8 @@ struct rchan *relay_open(const char *bas
if (!(subbuf_size && n_subbufs))
return NULL;
+ if (subbuf_size > UINT_MAX / n_subbufs)
+ return NULL;
chan = kzalloc(sizeof(struct rchan), GFP_KERNEL);
if (!chan)
^ permalink raw reply [flat|nested] 16+ messages in thread
* [07/15] mac80211: timeout a single frame in the rx reorder buffer
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (5 preceding siblings ...)
2012-02-17 0:55 ` [06/15] relay: prevent integer overflow in relay_open() Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [08/15] writeback: fix dereferencing NULL bdi->dev on trace_writeback_queue Greg KH
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: torvalds, akpm, alan, Eliad Peller, Johannes Berg, John W. Linville
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eliad Peller <eliad@wizery.com>
commit 07ae2dfcf4f7143ce191c6436da1c33f179af0d6 upstream.
The current code checks for stored_mpdu_num > 1, causing
the reorder_timer to be triggered indefinitely, but the
frame is never timed-out (until the next packet is received)
Signed-off-by: Eliad Peller <eliad@wizery.com>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/mac80211/rx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -610,7 +610,7 @@ static void ieee80211_sta_reorder_releas
index = seq_sub(tid_agg_rx->head_seq_num, tid_agg_rx->ssn) %
tid_agg_rx->buf_size;
if (!tid_agg_rx->reorder_buf[index] &&
- tid_agg_rx->stored_mpdu_num > 1) {
+ tid_agg_rx->stored_mpdu_num) {
/*
* No buffers ready to be released, but check whether any
* frames in the reorder buffer have timed out.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [08/15] writeback: fix dereferencing NULL bdi->dev on trace_writeback_queue
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (6 preceding siblings ...)
2012-02-17 0:55 ` [07/15] mac80211: timeout a single frame in the rx reorder buffer Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [09/15] gpio/pca953x: Fix warning of enabled interrupts in handler Greg KH
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: torvalds, akpm, alan, Rabin Vincent, Namjae Jeon, Wu Fengguang
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wu Fengguang <fengguang.wu@intel.com>
commit 977b7e3a52a7421ad33a393a38ece59f3d41c2fa upstream.
When a SD card is hot removed without umount, del_gendisk() will call
bdi_unregister() without destroying/freeing it. This leaves the bdi in
the bdi->dev = NULL, bdi->wb.task = NULL, bdi->bdi_list removed state.
When sync(2) gets the bdi before bdi_unregister() and calls
bdi_queue_work() after the unregister, trace_writeback_queue will be
dereferencing the NULL bdi->dev. Fix it with a simple test for NULL.
LKML-reference: http://lkml.org/lkml/2012/1/18/346
Reported-by: Rabin Vincent <rabin@rab.in>
Tested-by: Namjae Jeon <linkinjeon@gmail.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
include/trace/events/writeback.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/include/trace/events/writeback.h
+++ b/include/trace/events/writeback.h
@@ -23,7 +23,10 @@ DECLARE_EVENT_CLASS(writeback_work_class
__field(int, for_background)
),
TP_fast_assign(
- strncpy(__entry->name, dev_name(bdi->dev), 32);
+ struct device *dev = bdi->dev;
+ if (!dev)
+ dev = default_backing_dev_info.dev;
+ strncpy(__entry->name, dev_name(dev), 32);
__entry->nr_pages = work->nr_pages;
__entry->sb_dev = work->sb ? work->sb->s_dev : 0;
__entry->sync_mode = work->sync_mode;
^ permalink raw reply [flat|nested] 16+ messages in thread
* [09/15] gpio/pca953x: Fix warning of enabled interrupts in handler
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (7 preceding siblings ...)
2012-02-17 0:55 ` [08/15] writeback: fix dereferencing NULL bdi->dev on trace_writeback_queue Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [10/15] hwmon: (f75375s) Fix automatic pwm mode setting for F75373 & F75375 Greg KH
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: torvalds, akpm, alan, David Jander, Grant Likely, Steven Rostedt,
Yong Zhang, Manfred Gruber, Thomas Gleixner
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Jander <david@protonic.nl>
commit 6dd599f8af0166805951f4421a78ba716d78321a upstream.
When using nested threaded irqs, use handle_nested_irq(). This function
does not call the chip handler, so no handler is set.
Signed-off-by: David Jander <david@protonic.nl>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Yong Zhang <yong.zhang0@gmail.com>
Cc: Manfred Gruber <m.gruber@unverspurt.at>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/gpio/pca953x.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/drivers/gpio/pca953x.c
+++ b/drivers/gpio/pca953x.c
@@ -437,7 +437,7 @@ static irqreturn_t pca953x_irq_handler(i
do {
level = __ffs(pending);
- generic_handle_irq(level + chip->irq_base);
+ handle_nested_irq(level + chip->irq_base);
pending &= ~(1 << level);
} while (pending);
@@ -481,8 +481,8 @@ static int pca953x_irq_setup(struct pca9
int irq = lvl + chip->irq_base;
irq_set_chip_data(irq, chip);
- irq_set_chip_and_handler(irq, &pca953x_irq_chip,
- handle_simple_irq);
+ irq_set_chip(irq, &pca953x_irq_chip);
+ irq_set_nested_thread(irq, true);
#ifdef CONFIG_ARM
set_irq_flags(irq, IRQF_VALID);
#else
^ permalink raw reply [flat|nested] 16+ messages in thread
* [10/15] hwmon: (f75375s) Fix automatic pwm mode setting for F75373 & F75375
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (8 preceding siblings ...)
2012-02-17 0:55 ` [09/15] gpio/pca953x: Fix warning of enabled interrupts in handler Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [11/15] crypto: sha512 - Use binary and instead of modulus Greg KH
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Nikolaus Schulz
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikolaus Schulz <schulz@macnetix.de>
commit 09e87e5c4f9af656af2a8a3afc03487c5d9287c3 upstream.
In order to enable temperature mode aka automatic mode for the F75373 and
F75375 chips, the two FANx_MODE bits in the fan configuration register
need be set to 01, not 10.
Signed-off-by: Nikolaus Schulz <mail@microschulz.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/hwmon/f75375s.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hwmon/f75375s.c
+++ b/drivers/hwmon/f75375s.c
@@ -311,7 +311,7 @@ static int set_pwm_enable_direct(struct
fanmode |= (3 << FAN_CTRL_MODE(nr));
break;
case 2: /* AUTOMATIC*/
- fanmode |= (2 << FAN_CTRL_MODE(nr));
+ fanmode |= (1 << FAN_CTRL_MODE(nr));
break;
case 3: /* fan speed */
break;
^ permalink raw reply [flat|nested] 16+ messages in thread
* [11/15] crypto: sha512 - Use binary and instead of modulus
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (9 preceding siblings ...)
2012-02-17 0:55 ` [10/15] hwmon: (f75375s) Fix automatic pwm mode setting for F75373 & F75375 Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [12/15] crypto: sha512 - Avoid stack bloat on i386 Greg KH
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Herbert Xu
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <herbert@gondor.apana.org.au>
commit 58d7d18b5268febb8b1391c6dffc8e2aaa751fcd upstream.
The previous patch used the modulus operator over a power of 2
unnecessarily which may produce suboptimal binary code. This
patch changes changes them to binary ands instead.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
crypto/sha512_generic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -78,7 +78,7 @@ static inline void LOAD_OP(int I, u64 *W
static inline void BLEND_OP(int I, u64 *W)
{
- W[I % 16] += s1(W[(I-2) % 16]) + W[(I-7) % 16] + s0(W[(I-15) % 16]);
+ W[I & 15] += s1(W[(I-2) & 15]) + W[(I-7) & 15] + s0(W[(I-15) & 15]);
}
static void
@@ -105,7 +105,7 @@ sha512_transform(u64 *state, const u8 *i
#define SHA512_16_79(i, a, b, c, d, e, f, g, h) \
BLEND_OP(i, W); \
- t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[(i)%16]; \
+ t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[(i)&15]; \
t2 = e0(a) + Maj(a, b, c); \
d += t1; \
h = t1 + t2
^ permalink raw reply [flat|nested] 16+ messages in thread
* [12/15] crypto: sha512 - Avoid stack bloat on i386
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (10 preceding siblings ...)
2012-02-17 0:55 ` [11/15] crypto: sha512 - Use binary and instead of modulus Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [13/15] ALSA: intel8x0: Fix default inaudible sound on Gateway M520 Greg KH
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Herbert Xu
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <herbert@gondor.apana.org.au>
commit 3a92d687c8015860a19213e3c102cad6b722f83c upstream.
Unfortunately in reducing W from 80 to 16 we ended up unrolling
the loop twice. As gcc has issues dealing with 64-bit ops on
i386 this means that we end up using even more stack space (>1K).
This patch solves the W reduction by moving LOAD_OP/BLEND_OP
into the loop itself, thus avoiding the need to duplicate it.
While the stack space still isn't great (>0.5K) it is at least
in the same ball park as the amount of stack used for our C sha1
implementation.
Note that this patch basically reverts to the original code so
the diff looks bigger than it really is.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
crypto/sha512_generic.c | 68 ++++++++++++++++++++++--------------------------
1 file changed, 32 insertions(+), 36 deletions(-)
--- a/crypto/sha512_generic.c
+++ b/crypto/sha512_generic.c
@@ -89,46 +89,42 @@ sha512_transform(u64 *state, const u8 *i
int i;
u64 W[16];
- /* load the input */
- for (i = 0; i < 16; i++)
- LOAD_OP(i, W, input);
-
/* load the state into our registers */
a=state[0]; b=state[1]; c=state[2]; d=state[3];
e=state[4]; f=state[5]; g=state[6]; h=state[7];
-#define SHA512_0_15(i, a, b, c, d, e, f, g, h) \
- t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[i]; \
- t2 = e0(a) + Maj(a, b, c); \
- d += t1; \
- h = t1 + t2
-
-#define SHA512_16_79(i, a, b, c, d, e, f, g, h) \
- BLEND_OP(i, W); \
- t1 = h + e1(e) + Ch(e, f, g) + sha512_K[i] + W[(i)&15]; \
- t2 = e0(a) + Maj(a, b, c); \
- d += t1; \
- h = t1 + t2
-
- for (i = 0; i < 16; i += 8) {
- SHA512_0_15(i, a, b, c, d, e, f, g, h);
- SHA512_0_15(i + 1, h, a, b, c, d, e, f, g);
- SHA512_0_15(i + 2, g, h, a, b, c, d, e, f);
- SHA512_0_15(i + 3, f, g, h, a, b, c, d, e);
- SHA512_0_15(i + 4, e, f, g, h, a, b, c, d);
- SHA512_0_15(i + 5, d, e, f, g, h, a, b, c);
- SHA512_0_15(i + 6, c, d, e, f, g, h, a, b);
- SHA512_0_15(i + 7, b, c, d, e, f, g, h, a);
- }
- for (i = 16; i < 80; i += 8) {
- SHA512_16_79(i, a, b, c, d, e, f, g, h);
- SHA512_16_79(i + 1, h, a, b, c, d, e, f, g);
- SHA512_16_79(i + 2, g, h, a, b, c, d, e, f);
- SHA512_16_79(i + 3, f, g, h, a, b, c, d, e);
- SHA512_16_79(i + 4, e, f, g, h, a, b, c, d);
- SHA512_16_79(i + 5, d, e, f, g, h, a, b, c);
- SHA512_16_79(i + 6, c, d, e, f, g, h, a, b);
- SHA512_16_79(i + 7, b, c, d, e, f, g, h, a);
+ /* now iterate */
+ for (i=0; i<80; i+=8) {
+ if (!(i & 8)) {
+ int j;
+
+ if (i < 16) {
+ /* load the input */
+ for (j = 0; j < 16; j++)
+ LOAD_OP(i + j, W, input);
+ } else {
+ for (j = 0; j < 16; j++) {
+ BLEND_OP(i + j, W);
+ }
+ }
+ }
+
+ t1 = h + e1(e) + Ch(e,f,g) + sha512_K[i ] + W[(i & 15)];
+ t2 = e0(a) + Maj(a,b,c); d+=t1; h=t1+t2;
+ t1 = g + e1(d) + Ch(d,e,f) + sha512_K[i+1] + W[(i & 15) + 1];
+ t2 = e0(h) + Maj(h,a,b); c+=t1; g=t1+t2;
+ t1 = f + e1(c) + Ch(c,d,e) + sha512_K[i+2] + W[(i & 15) + 2];
+ t2 = e0(g) + Maj(g,h,a); b+=t1; f=t1+t2;
+ t1 = e + e1(b) + Ch(b,c,d) + sha512_K[i+3] + W[(i & 15) + 3];
+ t2 = e0(f) + Maj(f,g,h); a+=t1; e=t1+t2;
+ t1 = d + e1(a) + Ch(a,b,c) + sha512_K[i+4] + W[(i & 15) + 4];
+ t2 = e0(e) + Maj(e,f,g); h+=t1; d=t1+t2;
+ t1 = c + e1(h) + Ch(h,a,b) + sha512_K[i+5] + W[(i & 15) + 5];
+ t2 = e0(d) + Maj(d,e,f); g+=t1; c=t1+t2;
+ t1 = b + e1(g) + Ch(g,h,a) + sha512_K[i+6] + W[(i & 15) + 6];
+ t2 = e0(c) + Maj(c,d,e); f+=t1; b=t1+t2;
+ t1 = a + e1(f) + Ch(f,g,h) + sha512_K[i+7] + W[(i & 15) + 7];
+ t2 = e0(b) + Maj(b,c,d); e+=t1; a=t1+t2;
}
state[0] += a; state[1] += b; state[2] += c; state[3] += d;
^ permalink raw reply [flat|nested] 16+ messages in thread
* [13/15] ALSA: intel8x0: Fix default inaudible sound on Gateway M520
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (11 preceding siblings ...)
2012-02-17 0:55 ` [12/15] crypto: sha512 - Avoid stack bloat on i386 Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [14/15] xen pvhvm: do not remap pirqs onto evtchns if !xen_have_vector_callback Greg KH
2012-02-17 0:55 ` [15/15] slub: fix a possible memleak in __slab_alloc() Greg KH
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: torvalds, akpm, alan, Daniel T Chen, Takashi Iwai
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit 27c3afe6e1cf129faac90405121203962da08ff4 upstream.
BugLink: https://bugs.launchpad.net/bugs/930842
The reporter states that audio is inaudible by default without muting
'External Amplifier'. Add a quirk to handle his SSID so that changing
the control is not necessary.
Reported-and-tested-by: Benjamin Carlson <elderbubba0810@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
sound/pci/intel8x0.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -2076,6 +2076,12 @@ static struct ac97_quirk ac97_quirks[] _
},
{
.subvendor = 0x161f,
+ .subdevice = 0x202f,
+ .name = "Gateway M520",
+ .type = AC97_TUNE_INV_EAPD
+ },
+ {
+ .subvendor = 0x161f,
.subdevice = 0x203a,
.name = "Gateway 4525GZ", /* AD1981B */
.type = AC97_TUNE_INV_EAPD
^ permalink raw reply [flat|nested] 16+ messages in thread
* [14/15] xen pvhvm: do not remap pirqs onto evtchns if !xen_have_vector_callback
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (12 preceding siblings ...)
2012-02-17 0:55 ` [13/15] ALSA: intel8x0: Fix default inaudible sound on Gateway M520 Greg KH
@ 2012-02-17 0:55 ` Greg KH
2012-02-17 0:55 ` [15/15] slub: fix a possible memleak in __slab_alloc() Greg KH
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: torvalds, akpm, alan, Stefano Stabellini, Konrad Rzeszutek Wilk
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
commit 207d543f472c1ac9552df79838dc807cbcaa9740 upstream.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/pci/xen.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/x86/pci/xen.c
+++ b/arch/x86/pci/xen.c
@@ -308,7 +308,7 @@ int __init pci_xen_init(void)
int __init pci_xen_hvm_init(void)
{
- if (!xen_feature(XENFEAT_hvm_pirqs))
+ if (!xen_have_vector_callback || !xen_feature(XENFEAT_hvm_pirqs))
return 0;
#ifdef CONFIG_ACPI
^ permalink raw reply [flat|nested] 16+ messages in thread
* [15/15] slub: fix a possible memleak in __slab_alloc()
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
` (13 preceding siblings ...)
2012-02-17 0:55 ` [14/15] xen pvhvm: do not remap pirqs onto evtchns if !xen_have_vector_callback Greg KH
@ 2012-02-17 0:55 ` Greg KH
14 siblings, 0 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: torvalds, akpm, alan, Zhihua Che, Eric Dumazet,
Christoph Lameter, Pekka Enberg
3.0-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <eric.dumazet@gmail.com>
commit 73736e0387ba0e6d2b703407b4d26168d31516a7 upstream.
Zhihua Che reported a possible memleak in slub allocator on
CONFIG_PREEMPT=y builds.
It is possible current thread migrates right before disabling irqs in
__slab_alloc(). We must check again c->freelist, and perform a normal
allocation instead of scratching c->freelist.
Many thanks to Zhihua Che for spotting this bug, introduced in 2.6.39
V2: Its also possible an IRQ freed one (or several) object(s) and
populated c->freelist, so its not a CONFIG_PREEMPT only problem.
Reported-by: Zhihua Che <zhihua.che@gmail.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
mm/slub.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -1818,6 +1818,11 @@ static void *__slab_alloc(struct kmem_ca
if (unlikely(!node_match(c, node)))
goto another_slab;
+ /* must check again c->freelist in case of cpu migration or IRQ */
+ object = c->freelist;
+ if (object)
+ goto update_freelist;
+
stat(s, ALLOC_REFILL);
load_freelist:
@@ -1827,6 +1832,7 @@ load_freelist:
if (kmem_cache_debug(s))
goto debug;
+update_freelist:
c->freelist = get_freepointer(s, object);
page->inuse = page->objects;
page->freelist = NULL;
^ permalink raw reply [flat|nested] 16+ messages in thread
* [00/15] 3.0.22-stable review
@ 2012-02-17 0:56 Greg KH
2012-02-17 0:55 ` [01/15] perf evsel: Fix an issue where perf report fails to show the proper percentage Greg KH
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: Greg KH @ 2012-02-17 0:56 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: torvalds, akpm, alan
This is the start of the stable review cycle for the 3.0.22 release.
There are 15 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Sun Feb 19 00:55:09 UTC 2012.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
kernel.org/pub/linux/kernel/v3.0/stable-review/patch-3.0.22-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
-------------
Makefile | 4 +-
arch/x86/pci/xen.c | 2 +-
crypto/sha512_generic.c | 70 ++++++++++++++----------------
drivers/gpio/pca953x.c | 6 +-
drivers/gpu/drm/i915/intel_lvds.c | 8 +++
drivers/hwmon/f75375s.c | 4 +-
include/linux/proportions.h | 4 ++
include/trace/events/writeback.h | 5 ++-
kernel/relay.c | 10 +++-
mm/slub.c | 6 +++
net/mac80211/rx.c | 2 +-
sound/pci/intel8x0.c | 6 +++
tools/perf/bench/mem-memcpy-x86-64-asm.S | 6 +++
tools/perf/util/evsel.c | 1 +
14 files changed, 85 insertions(+), 49 deletions(-)
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2012-02-17 1:09 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-17 0:56 [00/15] 3.0.22-stable review Greg KH
2012-02-17 0:55 ` [01/15] perf evsel: Fix an issue where perf report fails to show the proper percentage Greg KH
2012-02-17 0:55 ` [02/15] perf tools: Fix perf stack to non executable on x86_64 Greg KH
2012-02-17 0:55 ` [03/15] drm/i915: no lvds quirk for AOpen MP45 Greg KH
2012-02-17 0:55 ` [04/15] hwmon: (f75375s) Fix bit shifting in f75375_write16 Greg KH
2012-02-17 0:55 ` [05/15] lib: proportion: lower PROP_MAX_SHIFT to 32 on 64-bit kernel Greg KH
2012-02-17 0:55 ` [06/15] relay: prevent integer overflow in relay_open() Greg KH
2012-02-17 0:55 ` [07/15] mac80211: timeout a single frame in the rx reorder buffer Greg KH
2012-02-17 0:55 ` [08/15] writeback: fix dereferencing NULL bdi->dev on trace_writeback_queue Greg KH
2012-02-17 0:55 ` [09/15] gpio/pca953x: Fix warning of enabled interrupts in handler Greg KH
2012-02-17 0:55 ` [10/15] hwmon: (f75375s) Fix automatic pwm mode setting for F75373 & F75375 Greg KH
2012-02-17 0:55 ` [11/15] crypto: sha512 - Use binary and instead of modulus Greg KH
2012-02-17 0:55 ` [12/15] crypto: sha512 - Avoid stack bloat on i386 Greg KH
2012-02-17 0:55 ` [13/15] ALSA: intel8x0: Fix default inaudible sound on Gateway M520 Greg KH
2012-02-17 0:55 ` [14/15] xen pvhvm: do not remap pirqs onto evtchns if !xen_have_vector_callback Greg KH
2012-02-17 0:55 ` [15/15] slub: fix a possible memleak in __slab_alloc() Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).