* [001/114] memstick: init sysfs attributes
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [002/114] memstick: fix hangs on unexpected device removal in mspro_blk Greg KH
` (112 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Maxim Levitsky, Alex Dubov
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Maxim Levitsky <maximlevitsky@gmail.com>
commit 21fd0495ea61d53e0ebe575330e343ce4e6d2a61 upstream.
Otherwise lockdep complains.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/memstick/core/mspro_block.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -1040,6 +1040,7 @@ static int mspro_block_read_attributes(s
snprintf(s_attr->name, sizeof(s_attr->name),
"attr_x%02x", attr->entries[cnt].id);
+ sysfs_attr_init(&s_attr->dev_attr.attr);
s_attr->dev_attr.attr.name = s_attr->name;
s_attr->dev_attr.attr.mode = S_IRUGO;
s_attr->dev_attr.show = mspro_block_attr_show(s_attr->id);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [002/114] memstick: fix hangs on unexpected device removal in mspro_blk
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
2010-08-24 22:44 ` [001/114] memstick: init sysfs attributes Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [003/114] acpi: fix bogus preemption logic Greg KH
` (111 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Maxim Levitsky, Alex Dubov
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Maxim Levitsky <maximlevitsky@gmail.com>
commit d862b13bc8cbab9692fbe0ef44c40d0488b81af1 upstream.
mspro_block_remove() is called from detect thread that first calls the
mspro_block_stop(), which stops the request queue. If we call
del_gendisk() with the queue stopped we get a deadlock.
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: Alex Dubov <oakad@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/memstick/core/mspro_block.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -1331,13 +1331,14 @@ static void mspro_block_remove(struct me
struct mspro_block_data *msb = memstick_get_drvdata(card);
unsigned long flags;
- del_gendisk(msb->disk);
- dev_dbg(&card->dev, "mspro block remove\n");
spin_lock_irqsave(&msb->q_lock, flags);
msb->eject = 1;
blk_start_queue(msb->queue);
spin_unlock_irqrestore(&msb->q_lock, flags);
+ del_gendisk(msb->disk);
+ dev_dbg(&card->dev, "mspro block remove\n");
+
blk_cleanup_queue(msb->queue);
msb->queue = NULL;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [003/114] acpi: fix bogus preemption logic
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
2010-08-24 22:44 ` [001/114] memstick: init sysfs attributes Greg KH
2010-08-24 22:44 ` [002/114] memstick: fix hangs on unexpected device removal in mspro_blk Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [004/114] ASoC: Fix inverted mute controls for WM8580 Greg KH
` (110 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas Gleixner, Len Brown,
Francois Valenduc, Lin Ming
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
commit 0a7992c90828a65281c3c9cf180be3b432d277b2 upstream.
The ACPI_PREEMPTION_POINT() logic was introduced in commit 8bd108d
(ACPICA: add preemption point after each opcode parse). The follow up
commits abe1dfab6, 138d15692, c084ca70 tried to fix the preemption logic
back and forth, but nobody noticed that the usage of
in_atomic_preempt_off() in that context is wrong.
The check which guards the call of cond_resched() is:
if (!in_atomic_preempt_off() && !irqs_disabled())
in_atomic_preempt_off() is not intended for general use as the comment
above the macro definition clearly says:
* Check whether we were atomic before we did preempt_disable():
* (used by the scheduler, *after* releasing the kernel lock)
On a CONFIG_PREEMPT=n kernel the usage of in_atomic_preempt_off() works by
accident, but with CONFIG_PREEMPT=y it's just broken.
The whole purpose of the ACPI_PREEMPTION_POINT() is to reduce the latency
on a CONFIG_PREEMPT=n kernel, so make ACPI_PREEMPTION_POINT() depend on
CONFIG_PREEMPT=n and remove the in_atomic_preempt_off() check.
Addresses https://bugzilla.kernel.org/show_bug.cgi?id=16210
[akpm@linux-foundation.org: fix build]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Len Brown <lenb@kernel.org>
Cc: Francois Valenduc <francois.valenduc@tvcablenet.be>
Cc: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/acpi/apei/erst.c | 1 +
include/acpi/platform/aclinux.h | 10 +++++++---
2 files changed, 8 insertions(+), 3 deletions(-)
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -33,6 +33,7 @@
#include <linux/uaccess.h>
#include <linux/cper.h>
#include <linux/nmi.h>
+#include <linux/hardirq.h>
#include <acpi/apei.h>
#include "apei-internal.h"
--- a/include/acpi/platform/aclinux.h
+++ b/include/acpi/platform/aclinux.h
@@ -148,13 +148,17 @@ static inline void *acpi_os_acquire_obje
#define ACPI_ALLOCATE_ZEROED(a) acpi_os_allocate_zeroed(a)
#define ACPI_FREE(a) kfree(a)
-/* Used within ACPICA to show where it is safe to preempt execution */
-#include <linux/hardirq.h>
+#ifndef CONFIG_PREEMPT
+/*
+ * Used within ACPICA to show where it is safe to preempt execution
+ * when CONFIG_PREEMPT=n
+ */
#define ACPI_PREEMPTION_POINT() \
do { \
- if (!in_atomic_preempt_off() && !irqs_disabled()) \
+ if (!irqs_disabled()) \
cond_resched(); \
} while (0)
+#endif
#endif /* __KERNEL__ */
^ permalink raw reply [flat|nested] 115+ messages in thread
* [004/114] ASoC: Fix inverted mute controls for WM8580
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (2 preceding siblings ...)
2010-08-24 22:44 ` [003/114] acpi: fix bogus preemption logic Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [005/114] ASoC: Remove DSP mode support for WM8776 Greg KH
` (109 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mark Brown, Liam Girdwood
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
commit 4f0ed9a51bc8ef16c2589112fdb110479e4b0df1 upstream.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/soc/codecs/wm8580.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -269,9 +269,9 @@ SOC_DOUBLE("DAC2 Invert Switch", WM8580_
SOC_DOUBLE("DAC3 Invert Switch", WM8580_DAC_CONTROL4, 4, 5, 1, 0),
SOC_SINGLE("DAC ZC Switch", WM8580_DAC_CONTROL5, 5, 1, 0),
-SOC_SINGLE("DAC1 Switch", WM8580_DAC_CONTROL5, 0, 1, 0),
-SOC_SINGLE("DAC2 Switch", WM8580_DAC_CONTROL5, 1, 1, 0),
-SOC_SINGLE("DAC3 Switch", WM8580_DAC_CONTROL5, 2, 1, 0),
+SOC_SINGLE("DAC1 Switch", WM8580_DAC_CONTROL5, 0, 1, 1),
+SOC_SINGLE("DAC2 Switch", WM8580_DAC_CONTROL5, 1, 1, 1),
+SOC_SINGLE("DAC3 Switch", WM8580_DAC_CONTROL5, 2, 1, 1),
SOC_DOUBLE("ADC Mute Switch", WM8580_ADC_CONTROL1, 0, 1, 1, 0),
SOC_SINGLE("ADC High-Pass Filter Switch", WM8580_ADC_CONTROL1, 4, 1, 0),
^ permalink raw reply [flat|nested] 115+ messages in thread
* [005/114] ASoC: Remove DSP mode support for WM8776
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (3 preceding siblings ...)
2010-08-24 22:44 ` [004/114] ASoC: Fix inverted mute controls for WM8580 Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [006/114] ASoC: register cache should be 1 byte aligned for 1 byte long register Greg KH
` (108 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mark Brown, Liam Girdwood
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
commit b2c1e07b81a126e5846dfc3d36f559d861df59f4 upstream.
This is not supported by current hardware revisions.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/soc/codecs/wm8776.c | 7 -------
1 file changed, 7 deletions(-)
--- a/sound/soc/codecs/wm8776.c
+++ b/sound/soc/codecs/wm8776.c
@@ -178,13 +178,6 @@ static int wm8776_set_fmt(struct snd_soc
case SND_SOC_DAIFMT_LEFT_J:
iface |= 0x0001;
break;
- /* FIXME: CHECK A/B */
- case SND_SOC_DAIFMT_DSP_A:
- iface |= 0x0003;
- break;
- case SND_SOC_DAIFMT_DSP_B:
- iface |= 0x0007;
- break;
default:
return -EINVAL;
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [006/114] ASoC: register cache should be 1 byte aligned for 1 byte long register
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (4 preceding siblings ...)
2010-08-24 22:44 ` [005/114] ASoC: Remove DSP mode support for WM8776 Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [007/114] regulator: Default GPIO controlled WM8994 regulators to disabled Greg KH
` (107 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Cliff Cai, Mike Frysinger,
Liam Girdwood, Mark Brown
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Cliff Cai <cliff.cai@analog.com>
commit ac770267a7cd85a747b6111db46f66d1515e7cd7 upstream.
Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/soc/soc-cache.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/sound/soc/soc-cache.c
+++ b/sound/soc/soc-cache.c
@@ -340,7 +340,7 @@ static unsigned int snd_soc_16_8_read_i2
static unsigned int snd_soc_16_8_read(struct snd_soc_codec *codec,
unsigned int reg)
{
- u16 *cache = codec->reg_cache;
+ u8 *cache = codec->reg_cache;
reg &= 0xff;
if (reg >= codec->reg_cache_size)
@@ -351,7 +351,7 @@ static unsigned int snd_soc_16_8_read(st
static int snd_soc_16_8_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int value)
{
- u16 *cache = codec->reg_cache;
+ u8 *cache = codec->reg_cache;
u8 data[3];
int ret;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [007/114] regulator: Default GPIO controlled WM8994 regulators to disabled
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (5 preceding siblings ...)
2010-08-24 22:44 ` [006/114] ASoC: register cache should be 1 byte aligned for 1 byte long register Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [008/114] ALSA: riptide - Fix detection / load of firmware files Greg KH
` (106 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Joonyoung Shim, Mark Brown,
Liam Girdwood
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Joonyoung Shim <jy0922.shim@samsung.com>
commit c4604e49c1a5832a58789a22eba7ca982933e1be upstream.
This ensures that if the GPIO was not enabled prior to the driver
starting the regulator API will insert the required powerup ramp
delay when it enables the regulator. The gpiolib API does not
provide this information.
[Rewrote changelog to describe the actual change -- broonie.]
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/regulator/wm8994-regulator.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/drivers/regulator/wm8994-regulator.c
+++ b/drivers/regulator/wm8994-regulator.c
@@ -219,8 +219,6 @@ static __devinit int wm8994_ldo_probe(st
ldo->wm8994 = wm8994;
- ldo->is_enabled = true;
-
if (pdata->ldo[id].enable && gpio_is_valid(pdata->ldo[id].enable)) {
ldo->enable = pdata->ldo[id].enable;
@@ -237,7 +235,8 @@ static __devinit int wm8994_ldo_probe(st
ret);
goto err_gpio;
}
- }
+ } else
+ ldo->is_enabled = true;
ldo->regulator = regulator_register(&wm8994_ldo_desc[id], &pdev->dev,
pdata->ldo[id].init_data, ldo);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [008/114] ALSA: riptide - Fix detection / load of firmware files
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (6 preceding siblings ...)
2010-08-24 22:44 ` [007/114] regulator: Default GPIO controlled WM8994 regulators to disabled Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [009/114] ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter) Greg KH
` (105 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Takashi Iwai
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit a5ba6beb839cfa288960c92cd2668a2601c24dda upstream.
The detection and loading of firmeware on riptide driver has been broken
due to rewrite of some codes, checking the presense wrongly.
This patch fixes the logic again.
Reference: kernel bug 16596
https://bugzilla.kernel.org/show_bug.cgi?id=16596
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/riptide/riptide.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
--- a/sound/pci/riptide/riptide.c
+++ b/sound/pci/riptide/riptide.c
@@ -1224,15 +1224,14 @@ static int try_to_load_firmware(struct c
firmware.firmware.ASIC, firmware.firmware.CODEC,
firmware.firmware.AUXDSP, firmware.firmware.PROG);
+ if (!chip)
+ return 1;
+
for (i = 0; i < FIRMWARE_VERSIONS; i++) {
if (!memcmp(&firmware_versions[i], &firmware, sizeof(firmware)))
- break;
- }
- if (i >= FIRMWARE_VERSIONS)
- return 0; /* no match */
+ return 1; /* OK */
- if (!chip)
- return 1; /* OK */
+ }
snd_printdd("Writing Firmware\n");
if (!chip->fw_entry) {
^ permalink raw reply [flat|nested] 115+ messages in thread
* [009/114] ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter)
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (7 preceding siblings ...)
2010-08-24 22:44 ` [008/114] ALSA: riptide - Fix detection / load of firmware files Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [010/114] ALSA: hda - Fix missing stream for second ADC on Realtek ALC260 HDA codec Greg KH
` (104 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jaroslav Kysela,
Takashi Iwai
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jaroslav Kysela <perex@perex.cz>
commit 56385a12d9bb9e173751f74b6c430742018cafc0 upstream.
With some hardware combinations, the PCM interrupts are acknowledged
before the period boundary from the emu10k1 chip. The midlevel PCM code
gets confused and the playback stream is interrupted.
It seems that the interrupt processing shift by 2 samples is enough
to fix this issue. This default value does not harm other,
non-affected hardware.
More information: Kernel bugzilla bug#16300
[A copmile warning fixed by tiwai]
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/sound/emu10k1.h | 1 +
sound/core/pcm_native.c | 4 ++++
sound/pci/emu10k1/emu10k1.c | 4 ++++
sound/pci/emu10k1/emupcm.c | 30 ++++++++++++++++++++++++++----
sound/pci/emu10k1/memory.c | 4 +++-
5 files changed, 38 insertions(+), 5 deletions(-)
--- a/include/sound/emu10k1.h
+++ b/include/sound/emu10k1.h
@@ -1707,6 +1707,7 @@ struct snd_emu10k1 {
unsigned int card_type; /* EMU10K1_CARD_* */
unsigned int ecard_ctrl; /* ecard control bits */
unsigned long dma_mask; /* PCI DMA mask */
+ unsigned int delay_pcm_irq; /* in samples */
int max_cache_pages; /* max memory size / PAGE_SIZE */
struct snd_dma_buffer silent_page; /* silent page */
struct snd_dma_buffer ptb_pages; /* page table pages */
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -981,6 +981,10 @@ static int snd_pcm_do_pause(struct snd_p
{
if (substream->runtime->trigger_master != substream)
return 0;
+ /* some drivers might use hw_ptr to recover from the pause -
+ update the hw_ptr now */
+ if (push)
+ snd_pcm_update_hw_ptr(substream);
/* The jiffies check in snd_pcm_update_hw_ptr*() is done by
* a delta betwen the current jiffies, this gives a large enough
* delta, effectively to skip the check once.
--- a/sound/pci/emu10k1/emu10k1.c
+++ b/sound/pci/emu10k1/emu10k1.c
@@ -52,6 +52,7 @@ static int max_synth_voices[SNDRV_CARDS]
static int max_buffer_size[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 128};
static int enable_ir[SNDRV_CARDS];
static uint subsystem[SNDRV_CARDS]; /* Force card subsystem model */
+static uint delay_pcm_irq[SNDRV_CARDS] = {[0 ... (SNDRV_CARDS - 1)] = 2};
module_param_array(index, int, NULL, 0444);
MODULE_PARM_DESC(index, "Index value for the EMU10K1 soundcard.");
@@ -73,6 +74,8 @@ module_param_array(enable_ir, bool, NULL
MODULE_PARM_DESC(enable_ir, "Enable IR.");
module_param_array(subsystem, uint, NULL, 0444);
MODULE_PARM_DESC(subsystem, "Force card subsystem model.");
+module_param_array(delay_pcm_irq, uint, NULL, 0444);
+MODULE_PARM_DESC(delay_pcm_irq, "Delay PCM interrupt by specified number of samples (default 0).");
/*
* Class 0401: 1102:0008 (rev 00) Subsystem: 1102:1001 -> Audigy2 Value Model:SB0400
*/
@@ -127,6 +130,7 @@ static int __devinit snd_card_emu10k1_pr
&emu)) < 0)
goto error;
card->private_data = emu;
+ emu->delay_pcm_irq = delay_pcm_irq[dev] & 0x1f;
if ((err = snd_emu10k1_pcm(emu, 0, NULL)) < 0)
goto error;
if ((err = snd_emu10k1_pcm_mic(emu, 1, NULL)) < 0)
--- a/sound/pci/emu10k1/emupcm.c
+++ b/sound/pci/emu10k1/emupcm.c
@@ -332,7 +332,7 @@ static void snd_emu10k1_pcm_init_voice(s
evoice->epcm->ccca_start_addr = start_addr + ccis;
if (extra) {
start_addr += ccis;
- end_addr += ccis;
+ end_addr += ccis + emu->delay_pcm_irq;
}
if (stereo && !extra) {
snd_emu10k1_ptr_write(emu, CPF, voice, CPF_STEREO_MASK);
@@ -360,7 +360,9 @@ static void snd_emu10k1_pcm_init_voice(s
/* Assumption that PT is already 0 so no harm overwriting */
snd_emu10k1_ptr_write(emu, PTRX, voice, (send_amount[0] << 8) | send_amount[1]);
snd_emu10k1_ptr_write(emu, DSL, voice, end_addr | (send_amount[3] << 24));
- snd_emu10k1_ptr_write(emu, PSST, voice, start_addr | (send_amount[2] << 24));
+ snd_emu10k1_ptr_write(emu, PSST, voice,
+ (start_addr + (extra ? emu->delay_pcm_irq : 0)) |
+ (send_amount[2] << 24));
if (emu->card_capabilities->emu_model)
pitch_target = PITCH_48000; /* Disable interpolators on emu1010 card */
else
@@ -732,6 +734,23 @@ static void snd_emu10k1_playback_stop_vo
snd_emu10k1_ptr_write(emu, IP, voice, 0);
}
+static inline void snd_emu10k1_playback_mangle_extra(struct snd_emu10k1 *emu,
+ struct snd_emu10k1_pcm *epcm,
+ struct snd_pcm_substream *substream,
+ struct snd_pcm_runtime *runtime)
+{
+ unsigned int ptr, period_pos;
+
+ /* try to sychronize the current position for the interrupt
+ source voice */
+ period_pos = runtime->status->hw_ptr - runtime->hw_ptr_interrupt;
+ period_pos %= runtime->period_size;
+ ptr = snd_emu10k1_ptr_read(emu, CCCA, epcm->extra->number);
+ ptr &= ~0x00ffffff;
+ ptr |= epcm->ccca_start_addr + period_pos;
+ snd_emu10k1_ptr_write(emu, CCCA, epcm->extra->number, ptr);
+}
+
static int snd_emu10k1_playback_trigger(struct snd_pcm_substream *substream,
int cmd)
{
@@ -753,6 +772,8 @@ static int snd_emu10k1_playback_trigger(
/* follow thru */
case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
case SNDRV_PCM_TRIGGER_RESUME:
+ if (cmd == SNDRV_PCM_TRIGGER_PAUSE_RELEASE)
+ snd_emu10k1_playback_mangle_extra(emu, epcm, substream, runtime);
mix = &emu->pcm_mixer[substream->number];
snd_emu10k1_playback_prepare_voice(emu, epcm->voices[0], 1, 0, mix);
snd_emu10k1_playback_prepare_voice(emu, epcm->voices[1], 0, 0, mix);
@@ -869,8 +890,9 @@ static snd_pcm_uframes_t snd_emu10k1_pla
#endif
/*
printk(KERN_DEBUG
- "ptr = 0x%x, buffer_size = 0x%x, period_size = 0x%x\n",
- ptr, runtime->buffer_size, runtime->period_size);
+ "ptr = 0x%lx, buffer_size = 0x%lx, period_size = 0x%lx\n",
+ (long)ptr, (long)runtime->buffer_size,
+ (long)runtime->period_size);
*/
return ptr;
}
--- a/sound/pci/emu10k1/memory.c
+++ b/sound/pci/emu10k1/memory.c
@@ -310,8 +310,10 @@ snd_emu10k1_alloc_pages(struct snd_emu10
if (snd_BUG_ON(!hdr))
return NULL;
+ idx = runtime->period_size >= runtime->buffer_size ?
+ (emu->delay_pcm_irq * 2) : 0;
mutex_lock(&hdr->block_mutex);
- blk = search_empty(emu, runtime->dma_bytes);
+ blk = search_empty(emu, runtime->dma_bytes + idx);
if (blk == NULL) {
mutex_unlock(&hdr->block_mutex);
return NULL;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [010/114] ALSA: hda - Fix missing stream for second ADC on Realtek ALC260 HDA codec
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (8 preceding siblings ...)
2010-08-24 22:44 ` [009/114] ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter) Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [011/114] ALSA: hda - Add quirk for Dell Vostro 1220 Greg KH
` (103 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jonathan Woithe,
Takashi Iwai
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
commit 53bacfbbb2ddd981287b58a511c8b8f5df179886 upstream.
I discovered tonight that ALSA no longer sets up a stream for the second ADC
provided by the Realtek ALC260 HDA codec. At some point alc_build_pcms()
started using stream_analog_alt_capture when constructing the second ADC
stream, but patch_alc260() was never updated accordingly. I have no idea
when this regression occurred. The trivial patch to patch_alc260() given
below fixes the problem as far as I can tell. The patch is against 2.6.35.
Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6864,6 +6864,7 @@ static int patch_alc260(struct hda_codec
spec->stream_analog_playback = &alc260_pcm_analog_playback;
spec->stream_analog_capture = &alc260_pcm_analog_capture;
+ spec->stream_analog_alt_capture = &alc260_pcm_analog_capture;
spec->stream_digital_playback = &alc260_pcm_digital_playback;
spec->stream_digital_capture = &alc260_pcm_digital_capture;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [011/114] ALSA: hda - Add quirk for Dell Vostro 1220
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (9 preceding siblings ...)
2010-08-24 22:44 ` [010/114] ALSA: hda - Fix missing stream for second ADC on Realtek ALC260 HDA codec Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [012/114] ocfs2: do not overwrite error codes in ocfs2_init_acl Greg KH
` (102 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Takashi Iwai
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit c3e68fad88143fd1fe8fe640207fb19c0f087dbc upstream.
model=dell-vostro is needed for Dell Vostro 1220 with Coexnat 5067.
Reference: Novell bnc#631066
https://bugzilla.novell.com/show_bug.cgi?id=631066
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/patch_conexant.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -2970,6 +2970,7 @@ static struct snd_pci_quirk cxt5066_cfg_
SND_PCI_QUIRK(0x1028, 0x02f5, "Dell",
CXT5066_DELL_LAPTOP),
SND_PCI_QUIRK(0x152d, 0x0833, "OLPC XO-1.5", CXT5066_OLPC_XO_1_5),
+ SND_PCI_QUIRK(0x1028, 0x02d8, "Dell Vostro", CXT5066_DELL_VOSTO),
SND_PCI_QUIRK(0x1028, 0x0402, "Dell Vostro", CXT5066_DELL_VOSTO),
SND_PCI_QUIRK(0x1028, 0x0408, "Dell Inspiron One 19T", CXT5066_IDEAPAD),
SND_PCI_QUIRK(0x1179, 0xff50, "Toshiba Satellite P500-PSPGSC-01800T", CXT5066_OLPC_XO_1_5),
^ permalink raw reply [flat|nested] 115+ messages in thread
* [012/114] ocfs2: do not overwrite error codes in ocfs2_init_acl
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (10 preceding siblings ...)
2010-08-24 22:44 ` [011/114] ALSA: hda - Add quirk for Dell Vostro 1220 Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [013/114] ocfs2/dlm: fix a dead lock Greg KH
` (101 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tiger Yang, Joel Becker
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tiger Yang <tiger.yang@oracle.com>
commit 6eda3dd33f8a0ce58ee56a11351758643a698db4 upstream.
Setting the acl while creating a new inode depends on
the error codes of posix_acl_create_masq. This patch fix
a issue of overwriting the error codes of it.
Reported-by: Pawel Zawora <pzawora@gmail.com>
Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ocfs2/acl.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -344,7 +344,7 @@ int ocfs2_init_acl(handle_t *handle,
{
struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
struct posix_acl *acl = NULL;
- int ret = 0;
+ int ret = 0, ret2;
mode_t mode;
if (!S_ISLNK(inode->i_mode)) {
@@ -381,7 +381,12 @@ int ocfs2_init_acl(handle_t *handle,
mode = inode->i_mode;
ret = posix_acl_create_masq(clone, &mode);
if (ret >= 0) {
- ret = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
+ ret2 = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
+ if (ret2) {
+ mlog_errno(ret2);
+ ret = ret2;
+ goto cleanup;
+ }
if (ret > 0) {
ret = ocfs2_set_acl(handle, inode,
di_bh, ACL_TYPE_ACCESS,
^ permalink raw reply [flat|nested] 115+ messages in thread
* [013/114] ocfs2/dlm: fix a dead lock
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (11 preceding siblings ...)
2010-08-24 22:44 ` [012/114] ocfs2: do not overwrite error codes in ocfs2_init_acl Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [014/114] ocfs2 fix o2dlm dlm run purgelist (rev 3) Greg KH
` (100 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Wengang Wang, Joel Becker
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Wengang Wang <wen.gang.wang@oracle.com>
commit 6d98c3ccb52f692f1a60339dde7c700686a5568b upstream.
When we have to take both dlm->master_lock and lockres->spinlock,
take them in order
lockres->spinlock and then dlm->master_lock.
The patch fixes a violation of the rule.
We can simply move taking dlm->master_lock to where we have dropped res->spinlock
since when we access res->state and free mle memory we don't need master_lock's
protection.
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ocfs2/dlm/dlmmaster.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -3050,8 +3050,6 @@ int dlm_migrate_request_handler(struct o
/* check for pre-existing lock */
spin_lock(&dlm->spinlock);
res = __dlm_lookup_lockres(dlm, name, namelen, hash);
- spin_lock(&dlm->master_lock);
-
if (res) {
spin_lock(&res->spinlock);
if (res->state & DLM_LOCK_RES_RECOVERING) {
@@ -3069,14 +3067,15 @@ int dlm_migrate_request_handler(struct o
spin_unlock(&res->spinlock);
}
+ spin_lock(&dlm->master_lock);
/* ignore status. only nonzero status would BUG. */
ret = dlm_add_migration_mle(dlm, res, mle, &oldmle,
name, namelen,
migrate->new_master,
migrate->master);
-unlock:
spin_unlock(&dlm->master_lock);
+unlock:
spin_unlock(&dlm->spinlock);
if (oldmle) {
^ permalink raw reply [flat|nested] 115+ messages in thread
* [014/114] ocfs2 fix o2dlm dlm run purgelist (rev 3)
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (12 preceding siblings ...)
2010-08-24 22:44 ` [013/114] ocfs2/dlm: fix a dead lock Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [015/114] ocfs2: Count more refcount records in file system fragmentation Greg KH
` (99 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Srinivas Eeda, Sunil Mushran,
Joel Becker
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Srinivas Eeda <srinivas.eeda@oracle.com>
commit 7beaf243787f85a2ef9213ccf13ab4a243283fde upstream.
This patch fixes two problems in dlm_run_purgelist
1. If a lockres is found to be in use, dlm_run_purgelist keeps trying to purge
the same lockres instead of trying the next lockres.
2. When a lockres is found unused, dlm_run_purgelist releases lockres spinlock
before setting DLM_LOCK_RES_DROPPING_REF and calls dlm_purge_lockres.
spinlock is reacquired but in this window lockres can get reused. This leads
to BUG.
This patch modifies dlm_run_purgelist to skip lockres if it's in use and purge
next lockres. It also sets DLM_LOCK_RES_DROPPING_REF before releasing the
lockres spinlock protecting it from getting reused.
Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Acked-by: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ocfs2/dlm/dlmthread.c | 80 +++++++++++++++++++----------------------------
1 file changed, 34 insertions(+), 46 deletions(-)
--- a/fs/ocfs2/dlm/dlmthread.c
+++ b/fs/ocfs2/dlm/dlmthread.c
@@ -152,45 +152,25 @@ void dlm_lockres_calc_usage(struct dlm_c
spin_unlock(&dlm->spinlock);
}
-static int dlm_purge_lockres(struct dlm_ctxt *dlm,
+static void dlm_purge_lockres(struct dlm_ctxt *dlm,
struct dlm_lock_resource *res)
{
int master;
int ret = 0;
- spin_lock(&res->spinlock);
- if (!__dlm_lockres_unused(res)) {
- mlog(0, "%s:%.*s: tried to purge but not unused\n",
- dlm->name, res->lockname.len, res->lockname.name);
- __dlm_print_one_lock_resource(res);
- spin_unlock(&res->spinlock);
- BUG();
- }
-
- if (res->state & DLM_LOCK_RES_MIGRATING) {
- mlog(0, "%s:%.*s: Delay dropref as this lockres is "
- "being remastered\n", dlm->name, res->lockname.len,
- res->lockname.name);
- /* Re-add the lockres to the end of the purge list */
- if (!list_empty(&res->purge)) {
- list_del_init(&res->purge);
- list_add_tail(&res->purge, &dlm->purge_list);
- }
- spin_unlock(&res->spinlock);
- return 0;
- }
+ assert_spin_locked(&dlm->spinlock);
+ assert_spin_locked(&res->spinlock);
master = (res->owner == dlm->node_num);
- if (!master)
- res->state |= DLM_LOCK_RES_DROPPING_REF;
- spin_unlock(&res->spinlock);
mlog(0, "purging lockres %.*s, master = %d\n", res->lockname.len,
res->lockname.name, master);
if (!master) {
+ res->state |= DLM_LOCK_RES_DROPPING_REF;
/* drop spinlock... retake below */
+ spin_unlock(&res->spinlock);
spin_unlock(&dlm->spinlock);
spin_lock(&res->spinlock);
@@ -208,31 +188,35 @@ static int dlm_purge_lockres(struct dlm_
mlog(0, "%s:%.*s: dlm_deref_lockres returned %d\n",
dlm->name, res->lockname.len, res->lockname.name, ret);
spin_lock(&dlm->spinlock);
+ spin_lock(&res->spinlock);
}
- spin_lock(&res->spinlock);
if (!list_empty(&res->purge)) {
mlog(0, "removing lockres %.*s:%p from purgelist, "
"master = %d\n", res->lockname.len, res->lockname.name,
res, master);
list_del_init(&res->purge);
- spin_unlock(&res->spinlock);
dlm_lockres_put(res);
dlm->purge_count--;
- } else
- spin_unlock(&res->spinlock);
+ }
+
+ if (!__dlm_lockres_unused(res)) {
+ mlog(ML_ERROR, "found lockres %s:%.*s: in use after deref\n",
+ dlm->name, res->lockname.len, res->lockname.name);
+ __dlm_print_one_lock_resource(res);
+ BUG();
+ }
__dlm_unhash_lockres(res);
/* lockres is not in the hash now. drop the flag and wake up
* any processes waiting in dlm_get_lock_resource. */
if (!master) {
- spin_lock(&res->spinlock);
res->state &= ~DLM_LOCK_RES_DROPPING_REF;
spin_unlock(&res->spinlock);
wake_up(&res->wq);
- }
- return 0;
+ } else
+ spin_unlock(&res->spinlock);
}
static void dlm_run_purge_list(struct dlm_ctxt *dlm,
@@ -251,17 +235,7 @@ static void dlm_run_purge_list(struct dl
lockres = list_entry(dlm->purge_list.next,
struct dlm_lock_resource, purge);
- /* Status of the lockres *might* change so double
- * check. If the lockres is unused, holding the dlm
- * spinlock will prevent people from getting and more
- * refs on it -- there's no need to keep the lockres
- * spinlock. */
spin_lock(&lockres->spinlock);
- unused = __dlm_lockres_unused(lockres);
- spin_unlock(&lockres->spinlock);
-
- if (!unused)
- continue;
purge_jiffies = lockres->last_used +
msecs_to_jiffies(DLM_PURGE_INTERVAL_MS);
@@ -273,15 +247,29 @@ static void dlm_run_purge_list(struct dl
* in tail order, we can stop at the first
* unpurgable resource -- anyone added after
* him will have a greater last_used value */
+ spin_unlock(&lockres->spinlock);
break;
}
+ /* Status of the lockres *might* change so double
+ * check. If the lockres is unused, holding the dlm
+ * spinlock will prevent people from getting and more
+ * refs on it. */
+ unused = __dlm_lockres_unused(lockres);
+ if (!unused ||
+ (lockres->state & DLM_LOCK_RES_MIGRATING)) {
+ mlog(0, "lockres %s:%.*s: is in use or "
+ "being remastered, used %d, state %d\n",
+ dlm->name, lockres->lockname.len,
+ lockres->lockname.name, !unused, lockres->state);
+ list_move_tail(&dlm->purge_list, &lockres->purge);
+ spin_unlock(&lockres->spinlock);
+ continue;
+ }
+
dlm_lockres_get(lockres);
- /* This may drop and reacquire the dlm spinlock if it
- * has to do migration. */
- if (dlm_purge_lockres(dlm, lockres))
- BUG();
+ dlm_purge_lockres(dlm, lockres);
dlm_lockres_put(lockres);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [015/114] ocfs2: Count more refcount records in file system fragmentation.
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (13 preceding siblings ...)
2010-08-24 22:44 ` [014/114] ocfs2 fix o2dlm dlm run purgelist (rev 3) Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [016/114] ocfs2/dlm: avoid incorrect bit set in refmap on recovery master Greg KH
` (98 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tao Ma, Joel Becker
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tao Ma <tao.ma@oracle.com>
commit 8a2e70c40ff58f82dde67770e6623ca45f0cb0c8 upstream.
The refcount record calculation in ocfs2_calc_refcount_meta_credits
is too optimistic that we can always allocate contiguous clusters
and handle an already existed refcount rec as a whole. Actually
because of file system fragmentation, we may have the chance to split
a refcount record into 3 parts during the transaction. So consider
the worst case in record calculation.
Signed-off-by: Tao Ma <tao.ma@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ocfs2/refcounttree.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
--- a/fs/ocfs2/refcounttree.c
+++ b/fs/ocfs2/refcounttree.c
@@ -2436,16 +2436,26 @@ static int ocfs2_calc_refcount_meta_cred
len = min((u64)cpos + clusters, le64_to_cpu(rec.r_cpos) +
le32_to_cpu(rec.r_clusters)) - cpos;
/*
- * If the refcount rec already exist, cool. We just need
- * to check whether there is a split. Otherwise we just need
- * to increase the refcount.
- * If we will insert one, increases recs_add.
- *
* We record all the records which will be inserted to the
* same refcount block, so that we can tell exactly whether
* we need a new refcount block or not.
+ *
+ * If we will insert a new one, this is easy and only happens
+ * during adding refcounted flag to the extent, so we don't
+ * have a chance of spliting. We just need one record.
+ *
+ * If the refcount rec already exists, that would be a little
+ * complicated. we may have to:
+ * 1) split at the beginning if the start pos isn't aligned.
+ * we need 1 more record in this case.
+ * 2) split int the end if the end pos isn't aligned.
+ * we need 1 more record in this case.
+ * 3) split in the middle because of file system fragmentation.
+ * we need 2 more records in this case(we can't detect this
+ * beforehand, so always think of the worst case).
*/
if (rec.r_refcount) {
+ recs_add += 2;
/* Check whether we need a split at the beginning. */
if (cpos == start_cpos &&
cpos != le64_to_cpu(rec.r_cpos))
^ permalink raw reply [flat|nested] 115+ messages in thread
* [016/114] ocfs2/dlm: avoid incorrect bit set in refmap on recovery master
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (14 preceding siblings ...)
2010-08-24 22:44 ` [015/114] ocfs2: Count more refcount records in file system fragmentation Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [017/114] ocfs2/dlm: remove potential deadlock -V3 Greg KH
` (97 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Wengang Wang, Srinivas Eeda,
Joel Becker
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Wengang Wang <wen.gang.wang@oracle.com>
commit a524812b7eaa7783d7811198921100f079034e61 upstream.
In the following situation, there remains an incorrect bit in refmap on the
recovery master. Finally the recovery master will fail at purging the lockres
due to the incorrect bit in refmap.
1) node A has no interest on lockres A any longer, so it is purging it.
2) the owner of lockres A is node B, so node A is sending de-ref message
to node B.
3) at this time, node B crashed. node C becomes the recovery master. it recovers
lockres A(because the master is the dead node B).
4) node A migrated lockres A to node C with a refbit there.
5) node A failed to send de-ref message to node B because it crashed. The failure
is ignored. no other action is done for lockres A any more.
For mormal, re-send the deref message to it to recovery master can fix it. Well,
ignoring the failure of deref to the original master and not recovering the lockres
to recovery master has the same effect. And the later is simpler.
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Acked-by: Srinivas Eeda <srinivas.eeda@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ocfs2/dlm/dlmrecovery.c | 22 ++++++++++------------
fs/ocfs2/dlm/dlmthread.c | 34 +++++++++++++++++++++-------------
2 files changed, 31 insertions(+), 25 deletions(-)
--- a/fs/ocfs2/dlm/dlmrecovery.c
+++ b/fs/ocfs2/dlm/dlmrecovery.c
@@ -1997,6 +1997,8 @@ void dlm_move_lockres_to_recovery_list(s
struct list_head *queue;
struct dlm_lock *lock, *next;
+ assert_spin_locked(&dlm->spinlock);
+ assert_spin_locked(&res->spinlock);
res->state |= DLM_LOCK_RES_RECOVERING;
if (!list_empty(&res->recovering)) {
mlog(0,
@@ -2326,19 +2328,15 @@ static void dlm_do_local_recovery_cleanu
/* zero the lvb if necessary */
dlm_revalidate_lvb(dlm, res, dead_node);
if (res->owner == dead_node) {
- if (res->state & DLM_LOCK_RES_DROPPING_REF)
- mlog(0, "%s:%.*s: owned by "
- "dead node %u, this node was "
- "dropping its ref when it died. "
- "continue, dropping the flag.\n",
- dlm->name, res->lockname.len,
- res->lockname.name, dead_node);
-
- /* the wake_up for this will happen when the
- * RECOVERING flag is dropped later */
- res->state &= ~DLM_LOCK_RES_DROPPING_REF;
+ if (res->state & DLM_LOCK_RES_DROPPING_REF) {
+ mlog(ML_NOTICE, "Ignore %.*s for "
+ "recovery as it is being freed\n",
+ res->lockname.len,
+ res->lockname.name);
+ } else
+ dlm_move_lockres_to_recovery_list(dlm,
+ res);
- dlm_move_lockres_to_recovery_list(dlm, res);
} else if (res->owner == dlm->node_num) {
dlm_free_dead_locks(dlm, res, dead_node);
__dlm_lockres_calc_usage(dlm, res);
--- a/fs/ocfs2/dlm/dlmthread.c
+++ b/fs/ocfs2/dlm/dlmthread.c
@@ -92,19 +92,27 @@ int __dlm_lockres_has_locks(struct dlm_l
* truly ready to be freed. */
int __dlm_lockres_unused(struct dlm_lock_resource *res)
{
- if (!__dlm_lockres_has_locks(res) &&
- (list_empty(&res->dirty) && !(res->state & DLM_LOCK_RES_DIRTY))) {
- /* try not to scan the bitmap unless the first two
- * conditions are already true */
- int bit = find_next_bit(res->refmap, O2NM_MAX_NODES, 0);
- if (bit >= O2NM_MAX_NODES) {
- /* since the bit for dlm->node_num is not
- * set, inflight_locks better be zero */
- BUG_ON(res->inflight_locks != 0);
- return 1;
- }
- }
- return 0;
+ int bit;
+
+ if (__dlm_lockres_has_locks(res))
+ return 0;
+
+ if (!list_empty(&res->dirty) || res->state & DLM_LOCK_RES_DIRTY)
+ return 0;
+
+ if (res->state & DLM_LOCK_RES_RECOVERING)
+ return 0;
+
+ bit = find_next_bit(res->refmap, O2NM_MAX_NODES, 0);
+ if (bit < O2NM_MAX_NODES)
+ return 0;
+
+ /*
+ * since the bit for dlm->node_num is not set, inflight_locks better
+ * be zero
+ */
+ BUG_ON(res->inflight_locks != 0);
+ return 1;
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [017/114] ocfs2/dlm: remove potential deadlock -V3
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (15 preceding siblings ...)
2010-08-24 22:44 ` [016/114] ocfs2/dlm: avoid incorrect bit set in refmap on recovery master Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [018/114] wl1251: fix trigger scan timeout usage Greg KH
` (96 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Wengang Wang, Joel Becker
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Wengang Wang <wen.gang.wang@oracle.com>
commit b11f1f1ab73fd358b1b734a9427744802202ba68 upstream.
When we need to take both dlm_domain_lock and dlm->spinlock, we should take
them in order of: dlm_domain_lock then dlm->spinlock.
There is pathes disobey this order. That is calling dlm_lockres_put() with
dlm->spinlock held in dlm_run_purge_list. dlm_lockres_put() calls dlm_put() at
the ref and dlm_put() locks on dlm_domain_lock.
Fix:
Don't grab/put the dlm when the initialising/releasing lockres.
That grab is not required because we don't call dlm_unregister_domain()
based on refcount.
Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ocfs2/dlm/dlmmaster.c | 4 ----
1 file changed, 4 deletions(-)
--- a/fs/ocfs2/dlm/dlmmaster.c
+++ b/fs/ocfs2/dlm/dlmmaster.c
@@ -511,8 +511,6 @@ static void dlm_lockres_release(struct k
atomic_dec(&dlm->res_cur_count);
- dlm_put(dlm);
-
if (!hlist_unhashed(&res->hash_node) ||
!list_empty(&res->granted) ||
!list_empty(&res->converting) ||
@@ -585,8 +583,6 @@ static void dlm_init_lockres(struct dlm_
res->migration_pending = 0;
res->inflight_locks = 0;
- /* put in dlm_lockres_release */
- dlm_grab(dlm);
res->dlm = dlm;
kref_init(&res->refs);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [018/114] wl1251: fix trigger scan timeout usage
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (16 preceding siblings ...)
2010-08-24 22:44 ` [017/114] ocfs2/dlm: remove potential deadlock -V3 Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [019/114] nilfs2: fix list corruption after ifile creation failure Greg KH
` (95 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Yuri Ershov, Yuri Kululin,
Kalle Valo, John W. Linville
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Yuri Kululin <ext-yuri.kululin@nokia.com>
commit fe0dbcc9d2e941328b3269dab102b94ad697ade5 upstream.
Use appropriate command (CMD_TRIGGER_SCAN_TO) instead of scan command
(CMD_SCAN) to configure trigger scan timeout.
This was broken in commit 3a98c30f3e8bb1f32b5bcb74a39647b3670de275.
This fix address the bug reported here:
https://bugzilla.kernel.org/show_bug.cgi?id=16554
Signed-off-by: Yuri Ershov <ext-yuri.ershov@nokia.com>
Signed-off-by: Yuri Kululin <ext-yuri.kululin@nokia.com>
Acked-by: Kalle Valo <kvalo@adurom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/wl12xx/wl1251_cmd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/wl12xx/wl1251_cmd.c
+++ b/drivers/net/wireless/wl12xx/wl1251_cmd.c
@@ -484,7 +484,7 @@ int wl1251_cmd_trigger_scan_to(struct wl
cmd->timeout = timeout;
- ret = wl1251_cmd_send(wl, CMD_SCAN, cmd, sizeof(*cmd));
+ ret = wl1251_cmd_send(wl, CMD_TRIGGER_SCAN_TO, cmd, sizeof(*cmd));
if (ret < 0) {
wl1251_error("cmd trigger scan to failed: %d", ret);
goto out;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [019/114] nilfs2: fix list corruption after ifile creation failure
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (17 preceding siblings ...)
2010-08-24 22:44 ` [018/114] wl1251: fix trigger scan timeout usage Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [020/114] tracing: Fix an unallocated memory access in function_graph Greg KH
` (94 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Ryusuke Konishi
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
commit af4e36318edb848fcc0a8d5f75000ca00cdc7595 upstream.
If nilfs_attach_checkpoint() gets a memory allocation failure during
creation of ifile, it will return without removing nilfs_sb_info
struct from ns_supers list. When a concurrently mounted snapshot is
unmounted or another new snapshot is mounted after that, this causes
kernel oops as below:
> BUG: unable to handle kernel NULL pointer dereference at (null)
> IP: [<f83662ff>] nilfs_find_sbinfo+0x74/0xa4 [nilfs2]
> *pde = 00000000
> Oops: 0000 [#1] SMP
<snip>
> Call Trace:
> [<f835dc29>] ? nilfs_get_sb+0x165/0x532 [nilfs2]
> [<c1173c87>] ? ida_get_new_above+0x16d/0x187
> [<c109a7f8>] ? alloc_vfsmnt+0x7e/0x10a
> [<c1070790>] ? kstrdup+0x2c/0x40
> [<c1089041>] ? vfs_kern_mount+0x96/0x14e
> [<c108913d>] ? do_kern_mount+0x32/0xbd
> [<c109b331>] ? do_mount+0x642/0x6a1
> [<c101a415>] ? do_page_fault+0x0/0x2d1
> [<c1099c00>] ? copy_mount_options+0x80/0xe2
> [<c10705d8>] ? strndup_user+0x48/0x67
> [<c109b3f1>] ? sys_mount+0x61/0x90
> [<c10027cc>] ? sysenter_do_call+0x12/0x22
This fixes the problem.
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Tested-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nilfs2/super.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -336,9 +336,10 @@ int nilfs_attach_checkpoint(struct nilfs
list_add(&sbi->s_list, &nilfs->ns_supers);
up_write(&nilfs->ns_super_sem);
+ err = -ENOMEM;
sbi->s_ifile = nilfs_ifile_new(sbi, nilfs->ns_inode_size);
if (!sbi->s_ifile)
- return -ENOMEM;
+ goto delist;
down_read(&nilfs->ns_segctor_sem);
err = nilfs_cpfile_get_checkpoint(nilfs->ns_cpfile, cno, 0, &raw_cp,
@@ -369,6 +370,7 @@ int nilfs_attach_checkpoint(struct nilfs
nilfs_mdt_destroy(sbi->s_ifile);
sbi->s_ifile = NULL;
+ delist:
down_write(&nilfs->ns_super_sem);
list_del_init(&sbi->s_list);
up_write(&nilfs->ns_super_sem);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [020/114] tracing: Fix an unallocated memory access in function_graph
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (18 preceding siblings ...)
2010-08-24 22:44 ` [019/114] nilfs2: fix list corruption after ifile creation failure Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [021/114] tracing: Fix ring_buffer_read_page reading out of page boundary Greg KH
` (93 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Shaohua Li, Steven Rostedt
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Shaohua Li <shaohua.li@intel.com>
commit 575570f02761bd680ba5731c1dfd4701062e7fb2 upstream.
With CONFIG_DEBUG_PAGEALLOC, I observed an unallocated memory access in
function_graph trace. It appears we find a small size entry in ring buffer,
but we access it as a big size entry. The access overflows the page size
and touches an unallocated page.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
LKML-Reference: <1280217994.32400.76.camel@sli10-desk.sh.intel.com>
[ Added a comment to explain the problem - SDR ]
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/trace_functions_graph.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/kernel/trace/trace_functions_graph.c
+++ b/kernel/trace/trace_functions_graph.c
@@ -507,7 +507,15 @@ get_return_for_leaf(struct trace_iterato
* if the output fails.
*/
data->ent = *curr;
- data->ret = *next;
+ /*
+ * If the next event is not a return type, then
+ * we only care about what type it is. Otherwise we can
+ * safely copy the entire event.
+ */
+ if (next->ent.type == TRACE_GRAPH_RET)
+ data->ret = *next;
+ else
+ data->ret.ent.type = next->ent.type;
}
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [021/114] tracing: Fix ring_buffer_read_page reading out of page boundary
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (19 preceding siblings ...)
2010-08-24 22:44 ` [020/114] tracing: Fix an unallocated memory access in function_graph Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [022/114] cfg80211: fix locking in action frame TX Greg KH
` (92 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Huang Ying, Steven Rostedt
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Huang Ying <ying.huang@intel.com>
commit 18fab912d4fa70133df164d2dcf3310be0c38c34 upstream.
With the configuration: CONFIG_DEBUG_PAGEALLOC=y and Shaohua's patch:
[PATCH]x86: make spurious_fault check correct pte bit
Function call graph trace with the following will trigger a page fault.
# cd /sys/kernel/debug/tracing/
# echo function_graph > current_tracer
# cat per_cpu/cpu1/trace_pipe_raw > /dev/null
BUG: unable to handle kernel paging request at ffff880006e99000
IP: [<ffffffff81085572>] rb_event_length+0x1/0x3f
PGD 1b19063 PUD 1b1d063 PMD 3f067 PTE 6e99160
Oops: 0000 [#1] SMP DEBUG_PAGEALLOC
last sysfs file: /sys/devices/virtual/net/lo/operstate
CPU 1
Modules linked in:
Pid: 1982, comm: cat Not tainted 2.6.35-rc6-aes+ #300 /Bochs
RIP: 0010:[<ffffffff81085572>] [<ffffffff81085572>] rb_event_length+0x1/0x3f
RSP: 0018:ffff880006475e38 EFLAGS: 00010006
RAX: 0000000000000ff0 RBX: ffff88000786c630 RCX: 000000000000001d
RDX: ffff880006e98000 RSI: 0000000000000ff0 RDI: ffff880006e99000
RBP: ffff880006475eb8 R08: 000000145d7008bd R09: 0000000000000000
R10: 0000000000008000 R11: ffffffff815d9336 R12: ffff880006d08000
R13: ffff880006e605d8 R14: 0000000000000000 R15: 0000000000000018
FS: 00007f2b83e456f0(0000) GS:ffff880002100000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: ffff880006e99000 CR3: 00000000064a8000 CR4: 00000000000006e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process cat (pid: 1982, threadinfo ffff880006474000, task ffff880006e40770)
Stack:
ffff880006475eb8 ffffffff8108730f 0000000000000ff0 000000145d7008bd
<0> ffff880006e98010 ffff880006d08010 0000000000000296 ffff88000786c640
<0> ffffffff81002956 0000000000000000 ffff8800071f4680 ffff8800071f4680
Call Trace:
[<ffffffff8108730f>] ? ring_buffer_read_page+0x15a/0x24a
[<ffffffff81002956>] ? return_to_handler+0x15/0x2f
[<ffffffff8108a575>] tracing_buffers_read+0xb9/0x164
[<ffffffff810debfe>] vfs_read+0xaf/0x150
[<ffffffff81002941>] return_to_handler+0x0/0x2f
[<ffffffff810248b0>] __bad_area_nosemaphore+0x17e/0x1a1
[<ffffffff81002941>] return_to_handler+0x0/0x2f
[<ffffffff810248e6>] bad_area_nosemaphore+0x13/0x15
Code: 80 25 b2 16 b3 00 fe c9 c3 55 48 89 e5 f0 80 0d a4 16 b3 00 02 c9 c3 55 31 c0 48 89 e5 48 83 3d 94 16 b3 00 01 c9 0f 94 c0 c3 55 <8a> 0f 48 89 e5 83 e1 1f b8 08 00 00 00 0f b6 d1 83 fa 1e 74 27
RIP [<ffffffff81085572>] rb_event_length+0x1/0x3f
RSP <ffff880006475e38>
CR2: ffff880006e99000
---[ end trace a6877bb92ccb36bb ]---
The root cause is that ring_buffer_read_page() may read out of page
boundary, because the boundary checking is done after reading. This is
fixed via doing boundary checking before reading.
Reported-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
LKML-Reference: <1280297641.2771.307.camel@yhuang-dev>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/ring_buffer.c | 3 +++
1 file changed, 3 insertions(+)
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -3868,6 +3868,9 @@ int ring_buffer_read_page(struct ring_bu
rpos = reader->read;
pos += size;
+ if (rpos >= commit)
+ break;
+
event = rb_reader_event(cpu_buffer);
size = rb_event_length(event);
} while (len > size);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [022/114] cfg80211: fix locking in action frame TX
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (20 preceding siblings ...)
2010-08-24 22:44 ` [021/114] tracing: Fix ring_buffer_read_page reading out of page boundary Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [023/114] x86, asm: Refactor atomic64_386_32.S to support old binutils and be cleaner Greg KH
` (91 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Johannes Berg,
John W. Linville
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
commit fe100acddf438591ecf3582cb57241e560da70b7 upstream.
Accesses to "wdev->current_bss" must be
locked with the wdev lock, which action
frame transmission is missing.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/wireless/mlme.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -842,12 +842,18 @@ int cfg80211_mlme_action(struct cfg80211
return -EINVAL;
if (mgmt->u.action.category != WLAN_CATEGORY_PUBLIC) {
/* Verify that we are associated with the destination AP */
+ wdev_lock(wdev);
+
if (!wdev->current_bss ||
memcmp(wdev->current_bss->pub.bssid, mgmt->bssid,
ETH_ALEN) != 0 ||
memcmp(wdev->current_bss->pub.bssid, mgmt->da,
- ETH_ALEN) != 0)
+ ETH_ALEN) != 0) {
+ wdev_unlock(wdev);
return -ENOTCONN;
+ }
+ wdev_unlock(wdev);
+
}
if (memcmp(mgmt->sa, dev->dev_addr, ETH_ALEN) != 0)
^ permalink raw reply [flat|nested] 115+ messages in thread
* [023/114] x86, asm: Refactor atomic64_386_32.S to support old binutils and be cleaner
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (21 preceding siblings ...)
2010-08-24 22:44 ` [022/114] cfg80211: fix locking in action frame TX Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [024/114] perf, x86: P4 PMU -- update nmi irq statistics and unmask lvt entry properly Greg KH
` (90 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Luca Barbieri,
H. Peter Anvin
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Luca Barbieri <luca@luca-barbieri.com>
commit 30246557a06bb20618bed906a06d1e1e0faa8bb4 upstream.
The old code didn't work on binutils 2.12 because setting a symbol to
a register apparently requires a fairly recent version.
This commit refactors the code to use the C preprocessor instead, and
in the process makes the whole code a bit easier to understand.
The object code produced is unchanged as expected.
This fixes kernel bugzilla 16506.
Reported-by: Dieter Stussy <kd6lvw+software@kd6lvw.ampr.org>
Signed-off-by: Luca Barbieri <luca@luca-barbieri.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <tip-*@git.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/lib/atomic64_386_32.S | 232 ++++++++++++++++++++++-------------------
1 file changed, 126 insertions(+), 106 deletions(-)
--- a/arch/x86/lib/atomic64_386_32.S
+++ b/arch/x86/lib/atomic64_386_32.S
@@ -25,150 +25,170 @@
CFI_ADJUST_CFA_OFFSET -4
.endm
-.macro BEGIN func reg
-$v = \reg
+#define BEGIN(op) \
+.macro END; \
+ CFI_ENDPROC; \
+ENDPROC(atomic64_##op##_386); \
+.purgem END; \
+.endm; \
+ENTRY(atomic64_##op##_386); \
+ CFI_STARTPROC; \
+ LOCK v;
-ENTRY(atomic64_\func\()_386)
- CFI_STARTPROC
- LOCK $v
-
-.macro RETURN
- UNLOCK $v
+#define RET \
+ UNLOCK v; \
ret
-.endm
-
-.macro END_
- CFI_ENDPROC
-ENDPROC(atomic64_\func\()_386)
-.purgem RETURN
-.purgem END_
-.purgem END
-.endm
-
-.macro END
-RETURN
-END_
-.endm
-.endm
-
-BEGIN read %ecx
- movl ($v), %eax
- movl 4($v), %edx
-END
-
-BEGIN set %esi
- movl %ebx, ($v)
- movl %ecx, 4($v)
-END
-
-BEGIN xchg %esi
- movl ($v), %eax
- movl 4($v), %edx
- movl %ebx, ($v)
- movl %ecx, 4($v)
-END
-
-BEGIN add %ecx
- addl %eax, ($v)
- adcl %edx, 4($v)
-END
-BEGIN add_return %ecx
- addl ($v), %eax
- adcl 4($v), %edx
- movl %eax, ($v)
- movl %edx, 4($v)
-END
-
-BEGIN sub %ecx
- subl %eax, ($v)
- sbbl %edx, 4($v)
-END
+#define RET_END \
+ RET; \
+ END
+
+#define v %ecx
+BEGIN(read)
+ movl (v), %eax
+ movl 4(v), %edx
+RET_END
+#undef v
+
+#define v %esi
+BEGIN(set)
+ movl %ebx, (v)
+ movl %ecx, 4(v)
+RET_END
+#undef v
+
+#define v %esi
+BEGIN(xchg)
+ movl (v), %eax
+ movl 4(v), %edx
+ movl %ebx, (v)
+ movl %ecx, 4(v)
+RET_END
+#undef v
+
+#define v %ecx
+BEGIN(add)
+ addl %eax, (v)
+ adcl %edx, 4(v)
+RET_END
+#undef v
+
+#define v %ecx
+BEGIN(add_return)
+ addl (v), %eax
+ adcl 4(v), %edx
+ movl %eax, (v)
+ movl %edx, 4(v)
+RET_END
+#undef v
+
+#define v %ecx
+BEGIN(sub)
+ subl %eax, (v)
+ sbbl %edx, 4(v)
+RET_END
+#undef v
-BEGIN sub_return %ecx
+#define v %ecx
+BEGIN(sub_return)
negl %edx
negl %eax
sbbl $0, %edx
- addl ($v), %eax
- adcl 4($v), %edx
- movl %eax, ($v)
- movl %edx, 4($v)
-END
-
-BEGIN inc %esi
- addl $1, ($v)
- adcl $0, 4($v)
-END
-
-BEGIN inc_return %esi
- movl ($v), %eax
- movl 4($v), %edx
+ addl (v), %eax
+ adcl 4(v), %edx
+ movl %eax, (v)
+ movl %edx, 4(v)
+RET_END
+#undef v
+
+#define v %esi
+BEGIN(inc)
+ addl $1, (v)
+ adcl $0, 4(v)
+RET_END
+#undef v
+
+#define v %esi
+BEGIN(inc_return)
+ movl (v), %eax
+ movl 4(v), %edx
addl $1, %eax
adcl $0, %edx
- movl %eax, ($v)
- movl %edx, 4($v)
-END
-
-BEGIN dec %esi
- subl $1, ($v)
- sbbl $0, 4($v)
-END
-
-BEGIN dec_return %esi
- movl ($v), %eax
- movl 4($v), %edx
+ movl %eax, (v)
+ movl %edx, 4(v)
+RET_END
+#undef v
+
+#define v %esi
+BEGIN(dec)
+ subl $1, (v)
+ sbbl $0, 4(v)
+RET_END
+#undef v
+
+#define v %esi
+BEGIN(dec_return)
+ movl (v), %eax
+ movl 4(v), %edx
subl $1, %eax
sbbl $0, %edx
- movl %eax, ($v)
- movl %edx, 4($v)
-END
+ movl %eax, (v)
+ movl %edx, 4(v)
+RET_END
+#undef v
-BEGIN add_unless %ecx
+#define v %ecx
+BEGIN(add_unless)
addl %eax, %esi
adcl %edx, %edi
- addl ($v), %eax
- adcl 4($v), %edx
+ addl (v), %eax
+ adcl 4(v), %edx
cmpl %eax, %esi
je 3f
1:
- movl %eax, ($v)
- movl %edx, 4($v)
+ movl %eax, (v)
+ movl %edx, 4(v)
movl $1, %eax
2:
-RETURN
+ RET
3:
cmpl %edx, %edi
jne 1b
xorl %eax, %eax
jmp 2b
-END_
+END
+#undef v
-BEGIN inc_not_zero %esi
- movl ($v), %eax
- movl 4($v), %edx
+#define v %esi
+BEGIN(inc_not_zero)
+ movl (v), %eax
+ movl 4(v), %edx
testl %eax, %eax
je 3f
1:
addl $1, %eax
adcl $0, %edx
- movl %eax, ($v)
- movl %edx, 4($v)
+ movl %eax, (v)
+ movl %edx, 4(v)
movl $1, %eax
2:
-RETURN
+ RET
3:
testl %edx, %edx
jne 1b
jmp 2b
-END_
+END
+#undef v
-BEGIN dec_if_positive %esi
- movl ($v), %eax
- movl 4($v), %edx
+#define v %esi
+BEGIN(dec_if_positive)
+ movl (v), %eax
+ movl 4(v), %edx
subl $1, %eax
sbbl $0, %edx
js 1f
- movl %eax, ($v)
- movl %edx, 4($v)
+ movl %eax, (v)
+ movl %edx, 4(v)
1:
-END
+RET_END
+#undef v
^ permalink raw reply [flat|nested] 115+ messages in thread
* [024/114] perf, x86: P4 PMU -- update nmi irq statistics and unmask lvt entry properly
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (22 preceding siblings ...)
2010-08-24 22:44 ` [023/114] x86, asm: Refactor atomic64_386_32.S to support old binutils and be cleaner Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [025/114] x86, apic: Map the local apic when parsing the MP table Greg KH
` (89 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Cyrill Gorcunov,
Stephane Eranian, Peter Zijlstra, Frederic Weisbecker,
Ingo Molnar
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Cyrill Gorcunov <gorcunov@openvz.org>
commit 1c250d709fdc8aa5bf42d90be99428a01a256a55 upstream.
In case if last active performance counter is not overflowed at
moment of NMI being triggered by another counter, the irq
statistics may miss an update stage. As a more serious
consequence -- apic quirk may not be triggered so apic lvt entry
stay masked.
Tested-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <20100805150917.GA6311@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/cpu/perf_event_p4.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- a/arch/x86/kernel/cpu/perf_event_p4.c
+++ b/arch/x86/kernel/cpu/perf_event_p4.c
@@ -581,6 +581,7 @@ static int p4_pmu_handle_irq(struct pt_r
cpuc = &__get_cpu_var(cpu_hw_events);
for (idx = 0; idx < x86_pmu.num_counters; idx++) {
+ int overflow;
if (!test_bit(idx, cpuc->active_mask))
continue;
@@ -591,12 +592,14 @@ static int p4_pmu_handle_irq(struct pt_r
WARN_ON_ONCE(hwc->idx != idx);
/* it might be unflagged overflow */
- handled = p4_pmu_clear_cccr_ovf(hwc);
+ overflow = p4_pmu_clear_cccr_ovf(hwc);
val = x86_perf_event_update(event);
- if (!handled && (val & (1ULL << (x86_pmu.cntval_bits - 1))))
+ if (!overflow && (val & (1ULL << (x86_pmu.cntval_bits - 1))))
continue;
+ handled += overflow;
+
/* event overflow for sure */
data.period = event->hw.last_period;
@@ -612,7 +615,7 @@ static int p4_pmu_handle_irq(struct pt_r
inc_irq_stat(apic_perf_irqs);
}
- return handled;
+ return handled > 0;
}
/*
^ permalink raw reply [flat|nested] 115+ messages in thread
* [025/114] x86, apic: Map the local apic when parsing the MP table.
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (23 preceding siblings ...)
2010-08-24 22:44 ` [024/114] perf, x86: P4 PMU -- update nmi irq statistics and unmask lvt entry properly Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [026/114] platform/x86: move rfkill for Dell Mini 1012 to compal-laptop Greg KH
` (88 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric W. Biederman,
H. Peter Anvin
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric W. Biederman <ebiederm@xmission.com>
commit 5989cd6a1cbf86587edcc856791f960978087311 upstream.
This fixes a regression in 2.6.35 from 2.6.34, that is
present for select models of Intel cpus when people are
using an MP table.
The commit cf7500c0ea133d66f8449d86392d83f840102632
"x86, ioapic: In mpparse use mp_register_ioapic" started
calling mp_register_ioapic from MP_ioapic_info. An extremely
simple change that was obviously correct. Unfortunately
mp_register_ioapic did just a little more than the previous
hand crafted code and so we gained this call path.
The problem call path is:
MP_ioapic_info()
mp_register_ioapic()
io_apic_unique_id()
io_apic_get_unique_id()
get_physical_broadcast()
modern_apic()
lapic_get_version()
apic_read(APIC_LVR)
Which turned out to be a problem because the local apic
was not mapped, at that point, unlike the similar point
in the ACPI parsing code.
This problem is fixed by mapping the local apic when
parsing the mptable as soon as we reasonably can.
Looking at the number of places we setup the fixmap for
the local apic, I see some serious simplification opportunities.
For the moment except for not duplicating the setting up of the
fixmap in init_apic_mappings, I have not acted on them.
The regression from 2.6.34 is tracked in bug
https://bugzilla.kernel.org/show_bug.cgi?id=16173
Reported-by: David Hill <hilld@binarystorm.net>
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@sophos.com>
Tested-by: Tvrtko Ursulin <tvrtko.ursulin@sophos.com>
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
LKML-Reference: <m1eiee86jg.fsf_-_@fess.ebiederm.org>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/apic/apic.c | 2 +-
arch/x86/kernel/mpparse.c | 16 ++++++++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1606,7 +1606,7 @@ void __init init_apic_mappings(void)
* acpi lapic path already maps that address in
* acpi_register_lapic_address()
*/
- if (!acpi_lapic)
+ if (!acpi_lapic && !smp_found_config)
set_fixmap_nocache(FIX_APIC_BASE, apic_phys);
apic_printk(APIC_VERBOSE, "mapped APIC to %08lx (%08lx)\n",
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -274,6 +274,18 @@ static void __init smp_dump_mptable(stru
void __init default_smp_read_mpc_oem(struct mpc_table *mpc) { }
+static void __init smp_register_lapic_address(unsigned long address)
+{
+ mp_lapic_addr = address;
+
+ set_fixmap_nocache(FIX_APIC_BASE, address);
+ if (boot_cpu_physical_apicid == -1U) {
+ boot_cpu_physical_apicid = read_apic_id();
+ apic_version[boot_cpu_physical_apicid] =
+ GET_APIC_VERSION(apic_read(APIC_LVR));
+ }
+}
+
static int __init smp_read_mpc(struct mpc_table *mpc, unsigned early)
{
char str[16];
@@ -295,6 +307,10 @@ static int __init smp_read_mpc(struct mp
if (early)
return 1;
+ /* Initialize the lapic mapping */
+ if (!acpi_lapic)
+ smp_register_lapic_address(mpc->lapic);
+
if (mpc->oemptr)
x86_init.mpparse.smp_read_mpc_oem(mpc);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [026/114] platform/x86: move rfkill for Dell Mini 1012 to compal-laptop
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (24 preceding siblings ...)
2010-08-24 22:44 ` [025/114] x86, apic: Map the local apic when parsing the MP table Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [027/114] x86, hotplug: Serialize CPU hotplug to avoid bringup concurrency issues Greg KH
` (87 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Victor van den Elzen,
Matthew Garrett
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Victor van den Elzen <victor.vde@gmail.com>
commit c3f755e3842108c1cffe570fe9802239810352b6 upstream.
Like others in the Mini series, the Dell Mini 1012 does not support
the smbios hook required by dell-laptop.
Signed-off-by: Victor van den Elzen <victor.vde@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/platform/x86/compal-laptop.c | 9 +++++++++
drivers/platform/x86/dell-laptop.c | 7 +++++++
2 files changed, 16 insertions(+)
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -259,6 +259,14 @@ static struct dmi_system_id __initdata c
.callback = dmi_check_cb
},
{
+ .ident = "Dell Mini 1012",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
+ },
+ .callback = dmi_check_cb
+ },
+ {
.ident = "Dell Inspiron 11z",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
@@ -375,5 +383,6 @@ MODULE_ALIAS("dmi:*:rnIFT00:rvrIFT00:*")
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron910:*");
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1010:*");
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1011:*");
+MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1012:*");
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1110:*");
MODULE_ALIAS("dmi:*:svnDellInc.:pnInspiron1210:*");
--- a/drivers/platform/x86/dell-laptop.c
+++ b/drivers/platform/x86/dell-laptop.c
@@ -116,6 +116,13 @@ static struct dmi_system_id __devinitdat
},
},
{
+ .ident = "Dell Mini 1012",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+ DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 1012"),
+ },
+ },
+ {
.ident = "Dell Inspiron 11z",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
^ permalink raw reply [flat|nested] 115+ messages in thread
* [027/114] x86, hotplug: Serialize CPU hotplug to avoid bringup concurrency issues
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (25 preceding siblings ...)
2010-08-24 22:44 ` [026/114] platform/x86: move rfkill for Dell Mini 1012 to compal-laptop Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [028/114] perf, x86: Fix Intel-nhm PMU programming errata workaround Greg KH
` (86 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Borislav Petkov,
H. Peter Anvin
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Borislav Petkov <bp@amd64.org>
commit d7c53c9e822a4fefa13a0cae76f3190bfd0d5c11 upstream.
When testing cpu hotplug code on 32-bit we kept hitting the "CPU%d:
Stuck ??" message due to multiple cores concurrently accessing the
cpu_callin_mask, among others.
Since these codepaths are not protected from concurrent access due to
the fact that there's no sane reason for making an already complex
code unnecessarily more complex - we hit the issue only when insanely
switching cores off- and online - serialize hotplugging cores on the
sysfs level and be done with it.
[ v2.1: fix !HOTPLUG_CPU build ]
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
LKML-Reference: <20100819181029.GC17171@aftab>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/Kconfig | 5 +++++
arch/x86/kernel/smpboot.c | 19 +++++++++++++++++++
2 files changed, 24 insertions(+)
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -247,6 +247,11 @@ config ARCH_HWEIGHT_CFLAGS
config KTIME_SCALAR
def_bool X86_32
+
+config ARCH_CPU_PROBE_RELEASE
+ def_bool y
+ depends on HOTPLUG_CPU
+
source "init/Kconfig"
source "kernel/Kconfig.freezer"
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -91,6 +91,25 @@ DEFINE_PER_CPU(int, cpu_state) = { 0 };
static DEFINE_PER_CPU(struct task_struct *, idle_thread_array);
#define get_idle_for_cpu(x) (per_cpu(idle_thread_array, x))
#define set_idle_for_cpu(x, p) (per_cpu(idle_thread_array, x) = (p))
+
+/*
+ * We need this for trampoline_base protection from concurrent accesses when
+ * off- and onlining cores wildly.
+ */
+static DEFINE_MUTEX(x86_cpu_hotplug_driver_mutex);
+
+void cpu_hotplug_driver_lock()
+{
+ mutex_lock(&x86_cpu_hotplug_driver_mutex);
+}
+
+void cpu_hotplug_driver_unlock()
+{
+ mutex_unlock(&x86_cpu_hotplug_driver_mutex);
+}
+
+ssize_t arch_cpu_probe(const char *buf, size_t count) { return -1; }
+ssize_t arch_cpu_release(const char *buf, size_t count) { return -1; }
#else
static struct task_struct *idle_thread_array[NR_CPUS] __cpuinitdata ;
#define get_idle_for_cpu(x) (idle_thread_array[(x)])
^ permalink raw reply [flat|nested] 115+ messages in thread
* [028/114] perf, x86: Fix Intel-nhm PMU programming errata workaround
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (26 preceding siblings ...)
2010-08-24 22:44 ` [027/114] x86, hotplug: Serialize CPU hotplug to avoid bringup concurrency issues Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [029/114] x86, apic: Fix apic=debug boot crash Greg KH
` (85 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Zhang Yanmin, Peter Zijlstra,
Arjan van de Ven, H. Peter Anvin, Ingo Molnar
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
commit 351af0725e5222e35741011d1ea62215c1ed06db upstream.
Fix the Errata AAK100/AAP53/BD53 workaround, the officialy documented
workaround we implemented in:
11164cd: perf, x86: Add Nehelem PMU programming errata workaround
doesn't actually work fully and causes a stuck PMU state
under load and non-functioning perf profiling.
A functional workaround was found by trial & error.
Affects all Nehalem-class Intel PMUs.
Signed-off-by: Zhang Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1281073148.2125.63.camel@ymzhang.sh.intel.com>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/cpu/perf_event_intel.c | 83 +++++++++++++++++++++++++--------
1 file changed, 64 insertions(+), 19 deletions(-)
--- a/arch/x86/kernel/cpu/perf_event_intel.c
+++ b/arch/x86/kernel/cpu/perf_event_intel.c
@@ -491,33 +491,78 @@ static void intel_pmu_enable_all(int add
* Intel Errata AAP53 (model 30)
* Intel Errata BD53 (model 44)
*
- * These chips need to be 'reset' when adding counters by programming
- * the magic three (non counting) events 0x4300D2, 0x4300B1 and 0x4300B5
- * either in sequence on the same PMC or on different PMCs.
+ * The official story:
+ * These chips need to be 'reset' when adding counters by programming the
+ * magic three (non-counting) events 0x4300B5, 0x4300D2, and 0x4300B1 either
+ * in sequence on the same PMC or on different PMCs.
+ *
+ * In practise it appears some of these events do in fact count, and
+ * we need to programm all 4 events.
*/
-static void intel_pmu_nhm_enable_all(int added)
+static void intel_pmu_nhm_workaround(void)
{
- if (added) {
- struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
- int i;
-
- wrmsrl(MSR_ARCH_PERFMON_EVENTSEL0 + 0, 0x4300D2);
- wrmsrl(MSR_ARCH_PERFMON_EVENTSEL0 + 1, 0x4300B1);
- wrmsrl(MSR_ARCH_PERFMON_EVENTSEL0 + 2, 0x4300B5);
+ struct cpu_hw_events *cpuc = &__get_cpu_var(cpu_hw_events);
+ static const unsigned long nhm_magic[4] = {
+ 0x4300B5,
+ 0x4300D2,
+ 0x4300B1,
+ 0x4300B1
+ };
+ struct perf_event *event;
+ int i;
+
+ /*
+ * The Errata requires below steps:
+ * 1) Clear MSR_IA32_PEBS_ENABLE and MSR_CORE_PERF_GLOBAL_CTRL;
+ * 2) Configure 4 PERFEVTSELx with the magic events and clear
+ * the corresponding PMCx;
+ * 3) set bit0~bit3 of MSR_CORE_PERF_GLOBAL_CTRL;
+ * 4) Clear MSR_CORE_PERF_GLOBAL_CTRL;
+ * 5) Clear 4 pairs of ERFEVTSELx and PMCx;
+ */
+
+ /*
+ * The real steps we choose are a little different from above.
+ * A) To reduce MSR operations, we don't run step 1) as they
+ * are already cleared before this function is called;
+ * B) Call x86_perf_event_update to save PMCx before configuring
+ * PERFEVTSELx with magic number;
+ * C) With step 5), we do clear only when the PERFEVTSELx is
+ * not used currently.
+ * D) Call x86_perf_event_set_period to restore PMCx;
+ */
+
+ /* We always operate 4 pairs of PERF Counters */
+ for (i = 0; i < 4; i++) {
+ event = cpuc->events[i];
+ if (event)
+ x86_perf_event_update(event);
+ }
- wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0x3);
- wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0x0);
+ for (i = 0; i < 4; i++) {
+ wrmsrl(MSR_ARCH_PERFMON_EVENTSEL0 + i, nhm_magic[i]);
+ wrmsrl(MSR_ARCH_PERFMON_PERFCTR0 + i, 0x0);
+ }
- for (i = 0; i < 3; i++) {
- struct perf_event *event = cpuc->events[i];
+ wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0xf);
+ wrmsrl(MSR_CORE_PERF_GLOBAL_CTRL, 0x0);
- if (!event)
- continue;
+ for (i = 0; i < 4; i++) {
+ event = cpuc->events[i];
+ if (event) {
+ x86_perf_event_set_period(event);
__x86_pmu_enable_event(&event->hw,
- ARCH_PERFMON_EVENTSEL_ENABLE);
- }
+ ARCH_PERFMON_EVENTSEL_ENABLE);
+ } else
+ wrmsrl(MSR_ARCH_PERFMON_EVENTSEL0 + i, 0x0);
}
+}
+
+static void intel_pmu_nhm_enable_all(int added)
+{
+ if (added)
+ intel_pmu_nhm_workaround();
intel_pmu_enable_all(added);
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [029/114] x86, apic: Fix apic=debug boot crash
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (27 preceding siblings ...)
2010-08-24 22:44 ` [028/114] perf, x86: Fix Intel-nhm PMU programming errata workaround Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [030/114] Fix the nested PR lock calling issue in ACL Greg KH
` (84 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel Kiper, xen-devel,
konrad.wilk, jeremy, Ingo Molnar
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Kiper <dkiper@net-space.pl>
commit 05e407603e527f9d808dd3866d3a17c2ce4dfcc5 upstream.
Fix a boot crash when apic=debug is used and the APIC is
not properly initialized.
This issue appears during Xen Dom0 kernel boot but the
fix is generic and the crash could occur on real hardware
as well.
Signed-off-by: Daniel Kiper <dkiper@net-space.pl>
Cc: xen-devel@lists.xensource.com
Cc: konrad.wilk@oracle.com
Cc: jeremy@goop.org
LKML-Reference: <20100819224616.GB9967@router-fw-old.local.net-space.pl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/apic/io_apic.c | 2 ++
1 file changed, 2 insertions(+)
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1728,6 +1728,8 @@ __apicdebuginit(void) print_IO_APIC(void
struct irq_pin_list *entry;
cfg = desc->chip_data;
+ if (!cfg)
+ continue;
entry = cfg->irq_2_pin;
if (!entry)
continue;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [030/114] Fix the nested PR lock calling issue in ACL
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (28 preceding siblings ...)
2010-08-24 22:44 ` [029/114] x86, apic: Fix apic=debug boot crash Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [031/114] drm/radeon/kms: add additional quirk for Acer rv620 laptop Greg KH
` (83 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jiaju Zhang, Mark Fasheh,
Joel Becker
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiaju Zhang <jjzhang.linux@gmail.com>
commit 845b6cf34150100deb5f58c8a37a372b111f2918 upstream.
Hi,
Thanks a lot for all the review and comments so far;) I'd like to send
the improved (V4) version of this patch.
This patch fixes a deadlock in OCFS2 ACL. We found this bug in OCFS2
and Samba integration using scenario, the symptom is several smbd
processes will be hung under heavy workload. Finally we found out it
is the nested PR lock calling that leads to this deadlock:
node1 node2
gr PR
|
V
PR(EX)---> BAST:OCFS2_LOCK_BLOCKED
|
V
rq PR
|
V
wait=1
After requesting the 2nd PR lock, the process "smbd" went into D
state. It can only be woken up when the 1st PR lock's RO holder equals
zero. There should be an ocfs2_inode_unlock in the calling path later
on, which can decrement the RO holder. But since it has been in
uninterruptible sleep, the unlock function has no chance to be called.
The related stack trace is:
smbd D ffff8800013d0600 0 9522 5608 0x00000000
ffff88002ca7fb18 0000000000000282 ffff88002f964500 ffff88002ca7fa98
ffff8800013d0600 ffff88002ca7fae0 ffff88002f964340 ffff88002f964340
ffff88002ca7ffd8 ffff88002ca7ffd8 ffff88002f964340 ffff88002f964340
Call Trace:
[<ffffffff80350425>] schedule_timeout+0x175/0x210
[<ffffffff8034f580>] wait_for_common+0xf0/0x210
[<ffffffffa03e12b9>] __ocfs2_cluster_lock+0x3b9/0xa90 [ocfs2]
[<ffffffffa03e7665>] ocfs2_inode_lock_full_nested+0x255/0xdb0 [ocfs2]
[<ffffffffa0446019>] ocfs2_get_acl+0x69/0x120 [ocfs2]
[<ffffffffa0446368>] ocfs2_check_acl+0x28/0x80 [ocfs2]
[<ffffffff800e3507>] acl_permission_check+0x57/0xb0
[<ffffffff800e357d>] generic_permission+0x1d/0xc0
[<ffffffffa03eecea>] ocfs2_permission+0x10a/0x1d0 [ocfs2]
[<ffffffff800e3f65>] inode_permission+0x45/0x100
[<ffffffff800d86b3>] sys_chdir+0x53/0x90
[<ffffffff80007458>] system_call_fastpath+0x16/0x1b
[<00007f34a4ef6927>] 0x7f34a4ef6927
For details, please see:
https://bugzilla.novell.com/show_bug.cgi?id=614332 and
http://oss.oracle.com/bugzilla/show_bug.cgi?id=1278
Signed-off-by: Jiaju Zhang <jjzhang@suse.de>
Acked-by: Mark Fasheh <mfasheh@suse.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ocfs2/acl.c | 24 +++++++++++++++++++++---
1 file changed, 21 insertions(+), 3 deletions(-)
--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -290,12 +290,30 @@ static int ocfs2_set_acl(handle_t *handl
int ocfs2_check_acl(struct inode *inode, int mask)
{
- struct posix_acl *acl = ocfs2_get_acl(inode, ACL_TYPE_ACCESS);
+ struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
+ struct buffer_head *di_bh = NULL;
+ struct posix_acl *acl;
+ int ret = -EAGAIN;
- if (IS_ERR(acl))
+ if (!(osb->s_mount_opt & OCFS2_MOUNT_POSIX_ACL))
+ return ret;
+
+ ret = ocfs2_read_inode_block(inode, &di_bh);
+ if (ret < 0) {
+ mlog_errno(ret);
+ return ret;
+ }
+
+ acl = ocfs2_get_acl_nolock(inode, ACL_TYPE_ACCESS, di_bh);
+
+ brelse(di_bh);
+
+ if (IS_ERR(acl)) {
+ mlog_errno(PTR_ERR(acl));
return PTR_ERR(acl);
+ }
if (acl) {
- int ret = posix_acl_permission(inode, acl, mask);
+ ret = posix_acl_permission(inode, acl, mask);
posix_acl_release(acl);
return ret;
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [031/114] drm/radeon/kms: add additional quirk for Acer rv620 laptop
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (29 preceding siblings ...)
2010-08-24 22:44 ` [030/114] Fix the nested PR lock calling issue in ACL Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [032/114] drm/radeon/kms: add missing copy from user Greg KH
` (82 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alex Deucher, Dave Airlie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alex Deucher <alexdeucher@gmail.com>
commit 9ea2c4be978d597076ddc6c550557de5d243cea8 upstream.
HPD pins are reversed
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=29387
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_atombios.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -206,6 +206,7 @@ static bool radeon_atom_apply_quirks(str
uint16_t *line_mux,
struct radeon_hpd *hpd)
{
+ struct radeon_device *rdev = dev->dev_private;
/* Asus M2A-VM HDMI board lists the DVI port as HDMI */
if ((dev->pdev->device == 0x791e) &&
@@ -308,13 +309,22 @@ static bool radeon_atom_apply_quirks(str
}
}
- /* Acer laptop reports DVI-D as DVI-I */
+ /* Acer laptop reports DVI-D as DVI-I and hpd pins reversed */
if ((dev->pdev->device == 0x95c4) &&
(dev->pdev->subsystem_vendor == 0x1025) &&
(dev->pdev->subsystem_device == 0x013c)) {
+ struct radeon_gpio_rec gpio;
+
if ((*connector_type == DRM_MODE_CONNECTOR_DVII) &&
- (supported_device == ATOM_DEVICE_DFP1_SUPPORT))
+ (supported_device == ATOM_DEVICE_DFP1_SUPPORT)) {
+ gpio = radeon_lookup_gpio(rdev, 6);
+ *hpd = radeon_atom_get_hpd_info_from_gpio(rdev, &gpio);
*connector_type = DRM_MODE_CONNECTOR_DVID;
+ } else if ((*connector_type == DRM_MODE_CONNECTOR_HDMIA) &&
+ (supported_device == ATOM_DEVICE_DFP1_SUPPORT)) {
+ gpio = radeon_lookup_gpio(rdev, 7);
+ *hpd = radeon_atom_get_hpd_info_from_gpio(rdev, &gpio);
+ }
}
/* XFX Pine Group device rv730 reports no VGA DDC lines
^ permalink raw reply [flat|nested] 115+ messages in thread
* [032/114] drm/radeon/kms: add missing copy from user
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (30 preceding siblings ...)
2010-08-24 22:44 ` [031/114] drm/radeon/kms: add additional quirk for Acer rv620 laptop Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [033/114] hwmon: (pc87360) Fix device resource declaration Greg KH
` (81 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dr. David Alan Gilbert,
Dave Airlie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dr. David Alan Gilbert <linux@treblig.org>
commit d8ab35575098b2d6dc10b2535aeb40545933ae56 upstream.
This hasn't mattered up until the ioctl started using the value, and it fell
apart.
fixes fd.o 29340, Ubuntu LP 606081
[airlied: cleaned up whitespace and don't need an error before pushing]
Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_kms.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -106,7 +106,9 @@ int radeon_info_ioctl(struct drm_device
info = data;
value_ptr = (uint32_t *)((unsigned long)info->value);
- value = *value_ptr;
+ if (DRM_COPY_FROM_USER(&value, value_ptr, sizeof(value)))
+ return -EFAULT;
+
switch (info->request) {
case RADEON_INFO_DEVICE_ID:
value = dev->pci_device;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [033/114] hwmon: (pc87360) Fix device resource declaration
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (31 preceding siblings ...)
2010-08-24 22:44 ` [032/114] drm/radeon/kms: add missing copy from user Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [034/114] ARM: Tighten check for allowable CPSR values Greg KH
` (80 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Delvare, Jim Cromie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jean Delvare <khali@linux-fr.org>
commit b9783dcebe952bf73449fe70a19ee4814adc81a0 upstream.
It's not OK to call platform_device_add_resources() multiple times
in a row. Despite its name, this functions sets the resources, it
doesn't add them. So we have to prepare an array with all the
resources, and then call platform_device_add_resources() once.
Before this fix, only the last I/O resource would be actually
registered. The other I/O resources were leaked.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Jim Cromie <jim.cromie@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/pc87360.c | 31 +++++++++++++++++--------------
1 file changed, 17 insertions(+), 14 deletions(-)
--- a/drivers/hwmon/pc87360.c
+++ b/drivers/hwmon/pc87360.c
@@ -1610,11 +1610,8 @@ static struct pc87360_data *pc87360_upda
static int __init pc87360_device_add(unsigned short address)
{
- struct resource res = {
- .name = "pc87360",
- .flags = IORESOURCE_IO,
- };
- int err, i;
+ struct resource res[3];
+ int err, i, res_count;
pdev = platform_device_alloc("pc87360", address);
if (!pdev) {
@@ -1623,22 +1620,28 @@ static int __init pc87360_device_add(uns
goto exit;
}
+ memset(res, 0, 3 * sizeof(struct resource));
+ res_count = 0;
for (i = 0; i < 3; i++) {
if (!extra_isa[i])
continue;
- res.start = extra_isa[i];
- res.end = extra_isa[i] + PC87360_EXTENT - 1;
+ res[res_count].start = extra_isa[i];
+ res[res_count].end = extra_isa[i] + PC87360_EXTENT - 1;
+ res[res_count].name = "pc87360",
+ res[res_count].flags = IORESOURCE_IO,
- err = acpi_check_resource_conflict(&res);
+ err = acpi_check_resource_conflict(&res[res_count]);
if (err)
goto exit_device_put;
- err = platform_device_add_resources(pdev, &res, 1);
- if (err) {
- printk(KERN_ERR "pc87360: Device resource[%d] "
- "addition failed (%d)\n", i, err);
- goto exit_device_put;
- }
+ res_count++;
+ }
+
+ err = platform_device_add_resources(pdev, res, res_count);
+ if (err) {
+ printk(KERN_ERR "pc87360: Device resources addition failed "
+ "(%d)\n", err);
+ goto exit_device_put;
}
err = platform_device_add(pdev);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [034/114] ARM: Tighten check for allowable CPSR values
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (32 preceding siblings ...)
2010-08-24 22:44 ` [033/114] hwmon: (pc87360) Fix device resource declaration Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [035/114] ARM: Fix gen_nand probe structures contents Greg KH
` (79 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dima Zavin, Russell King
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1413 bytes --]
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Russell King <rmk+kernel@arm.linux.org.uk>
commit 41e2e8fd34fff909a0e40129f6ac4233ecfa67a9 upstream.
Reviewed-by: Arve Hjønnevåg <arve@android.com>
Acked-by: Dima Zavin <dima@android.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/arm/include/asm/ptrace.h | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
--- a/arch/arm/include/asm/ptrace.h
+++ b/arch/arm/include/asm/ptrace.h
@@ -158,15 +158,24 @@ struct pt_regs {
*/
static inline int valid_user_regs(struct pt_regs *regs)
{
- if (user_mode(regs) && (regs->ARM_cpsr & PSR_I_BIT) == 0) {
- regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT);
- return 1;
+ unsigned long mode = regs->ARM_cpsr & MODE_MASK;
+
+ /*
+ * Always clear the F (FIQ) and A (delayed abort) bits
+ */
+ regs->ARM_cpsr &= ~(PSR_F_BIT | PSR_A_BIT);
+
+ if ((regs->ARM_cpsr & PSR_I_BIT) == 0) {
+ if (mode == USR_MODE)
+ return 1;
+ if (elf_hwcap & HWCAP_26BIT && mode == USR26_MODE)
+ return 1;
}
/*
* Force CPSR to something logical...
*/
- regs->ARM_cpsr &= PSR_f | PSR_s | (PSR_x & ~PSR_A_BIT) | PSR_T_BIT | MODE32_BIT;
+ regs->ARM_cpsr &= PSR_f | PSR_s | PSR_x | PSR_T_BIT | MODE32_BIT;
if (!(elf_hwcap & HWCAP_26BIT))
regs->ARM_cpsr |= USR_MODE;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [035/114] ARM: Fix gen_nand probe structures contents
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (33 preceding siblings ...)
2010-08-24 22:44 ` [034/114] ARM: Tighten check for allowable CPSR values Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [036/114] BFIN: " Greg KH
` (78 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Marek Vasut, David Woodhouse
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marek Vasut <marek.vasut@gmail.com>
commit ef077179a2909d3d0d3accf29ad1ea9ebb19019b upstream.
These three platforms didn't properly fill nr_chips in gen_nand
registration and therefore depended on gen_nand bug fixed by commit
81cbb0b17796d81cbd92defe113cf2a7c7a21fbb ("mtd: gen_nand: fix support for
multiple chips")
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/arm/mach-ixp4xx/ixdp425-setup.c | 1 +
arch/arm/mach-mx3/mach-qong.c | 1 +
arch/arm/mach-orion5x/ts78xx-setup.c | 1 +
3 files changed, 3 insertions(+)
--- a/arch/arm/mach-ixp4xx/ixdp425-setup.c
+++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c
@@ -100,6 +100,7 @@ ixdp425_flash_nand_cmd_ctrl(struct mtd_i
static struct platform_nand_data ixdp425_flash_nand_data = {
.chip = {
+ .nr_chips = 1,
.chip_delay = 30,
.options = NAND_NO_AUTOINCR,
#ifdef CONFIG_MTD_PARTITIONS
--- a/arch/arm/mach-mx3/mach-qong.c
+++ b/arch/arm/mach-mx3/mach-qong.c
@@ -169,6 +169,7 @@ static void qong_nand_select_chip(struct
static struct platform_nand_data qong_nand_data = {
.chip = {
+ .nr_chips = 1,
.chip_delay = 20,
.options = 0,
},
--- a/arch/arm/mach-orion5x/ts78xx-setup.c
+++ b/arch/arm/mach-orion5x/ts78xx-setup.c
@@ -216,6 +216,7 @@ static struct mtd_partition ts78xx_ts_na
static struct platform_nand_data ts78xx_ts_nand_data = {
.chip = {
+ .nr_chips = 1,
.part_probe_types = ts_nand_part_probes,
.partitions = ts78xx_ts_nand_parts,
.nr_partitions = ARRAY_SIZE(ts78xx_ts_nand_parts),
^ permalink raw reply [flat|nested] 115+ messages in thread
* [036/114] BFIN: Fix gen_nand probe structures contents
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (34 preceding siblings ...)
2010-08-24 22:44 ` [035/114] ARM: Fix gen_nand probe structures contents Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [037/114] ath9k_htc: fix panic on packet injection using airbase-ng tool Greg KH
` (77 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Marek Vasut, David Woodhouse
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marek Vasut <marek.vasut@gmail.com>
commit ef56609f9c7fdf5baa9d9f86f84a7bd8a717cd25 upstream.
These two platforms didn't properly fill nr_chips in gen_nand
registration and therefore depended on gen_nand bug fixed by by commit
81cbb0b17796d81cbd92defe113cf2a7c7a21fbb ("mtd: gen_nand: fix support for
multiple chips")
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/blackfin/mach-bf537/boards/stamp.c | 1 +
arch/blackfin/mach-bf561/boards/acvilon.c | 1 +
2 files changed, 2 insertions(+)
--- a/arch/blackfin/mach-bf537/boards/stamp.c
+++ b/arch/blackfin/mach-bf537/boards/stamp.c
@@ -400,6 +400,7 @@ static int bfin_plat_nand_dev_ready(stru
static struct platform_nand_data bfin_plat_nand_data = {
.chip = {
+ .nr_chips = 1,
.chip_delay = 30,
#ifdef CONFIG_MTD_PARTITIONS
.part_probe_types = part_probes,
--- a/arch/blackfin/mach-bf561/boards/acvilon.c
+++ b/arch/blackfin/mach-bf561/boards/acvilon.c
@@ -284,6 +284,7 @@ static int bfin_plat_nand_dev_ready(stru
static struct platform_nand_data bfin_plat_nand_data = {
.chip = {
+ .nr_chips = 1,
.chip_delay = 30,
#ifdef CONFIG_MTD_PARTITIONS
.part_probe_types = part_probes,
^ permalink raw reply [flat|nested] 115+ messages in thread
* [037/114] ath9k_htc: fix panic on packet injection using airbase-ng tool.
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (35 preceding siblings ...)
2010-08-24 22:44 ` [036/114] BFIN: " Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [038/114] nfs: Add "lookupcache" to displayed mount options Greg KH
` (76 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Rajkumar Manoharan,
John W. Linville
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Rajkumar Manoharan <rmanoharan@atheros.com>
commit da93f10684bfba2983a70c10b5d417232b6a5245 upstream.
This should fix the oops which occurs during the packet injection
on monitor interface.
EIP is at ath9k_htc_tx_start+0x69/0x220 [ath9k_htc]
[<f84dc8ea>] ? invoke_tx_handlers+0xa5a/0xee0 [mac80211]
[<f82c84f4>] ? ath9k_htc_tx+0x44/0xe0 [ath9k_htc]
[<f84db7b8>] ? __ieee80211_tx+0xf8/0x190 [mac80211]
[<f84dce0d>] ? ieee80211_tx+0x9d/0x1a0 [mac80211]
[<f84dcfac>] ? ieee80211_xmit+0x9c/0x1c0 [mac80211]
[<f84dd1b5>] ? ieee80211_monitor_start_xmit+0x85/0xb0 [mac80211]
[<c04c30cd>] ? dev_hard_start_xmit+0x1ad/0x210
[<c04b97c2>] ? __alloc_skb+0x52/0x130
[<c04d7cd5>] ? sch_direct_xmit+0x105/0x170
[<c04c5e9f>] ? dev_queue_xmit+0x37f/0x4b0
[<c0567e1e>] ? packet_snd+0x21e/0x250
[<c05684a2>] ? packet_sendmsg+0x32/0x40
[<c04b4c63>] ? sock_aio_write+0x113/0x130
[<c0207934>] ? do_sync_write+0xc4/0x100
[<c0167740>] ? autoremove_wake_function+0x0/0x50
[<c02f4414>] ? security_file_permission+0x14/0x20
[<c0207ad4>] ? rw_verify_area+0x64/0xe0
[<c01e6458>] ? handle_mm_fault+0x338/0x390
[<c0207cd5>] ? vfs_write+0x185/0x1a0
[<c058db20>] ? do_page_fault+0x160/0x3a0
[<c0208512>] ? sys_write+0x42/0x70
[<c01033ec>] ? syscall_call+0x7/0xb
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
@@ -68,18 +68,23 @@ int ath9k_htc_tx_start(struct ath9k_htc_
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
struct ieee80211_sta *sta = tx_info->control.sta;
struct ath9k_htc_sta *ista;
- struct ath9k_htc_vif *avp;
struct ath9k_htc_tx_ctl tx_ctl;
enum htc_endpoint_id epid;
u16 qnum, hw_qnum;
__le16 fc;
u8 *tx_fhdr;
- u8 sta_idx;
+ u8 sta_idx, vif_idx;
hdr = (struct ieee80211_hdr *) skb->data;
fc = hdr->frame_control;
- avp = (struct ath9k_htc_vif *) tx_info->control.vif->drv_priv;
+ if (tx_info->control.vif &&
+ (struct ath9k_htc_vif *) tx_info->control.vif->drv_priv)
+ vif_idx = ((struct ath9k_htc_vif *)
+ tx_info->control.vif->drv_priv)->index;
+ else
+ vif_idx = priv->nvifs;
+
if (sta) {
ista = (struct ath9k_htc_sta *) sta->drv_priv;
sta_idx = ista->index;
@@ -96,7 +101,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_
memset(&tx_hdr, 0, sizeof(struct tx_frame_hdr));
tx_hdr.node_idx = sta_idx;
- tx_hdr.vif_idx = avp->index;
+ tx_hdr.vif_idx = vif_idx;
if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
tx_ctl.type = ATH9K_HTC_AMPDU;
@@ -156,7 +161,7 @@ int ath9k_htc_tx_start(struct ath9k_htc_
tx_ctl.type = ATH9K_HTC_NORMAL;
mgmt_hdr.node_idx = sta_idx;
- mgmt_hdr.vif_idx = avp->index;
+ mgmt_hdr.vif_idx = vif_idx;
mgmt_hdr.tidno = 0;
mgmt_hdr.flags = 0;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [038/114] nfs: Add "lookupcache" to displayed mount options
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (36 preceding siblings ...)
2010-08-24 22:44 ` [037/114] ath9k_htc: fix panic on packet injection using airbase-ng tool Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [039/114] NFS: Fix an Oops in the NFSv4 atomic open code Greg KH
` (75 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Patrick LoPresti,
Trond Myklebust
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Patrick J. LoPresti <lopresti@gmail.com>
commit 9b00c64318cc337846a7a08a5678f5f19aeff188 upstream.
Running "cat /proc/mounts" fails to display the "lookupcache" option.
This oversight cost me a bunch of wasted time recently.
The following simple patch fixes it.
Signed-off-by: Patrick LoPresti <lopresti@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nfs/super.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/fs/nfs/super.c
+++ b/fs/nfs/super.c
@@ -652,6 +652,13 @@ static void nfs_show_mount_options(struc
if (nfss->options & NFS_OPTION_FSCACHE)
seq_printf(m, ",fsc");
+
+ if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONEG) {
+ if (nfss->flags & NFS_MOUNT_LOOKUP_CACHE_NONE)
+ seq_printf(m, ",lookupcache=none");
+ else
+ seq_printf(m, ",lookupcache=pos");
+ }
}
/*
^ permalink raw reply [flat|nested] 115+ messages in thread
* [039/114] NFS: Fix an Oops in the NFSv4 atomic open code
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (37 preceding siblings ...)
2010-08-24 22:44 ` [038/114] nfs: Add "lookupcache" to displayed mount options Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [040/114] ath5k: disable ASPM L0s for all cards Greg KH
` (74 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Trond Myklebust
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit 0a377cff9428af2da2b293d11e07bc4dbf064ee5 upstream.
Adam Lackorzynski reports:
with 2.6.35.2 I'm getting this reproducible Oops:
[ 110.825396] BUG: unable to handle kernel NULL pointer dereference at
(null)
[ 110.828638] IP: [<ffffffff811247b7>] encode_attrs+0x1a/0x2a4
[ 110.828638] PGD be89f067 PUD bf18f067 PMD 0
[ 110.828638] Oops: 0000 [#1] SMP
[ 110.828638] last sysfs file: /sys/class/net/lo/operstate
[ 110.828638] CPU 2
[ 110.828638] Modules linked in: rtc_cmos rtc_core rtc_lib amd64_edac_mod
i2c_amd756 edac_core i2c_core dm_mirror dm_region_hash dm_log dm_snapshot
sg sr_mod usb_storage ohci_hcd mptspi tg3 mptscsih mptbase usbcore nls_base
[last unloaded: scsi_wait_scan]
[ 110.828638]
[ 110.828638] Pid: 11264, comm: setchecksum Not tainted 2.6.35.2 #1
[ 110.828638] RIP: 0010:[<ffffffff811247b7>] [<ffffffff811247b7>]
encode_attrs+0x1a/0x2a4
[ 110.828638] RSP: 0000:ffff88003bf5b878 EFLAGS: 00010296
[ 110.828638] RAX: ffff8800bddb48a8 RBX: ffff88003bf5bb18 RCX:
0000000000000000
[ 110.828638] RDX: ffff8800be258800 RSI: 0000000000000000 RDI:
ffff88003bf5b9f8
[ 110.828638] RBP: 0000000000000000 R08: ffff8800bddb48a8 R09:
0000000000000004
[ 110.828638] R10: 0000000000000003 R11: ffff8800be779000 R12:
ffff8800be258800
[ 110.828638] R13: ffff88003bf5b9f8 R14: ffff88003bf5bb20 R15:
ffff8800be258800
[ 110.828638] FS: 0000000000000000(0000) GS:ffff880041e00000(0063)
knlGS:00000000556bd6b0
[ 110.828638] CS: 0010 DS: 002b ES: 002b CR0: 000000008005003b
[ 110.828638] CR2: 0000000000000000 CR3: 00000000be8ef000 CR4:
00000000000006e0
[ 110.828638] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
0000000000000000
[ 110.828638] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7:
0000000000000400
[ 110.828638] Process setchecksum (pid: 11264, threadinfo
ffff88003bf5a000, task ffff88003f232210)
[ 110.828638] Stack:
[ 110.828638] 0000000000000000 ffff8800bfbcf920 0000000000000000
0000000000000ffe
[ 110.828638] <0> 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[ 110.828638] <0> 0000000000000000 0000000000000000 0000000000000000
0000000000000000
[ 110.828638] Call Trace:
[ 110.828638] [<ffffffff81124c1f>] ? nfs4_xdr_enc_setattr+0x90/0xb4
[ 110.828638] [<ffffffff81371161>] ? call_transmit+0x1c3/0x24a
[ 110.828638] [<ffffffff813774d9>] ? __rpc_execute+0x78/0x22a
[ 110.828638] [<ffffffff81371a91>] ? rpc_run_task+0x21/0x2b
[ 110.828638] [<ffffffff81371b7e>] ? rpc_call_sync+0x3d/0x5d
[ 110.828638] [<ffffffff8111e284>] ? _nfs4_do_setattr+0x11b/0x147
[ 110.828638] [<ffffffff81109466>] ? nfs_init_locked+0x0/0x32
[ 110.828638] [<ffffffff810ac521>] ? ifind+0x4e/0x90
[ 110.828638] [<ffffffff8111e2fb>] ? nfs4_do_setattr+0x4b/0x6e
[ 110.828638] [<ffffffff8111e634>] ? nfs4_do_open+0x291/0x3a6
[ 110.828638] [<ffffffff8111ed81>] ? nfs4_open_revalidate+0x63/0x14a
[ 110.828638] [<ffffffff811056c4>] ? nfs_open_revalidate+0xd7/0x161
[ 110.828638] [<ffffffff810a2de4>] ? do_lookup+0x1a4/0x201
[ 110.828638] [<ffffffff810a4733>] ? link_path_walk+0x6a/0x9d5
[ 110.828638] [<ffffffff810a42b6>] ? do_last+0x17b/0x58e
[ 110.828638] [<ffffffff810a5fbe>] ? do_filp_open+0x1bd/0x56e
[ 110.828638] [<ffffffff811cd5e0>] ? _atomic_dec_and_lock+0x30/0x48
[ 110.828638] [<ffffffff810a9b1b>] ? dput+0x37/0x152
[ 110.828638] [<ffffffff810ae063>] ? alloc_fd+0x69/0x10a
[ 110.828638] [<ffffffff81099f39>] ? do_sys_open+0x56/0x100
[ 110.828638] [<ffffffff81027a22>] ? ia32_sysret+0x0/0x5
[ 110.828638] Code: 83 f1 01 e8 f5 ca ff ff 48 83 c4 50 5b 5d 41 5c c3 41
57 41 56 41 55 49 89 fd 41 54 49 89 d4 55 48 89 f5 53 48 81 ec 18 01 00 00
<8b> 06 89 c2 83 e2 08 83 fa 01 19 db 83 e3 f8 83 c3 18 a8 01 8d
[ 110.828638] RIP [<ffffffff811247b7>] encode_attrs+0x1a/0x2a4
[ 110.828638] RSP <ffff88003bf5b878>
[ 110.828638] CR2: 0000000000000000
[ 112.840396] ---[ end trace 95282e83fd77358f ]---
We need to ensure that the O_EXCL flag is turned off if the user doesn't
set O_CREAT.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nfs/dir.c | 2 +-
fs/nfs/nfs4proc.c | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1103,7 +1103,7 @@ static int nfs_open_revalidate(struct de
if ((openflags & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
goto no_open_dput;
/* We can't create new files, or truncate existing ones here */
- openflags &= ~(O_CREAT|O_TRUNC);
+ openflags &= ~(O_CREAT|O_EXCL|O_TRUNC);
/*
* Note: we're not holding inode->i_mutex and so may be racing with
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -2023,7 +2023,8 @@ nfs4_atomic_open(struct inode *dir, stru
struct rpc_cred *cred;
struct nfs4_state *state;
struct dentry *res;
- fmode_t fmode = nd->intent.open.flags & (FMODE_READ | FMODE_WRITE | FMODE_EXEC);
+ int open_flags = nd->intent.open.flags;
+ fmode_t fmode = open_flags & (FMODE_READ | FMODE_WRITE | FMODE_EXEC);
if (nd->flags & LOOKUP_CREATE) {
attr.ia_mode = nd->intent.open.create_mode;
@@ -2031,8 +2032,9 @@ nfs4_atomic_open(struct inode *dir, stru
if (!IS_POSIXACL(dir))
attr.ia_mode &= ~current_umask();
} else {
+ open_flags &= ~O_EXCL;
attr.ia_valid = 0;
- BUG_ON(nd->intent.open.flags & O_CREAT);
+ BUG_ON(open_flags & O_CREAT);
}
cred = rpc_lookup_cred();
@@ -2041,7 +2043,7 @@ nfs4_atomic_open(struct inode *dir, stru
parent = dentry->d_parent;
/* Protect against concurrent sillydeletes */
nfs_block_sillyrename(parent);
- state = nfs4_do_open(dir, &path, fmode, nd->intent.open.flags, &attr, cred);
+ state = nfs4_do_open(dir, &path, fmode, open_flags, &attr, cred);
put_rpccred(cred);
if (IS_ERR(state)) {
if (PTR_ERR(state) == -ENOENT) {
^ permalink raw reply [flat|nested] 115+ messages in thread
* [040/114] ath5k: disable ASPM L0s for all cards
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (38 preceding siblings ...)
2010-08-24 22:44 ` [039/114] NFS: Fix an Oops in the NFSv4 atomic open code Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [041/114] pxa3xx: fix ns2cycle equation Greg KH
` (73 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David Quan, Matthew Garrett,
Tim Gardner, Jussi Kivilinna, Luis R. Rodriguez, Maxim Levitsky,
John W. Linville
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Maxim Levitsky <maximlevitsky@gmail.com>
commit 6ccf15a1a76d2ff915cdef6ae4d12d0170087118 upstream.
Atheros PCIe wireless cards handled by ath5k do require L0s disabled.
For distributions shipping with CONFIG_PCIEASPM (this will be enabled
by default in the future in 2.6.36) this will also mean both L1 and L0s
will be disabled when a pre 1.1 PCIe device is detected. We do know L1
works correctly even for all ath5k pre 1.1 PCIe devices though but cannot
currently undue the effect of a blacklist, for details you can read
pcie_aspm_sanity_check() and see how it adjusts the device link
capability.
It may be possible in the future to implement some PCI API to allow
drivers to override blacklists for pre 1.1 PCIe but for now it is
best to accept that both L0s and L1 will be disabled completely for
distributions shipping with CONFIG_PCIEASPM rather than having this
issue present. Motivation for adding this new API will be to help
with power consumption for some of these devices.
Example of issues you'd see:
- On the Acer Aspire One (AOA150, Atheros Communications Inc. AR5001
Wireless Network Adapter [168c:001c] (rev 01)) doesn't work well
with ASPM enabled, the card will eventually stall on heavy traffic
with often 'unsupported jumbo' warnings appearing. Disabling
ASPM L0s in ath5k fixes these problems.
- On the same card you would see a storm of RXORN interrupts
even though medium is idle.
Credit for root causing and fixing the bug goes to Jussi Kivilinna.
Cc: David Quan <David.Quan@atheros.com>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Tim Gardner <tim.gardner@canonical.com>
Cc: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath5k/base.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -48,6 +48,7 @@
#include <linux/netdevice.h>
#include <linux/cache.h>
#include <linux/pci.h>
+#include <linux/pci-aspm.h>
#include <linux/ethtool.h>
#include <linux/uaccess.h>
#include <linux/slab.h>
@@ -472,6 +473,26 @@ ath5k_pci_probe(struct pci_dev *pdev,
int ret;
u8 csz;
+ /*
+ * L0s needs to be disabled on all ath5k cards.
+ *
+ * For distributions shipping with CONFIG_PCIEASPM (this will be enabled
+ * by default in the future in 2.6.36) this will also mean both L1 and
+ * L0s will be disabled when a pre 1.1 PCIe device is detected. We do
+ * know L1 works correctly even for all ath5k pre 1.1 PCIe devices
+ * though but cannot currently undue the effect of a blacklist, for
+ * details you can read pcie_aspm_sanity_check() and see how it adjusts
+ * the device link capability.
+ *
+ * It may be possible in the future to implement some PCI API to allow
+ * drivers to override blacklists for pre 1.1 PCIe but for now it is
+ * best to accept that both L0s and L1 will be disabled completely for
+ * distributions shipping with CONFIG_PCIEASPM rather than having this
+ * issue present. Motivation for adding this new API will be to help
+ * with power consumption for some of these devices.
+ */
+ pci_disable_link_state(pdev, PCIE_LINK_STATE_L0S);
+
ret = pci_enable_device(pdev);
if (ret) {
dev_err(&pdev->dev, "can't enable device\n");
^ permalink raw reply [flat|nested] 115+ messages in thread
* [041/114] pxa3xx: fix ns2cycle equation
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (39 preceding siblings ...)
2010-08-24 22:44 ` [040/114] ath5k: disable ASPM L0s for all cards Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [042/114] matroxfb: fix incorrect use of memcpy_toio() Greg KH
` (72 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Axel Lin, Lei Wen, Eric Miao,
David Woodhouse
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Axel Lin <axel.lin@gmail.com>
commit 93b352fce679945845664b56b0c3afbd655a7a12 upstream.
Test on a PXA310 platform with Samsung K9F2G08X0B NAND flash,
with tCH=5 and clk is 156MHz, ns2cycle(5, 156000000) returns -1.
ns2cycle returns negtive value will break NDTR0_tXX macros.
After checking the commit log, I found the problem is introduced by
commit 5b0d4d7c8a67c5ba3d35e6ceb0c5530cc6846db7
"[MTD] [NAND] pxa3xx: convert from ns to clock ticks more accurately"
To get num of clock cycles, we use below equation:
num of clock cycles = time (ns) / one clock cycle (ns) + 1
We need to add 1 cycle here because integer division will truncate the result.
It is possible the developers set the Min values in SPEC for timing settings.
Thus the truncate may cause problem, and it is safe to add an extra cycle here.
The various fields in NDTR{01} are in units of clock ticks minus one,
thus we should subtract 1 cycle then.
Thus the correct equation should be:
num of clock cycles = time (ns) / one clock cycle (ns) + 1 - 1
= time (ns) / one clock cycle (ns)
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Lei Wen <leiwen@marvell.com>
Acked-by: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/mtd/nand/pxa3xx_nand.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -363,7 +363,7 @@ static struct pxa3xx_nand_flash *builtin
#define tAR_NDTR1(r) (((r) >> 0) & 0xf)
/* convert nano-seconds to nand flash controller clock cycles */
-#define ns2cycle(ns, clk) (int)(((ns) * (clk / 1000000) / 1000) - 1)
+#define ns2cycle(ns, clk) (int)((ns) * (clk / 1000000) / 1000)
/* convert nand flash controller clock cycles to nano-seconds */
#define cycle2ns(c, clk) ((((c) + 1) * 1000000 + clk / 500) / (clk / 1000))
^ permalink raw reply [flat|nested] 115+ messages in thread
* [042/114] matroxfb: fix incorrect use of memcpy_toio()
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (40 preceding siblings ...)
2010-08-24 22:44 ` [041/114] pxa3xx: fix ns2cycle equation Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [043/114] mtd: nand: Fix probe of Samsung NAND chips Greg KH
` (71 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ondrej Zary, Brian Gerst,
H. Peter Anvin, Petr Vandrovec, Jean Delvare
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ondrej Zary <linux@rainbow-software.org>
commit c81476df1b4241aefba4ff83a7701b3a926bd7ce upstream.
Screen is completely corrupted since 2.6.34. Bisection revealed that it's
caused by commit 6175ddf06b61720 ("x86: Clean up mem*io functions.").
H. Peter Anvin explained that memcpy_toio() does not copy data in 32bit
chunks anymore on x86.
Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Petr Vandrovec <vandrove@vc.cvut.cz>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/video/matrox/matroxfb_base.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/video/matrox/matroxfb_base.h
+++ b/drivers/video/matrox/matroxfb_base.h
@@ -151,13 +151,13 @@ static inline void mga_writel(vaddr_t va
static inline void mga_memcpy_toio(vaddr_t va, const void* src, int len) {
#if defined(__alpha__) || defined(__i386__) || defined(__x86_64__)
/*
- * memcpy_toio works for us if:
+ * iowrite32_rep works for us if:
* (1) Copies data as 32bit quantities, not byte after byte,
* (2) Performs LE ordered stores, and
* (3) It copes with unaligned source (destination is guaranteed to be page
* aligned and length is guaranteed to be multiple of 4).
*/
- memcpy_toio(va.vaddr, src, len);
+ iowrite32_rep(va.vaddr, src, len >> 2);
#else
u_int32_t __iomem* addr = va.vaddr;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [043/114] mtd: nand: Fix probe of Samsung NAND chips
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (41 preceding siblings ...)
2010-08-24 22:44 ` [042/114] matroxfb: fix incorrect use of memcpy_toio() Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [044/114] mtd: change struct flchip_shared spinlock locking into mutex Greg KH
` (70 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tilman Sauerbeck,
Brian Norris, David Woodhouse
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Sauerbeck <tilman@code-monkey.de>
commit cfe3fdadb16162327773ef01a575a32000b8c7f4 upstream.
Apparently, the check for a 6-byte ID string introduced by commit
426c457a3216fac74e3d44dd39729b0689f4c7ab ("mtd: nand: extend NAND flash
detection to new MLC chips") is NOT sufficient to determine whether or
not a Samsung chip uses their new MLC detection scheme or the old,
standard scheme. This adds a condition to check cell type.
Signed-off-by: Tilman Sauerbeck <tilman@code-monkey.de>
Signed-off-by: Brian Norris <norris@broadcom.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/mtd/nand/nand_base.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/mtd/nand/nand_base.c
+++ b/drivers/mtd/nand/nand_base.c
@@ -2852,6 +2852,7 @@ static struct nand_flash_dev *nand_get_f
*/
if (id_data[0] == id_data[6] && id_data[1] == id_data[7] &&
id_data[0] == NAND_MFR_SAMSUNG &&
+ (chip->cellinfo & NAND_CI_CELLTYPE_MSK) &&
id_data[5] != 0x00) {
/* Calc pagesize */
mtd->writesize = 2048 << (extid & 0x03);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [044/114] mtd: change struct flchip_shared spinlock locking into mutex
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (42 preceding siblings ...)
2010-08-24 22:44 ` [043/114] mtd: nand: Fix probe of Samsung NAND chips Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [045/114] drm/i915: fixup pageflip ringbuffer commands for i8xx Greg KH
` (69 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Stefani Seibold,
Artem Bityutskiy, David Woodhouse
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stefani Seibold <stefani@seibold.net>
commit 8ae664184c45def51ff0b61d4bd6c6671db6cb4f upstream.
This patch prevent to schedule while atomic by changing the
flchip_shared spinlock into a mutex. This should be save since no atomic
path will use this lock.
It was suggested by Arnd Bergmann and Vasiliy Kulikov.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/mtd/chips/cfi_cmdset_0001.c | 20 ++++++++++----------
drivers/mtd/lpddr/lpddr_cmds.c | 20 ++++++++++----------
include/linux/mtd/flashchip.h | 2 +-
3 files changed, 21 insertions(+), 21 deletions(-)
--- a/drivers/mtd/chips/cfi_cmdset_0001.c
+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
@@ -717,7 +717,7 @@ static int cfi_intelext_partition_fixup(
chip = &newcfi->chips[0];
for (i = 0; i < cfi->numchips; i++) {
shared[i].writing = shared[i].erasing = NULL;
- spin_lock_init(&shared[i].lock);
+ mutex_init(&shared[i].lock);
for (j = 0; j < numparts; j++) {
*chip = cfi->chips[i];
chip->start += j << partshift;
@@ -886,7 +886,7 @@ static int get_chip(struct map_info *map
*/
struct flchip_shared *shared = chip->priv;
struct flchip *contender;
- spin_lock(&shared->lock);
+ mutex_lock(&shared->lock);
contender = shared->writing;
if (contender && contender != chip) {
/*
@@ -899,7 +899,7 @@ static int get_chip(struct map_info *map
* get_chip returns success we're clear to go ahead.
*/
ret = mutex_trylock(&contender->mutex);
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
if (!ret)
goto retry;
mutex_unlock(&chip->mutex);
@@ -914,7 +914,7 @@ static int get_chip(struct map_info *map
mutex_unlock(&contender->mutex);
return ret;
}
- spin_lock(&shared->lock);
+ mutex_lock(&shared->lock);
/* We should not own chip if it is already
* in FL_SYNCING state. Put contender and retry. */
@@ -930,7 +930,7 @@ static int get_chip(struct map_info *map
* on this chip. Sleep. */
if (mode == FL_ERASING && shared->erasing
&& shared->erasing->oldstate == FL_ERASING) {
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(&chip->wq, &wait);
mutex_unlock(&chip->mutex);
@@ -944,7 +944,7 @@ static int get_chip(struct map_info *map
shared->writing = chip;
if (mode == FL_ERASING)
shared->erasing = chip;
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
}
ret = chip_ready(map, chip, adr, mode);
if (ret == -EAGAIN)
@@ -959,7 +959,7 @@ static void put_chip(struct map_info *ma
if (chip->priv) {
struct flchip_shared *shared = chip->priv;
- spin_lock(&shared->lock);
+ mutex_lock(&shared->lock);
if (shared->writing == chip && chip->oldstate == FL_READY) {
/* We own the ability to write, but we're done */
shared->writing = shared->erasing;
@@ -967,7 +967,7 @@ static void put_chip(struct map_info *ma
/* give back ownership to who we loaned it from */
struct flchip *loaner = shared->writing;
mutex_lock(&loaner->mutex);
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
mutex_unlock(&chip->mutex);
put_chip(map, loaner, loaner->start);
mutex_lock(&chip->mutex);
@@ -985,11 +985,11 @@ static void put_chip(struct map_info *ma
* Don't let the switch below mess things up since
* we don't have ownership to resume anything.
*/
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
wake_up(&chip->wq);
return;
}
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
}
switch(chip->oldstate) {
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -98,7 +98,7 @@ struct mtd_info *lpddr_cmdset(struct map
numchips = lpddr->numchips / lpddr->qinfo->HWPartsNum;
for (i = 0; i < numchips; i++) {
shared[i].writing = shared[i].erasing = NULL;
- spin_lock_init(&shared[i].lock);
+ mutex_init(&shared[i].lock);
for (j = 0; j < lpddr->qinfo->HWPartsNum; j++) {
*chip = lpddr->chips[i];
chip->start += j << lpddr->chipshift;
@@ -217,7 +217,7 @@ static int get_chip(struct map_info *map
*/
struct flchip_shared *shared = chip->priv;
struct flchip *contender;
- spin_lock(&shared->lock);
+ mutex_lock(&shared->lock);
contender = shared->writing;
if (contender && contender != chip) {
/*
@@ -230,7 +230,7 @@ static int get_chip(struct map_info *map
* get_chip returns success we're clear to go ahead.
*/
ret = mutex_trylock(&contender->mutex);
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
if (!ret)
goto retry;
mutex_unlock(&chip->mutex);
@@ -245,7 +245,7 @@ static int get_chip(struct map_info *map
mutex_unlock(&contender->mutex);
return ret;
}
- spin_lock(&shared->lock);
+ mutex_lock(&shared->lock);
/* We should not own chip if it is already in FL_SYNCING
* state. Put contender and retry. */
@@ -261,7 +261,7 @@ static int get_chip(struct map_info *map
Must sleep in such a case. */
if (mode == FL_ERASING && shared->erasing
&& shared->erasing->oldstate == FL_ERASING) {
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(&chip->wq, &wait);
mutex_unlock(&chip->mutex);
@@ -275,7 +275,7 @@ static int get_chip(struct map_info *map
shared->writing = chip;
if (mode == FL_ERASING)
shared->erasing = chip;
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
}
ret = chip_ready(map, chip, mode);
@@ -348,7 +348,7 @@ static void put_chip(struct map_info *ma
{
if (chip->priv) {
struct flchip_shared *shared = chip->priv;
- spin_lock(&shared->lock);
+ mutex_lock(&shared->lock);
if (shared->writing == chip && chip->oldstate == FL_READY) {
/* We own the ability to write, but we're done */
shared->writing = shared->erasing;
@@ -356,7 +356,7 @@ static void put_chip(struct map_info *ma
/* give back the ownership */
struct flchip *loaner = shared->writing;
mutex_lock(&loaner->mutex);
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
mutex_unlock(&chip->mutex);
put_chip(map, loaner);
mutex_lock(&chip->mutex);
@@ -374,11 +374,11 @@ static void put_chip(struct map_info *ma
* Don't let the switch below mess things up since
* we don't have ownership to resume anything.
*/
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
wake_up(&chip->wq);
return;
}
- spin_unlock(&shared->lock);
+ mutex_unlock(&shared->lock);
}
switch (chip->oldstate) {
--- a/include/linux/mtd/flashchip.h
+++ b/include/linux/mtd/flashchip.h
@@ -92,7 +92,7 @@ struct flchip {
/* This is used to handle contention on write/erase operations
between partitions of the same physical chip. */
struct flchip_shared {
- spinlock_t lock;
+ struct mutex lock;
struct flchip *writing;
struct flchip *erasing;
};
^ permalink raw reply [flat|nested] 115+ messages in thread
* [045/114] drm/i915: fixup pageflip ringbuffer commands for i8xx
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (43 preceding siblings ...)
2010-08-24 22:44 ` [044/114] mtd: change struct flchip_shared spinlock locking into mutex Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [046/114] drm/i915: i8xx also doesnt like multiple oustanding pageflips Greg KH
` (68 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel Vetter, Eric Anholt
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Vetter <daniel.vetter@ffwll.ch>
commit 69d0b96c095468526009cb3104eee561c9252a84 upstream.
Add a new path for 2nd gen chips that uses the commands for i81x
chips (where public docs do exist) augmented with the plane bits
from i915. It seems to work and doesn't result in a black screen
like before.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[anholt: resolved against conflict]
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/intel_display.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4837,11 +4837,17 @@ static int intel_crtc_page_flip(struct d
OUT_RING(offset | obj_priv->tiling_mode);
pipesrc = I915_READ(pipesrc_reg);
OUT_RING(pipesrc & 0x0fff0fff);
- } else {
+ } else if (IS_GEN3(dev)) {
OUT_RING(MI_DISPLAY_FLIP_I915 |
MI_DISPLAY_FLIP_PLANE(intel_crtc->plane));
OUT_RING(fb->pitch);
OUT_RING(offset);
+ OUT_RING(MI_NOOP);
+ } else {
+ OUT_RING(MI_DISPLAY_FLIP |
+ MI_DISPLAY_FLIP_PLANE(intel_crtc->plane));
+ OUT_RING(fb->pitch);
+ OUT_RING(offset);
OUT_RING(MI_NOOP);
}
ADVANCE_LP_RING();
^ permalink raw reply [flat|nested] 115+ messages in thread
* [046/114] drm/i915: i8xx also doesnt like multiple oustanding pageflips
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (44 preceding siblings ...)
2010-08-24 22:44 ` [045/114] drm/i915: fixup pageflip ringbuffer commands for i8xx Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [047/114] drm/i915/edp: Flush the write before waiting for PLLs Greg KH
` (67 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel Vetter, Eric Anholt
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Vetter <daniel.vetter@ffwll.ch>
commit 6146b3d61925116e3fecce36c2fd873665bd6614 upstream.
My i855GM suffers from a 80k/s interrupt storm without this.
So add 2nd gen to the list of things that don't like more than
one outstanding pageflip request.
Furthermore I've changed the busy loop into a ringbuffer wait.
Busy-loops that don't check whether the chip died are simply evil.
And performance should actually improve, because there's usually
a decent amount of rendering queued on the gpu, hopefully rendering
that MI_WAIT into a noop by the time it's executed.
The current code holds dev->struct_mutex while executing this loop,
hence stalling all other gem activity anyway.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
[anholt: resolved against conflict]
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/intel_display.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -4816,14 +4816,16 @@ static int intel_crtc_page_flip(struct d
work->pending_flip_obj = obj;
if (intel_crtc->plane)
- flip_mask = I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT;
+ flip_mask = MI_WAIT_FOR_PLANE_B_FLIP;
else
- flip_mask = I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT;
+ flip_mask = MI_WAIT_FOR_PLANE_A_FLIP;
- /* Wait for any previous flip to finish */
- if (IS_GEN3(dev))
- while (I915_READ(ISR) & flip_mask)
- ;
+ if (IS_GEN3(dev) || IS_GEN2(dev)) {
+ BEGIN_LP_RING(2);
+ OUT_RING(MI_WAIT_FOR_EVENT | flip_mask);
+ OUT_RING(0);
+ ADVANCE_LP_RING();
+ }
/* Offset into the new buffer for cases of shared fbs between CRTCs */
offset = obj_priv->gtt_offset;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [047/114] drm/i915/edp: Flush the write before waiting for PLLs
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (45 preceding siblings ...)
2010-08-24 22:44 ` [046/114] drm/i915: i8xx also doesnt like multiple oustanding pageflips Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [048/114] dm snapshot: iterate origin and cow devices Greg KH
` (66 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Chris Wilson, Eric Anholt
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Chris Wilson <chris@chris-wilson.co.uk>
commit 5ddb954b9ee50824977d2931e0ff58b3050b337d upstream.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/intel_display.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -1502,6 +1502,7 @@ static void ironlake_enable_pll_edp (str
dpa_ctl = I915_READ(DP_A);
dpa_ctl |= DP_PLL_ENABLE;
I915_WRITE(DP_A, dpa_ctl);
+ POSTING_READ(DP_A);
udelay(200);
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [048/114] dm snapshot: iterate origin and cow devices
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (46 preceding siblings ...)
2010-08-24 22:44 ` [047/114] drm/i915/edp: Flush the write before waiting for PLLs Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [049/114] dm snapshot: test chunk size against both origin and snapshot Greg KH
` (65 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mikulas Patocka,
Alasdair G Kergon
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mikulas Patocka <mpatocka@redhat.com>
commit 1e5554c8428bc7209a83e2d07ca724be4d981ce3 upstream.
Iterate both origin and snapshot devices
iterate_devices method should call the callback for all the devices where
the bio may be remapped. Thus, snapshot_iterate_devices should call the callback
for both snapshot and origin underlying devices because it remaps some bios
to the snapshot and some to the origin.
snapshot_iterate_devices called the callback only for the origin device.
This led to badly calculated device limits if snapshot and origin were placed
on different types of disks.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/md/dm-snap.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -1899,8 +1899,14 @@ static int snapshot_iterate_devices(stru
iterate_devices_callout_fn fn, void *data)
{
struct dm_snapshot *snap = ti->private;
+ int r;
- return fn(ti, snap->origin, 0, ti->len, data);
+ r = fn(ti, snap->origin, 0, ti->len, data);
+
+ if (!r)
+ r = fn(ti, snap->cow, 0, get_dev_size(snap->cow->bdev), data);
+
+ return r;
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [049/114] dm snapshot: test chunk size against both origin and snapshot
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (47 preceding siblings ...)
2010-08-24 22:44 ` [048/114] dm snapshot: iterate origin and cow devices Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [050/114] dm: prevent access to md being deleted Greg KH
` (64 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mikulas Patocka,
Alasdair G Kergon
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mikulas Patocka <mpatocka@redhat.com>
commit c24110450650f17f7d3ba4fbe01f01ac5a115456 upstream.
Validate chunk size against both origin and snapshot sector size
Don't allow chunk size smaller than either origin or snapshot logical
sector size. Reading or writing data not aligned to sector size is not
allowed and causes immediate errors.
This requires us to open the origin before initialising the
exception store and to export dm_snap_origin.
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/md/dm-exception-store.c | 4 +++-
drivers/md/dm-exception-store.h | 3 ++-
drivers/md/dm-snap.c | 36 +++++++++++++++++++++---------------
3 files changed, 26 insertions(+), 17 deletions(-)
--- a/drivers/md/dm-exception-store.c
+++ b/drivers/md/dm-exception-store.c
@@ -173,7 +173,9 @@ int dm_exception_store_set_chunk_size(st
/* Validate the chunk size against the device block size */
if (chunk_size %
- (bdev_logical_block_size(dm_snap_cow(store->snap)->bdev) >> 9)) {
+ (bdev_logical_block_size(dm_snap_cow(store->snap)->bdev) >> 9) ||
+ chunk_size %
+ (bdev_logical_block_size(dm_snap_origin(store->snap)->bdev) >> 9)) {
*error = "Chunk size is not a multiple of device blocksize";
return -EINVAL;
}
--- a/drivers/md/dm-exception-store.h
+++ b/drivers/md/dm-exception-store.h
@@ -126,8 +126,9 @@ struct dm_exception_store {
};
/*
- * Obtain the cow device used by a given snapshot.
+ * Obtain the origin or cow device used by a given snapshot.
*/
+struct dm_dev *dm_snap_origin(struct dm_snapshot *snap);
struct dm_dev *dm_snap_cow(struct dm_snapshot *snap);
/*
--- a/drivers/md/dm-snap.c
+++ b/drivers/md/dm-snap.c
@@ -148,6 +148,12 @@ struct dm_snapshot {
#define RUNNING_MERGE 0
#define SHUTDOWN_MERGE 1
+struct dm_dev *dm_snap_origin(struct dm_snapshot *s)
+{
+ return s->origin;
+}
+EXPORT_SYMBOL(dm_snap_origin);
+
struct dm_dev *dm_snap_cow(struct dm_snapshot *s)
{
return s->cow;
@@ -1065,10 +1071,6 @@ static int snapshot_ctr(struct dm_target
origin_mode = FMODE_WRITE;
}
- origin_path = argv[0];
- argv++;
- argc--;
-
s = kmalloc(sizeof(*s), GFP_KERNEL);
if (!s) {
ti->error = "Cannot allocate snapshot context private "
@@ -1077,6 +1079,16 @@ static int snapshot_ctr(struct dm_target
goto bad;
}
+ origin_path = argv[0];
+ argv++;
+ argc--;
+
+ r = dm_get_device(ti, origin_path, origin_mode, &s->origin);
+ if (r) {
+ ti->error = "Cannot get origin device";
+ goto bad_origin;
+ }
+
cow_path = argv[0];
argv++;
argc--;
@@ -1097,12 +1109,6 @@ static int snapshot_ctr(struct dm_target
argv += args_used;
argc -= args_used;
- r = dm_get_device(ti, origin_path, origin_mode, &s->origin);
- if (r) {
- ti->error = "Cannot get origin device";
- goto bad_origin;
- }
-
s->ti = ti;
s->valid = 1;
s->active = 0;
@@ -1212,15 +1218,15 @@ bad_kcopyd:
dm_exception_table_exit(&s->complete, exception_cache);
bad_hash_tables:
- dm_put_device(ti, s->origin);
-
-bad_origin:
dm_exception_store_destroy(s->store);
bad_store:
dm_put_device(ti, s->cow);
bad_cow:
+ dm_put_device(ti, s->origin);
+
+bad_origin:
kfree(s);
bad:
@@ -1314,12 +1320,12 @@ static void snapshot_dtr(struct dm_targe
mempool_destroy(s->pending_pool);
- dm_put_device(ti, s->origin);
-
dm_exception_store_destroy(s->store);
dm_put_device(ti, s->cow);
+ dm_put_device(ti, s->origin);
+
kfree(s);
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [050/114] dm: prevent access to md being deleted
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (48 preceding siblings ...)
2010-08-24 22:44 ` [049/114] dm snapshot: test chunk size against both origin and snapshot Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [051/114] dm ioctl: release _hash_lock between devices in remove_all Greg KH
` (63 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Kiyoshi Ueda, Junichi Nomura,
Alasdair G Kergon
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
commit abdc568b0540bec6d3e0afebac496adef1189b77 upstream.
This patch prevents access to mapped_device which is being deleted.
Currently, even after a mapped_device has been removed from the hash,
it could be accessed through idr_find() using minor number.
That could cause a race and NULL pointer reference below:
CPU0 CPU1
------------------------------------------------------------------
dev_remove(param)
down_write(_hash_lock)
dm_lock_for_deletion(md)
spin_lock(_minor_lock)
set_bit(DMF_DELETING)
spin_unlock(_minor_lock)
__hash_remove(hc)
up_write(_hash_lock)
dev_status(param)
md = find_device(param)
down_read(_hash_lock)
__find_device_hash_cell(param)
dm_get_md(param->dev)
md = dm_find_md(dev)
spin_lock(_minor_lock)
md = idr_find(MINOR(dev))
spin_unlock(_minor_lock)
dm_put(md)
free_dev(md)
dm_get(md)
up_read(_hash_lock)
__dev_status(md, param)
dm_put(md)
This patch fixes such problems.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/md/dm.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -2141,6 +2141,7 @@ static struct mapped_device *dm_find_md(
md = idr_find(&_minor_idr, minor);
if (md && (md == MINOR_ALLOCED ||
(MINOR(disk_devt(dm_disk(md))) != minor) ||
+ dm_deleting_md(md) ||
test_bit(DMF_FREEING, &md->flags))) {
md = NULL;
goto out;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [051/114] dm ioctl: release _hash_lock between devices in remove_all
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (49 preceding siblings ...)
2010-08-24 22:44 ` [050/114] dm: prevent access to md being deleted Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [052/114] mm: make the vma list be doubly linked Greg KH
` (62 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Kiyoshi Ueda, Junichi Nomura,
Alasdair G Kergon
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
commit 98f332855effef02aeb738e4d62e9a5b903c52fd upstream.
This patch changes dm_hash_remove_all() to release _hash_lock when
removing a device. After removing the device, dm_hash_remove_all()
takes _hash_lock and searches the hash from scratch again.
This patch is a preparation for the next patch, which changes device
deletion code to wait for md reference to be 0. Without this patch,
the wait in the next patch may cause AB-BA deadlock:
CPU0 CPU1
-----------------------------------------------------------------------
dm_hash_remove_all()
down_write(_hash_lock)
table_status()
md = find_device()
dm_get(md)
<increment md->holders>
dm_get_live_or_inactive_table()
dm_get_inactive_table()
down_write(_hash_lock)
<in the md deletion code>
<wait for md->holders to be 0>
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/md/dm-ioctl.c | 44 +++++++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 19 deletions(-)
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -249,40 +249,46 @@ static void __hash_remove(struct hash_ce
static void dm_hash_remove_all(int keep_open_devices)
{
- int i, dev_skipped, dev_removed;
+ int i, dev_skipped;
struct hash_cell *hc;
- struct list_head *tmp, *n;
+ struct mapped_device *md;
+
+retry:
+ dev_skipped = 0;
down_write(&_hash_lock);
-retry:
- dev_skipped = dev_removed = 0;
for (i = 0; i < NUM_BUCKETS; i++) {
- list_for_each_safe (tmp, n, _name_buckets + i) {
- hc = list_entry(tmp, struct hash_cell, name_list);
+ list_for_each_entry(hc, _name_buckets + i, name_list) {
+ md = hc->md;
+ dm_get(md);
- if (keep_open_devices &&
- dm_lock_for_deletion(hc->md)) {
+ if (keep_open_devices && dm_lock_for_deletion(md)) {
+ dm_put(md);
dev_skipped++;
continue;
}
+
__hash_remove(hc);
- dev_removed = 1;
- }
- }
- /*
- * Some mapped devices may be using other mapped devices, so if any
- * still exist, repeat until we make no further progress.
- */
- if (dev_skipped) {
- if (dev_removed)
- goto retry;
+ up_write(&_hash_lock);
- DMWARN("remove_all left %d open device(s)", dev_skipped);
+ dm_put(md);
+
+ /*
+ * Some mapped devices may be using other mapped
+ * devices, so repeat until we make no further
+ * progress. If a new mapped device is created
+ * here it will also get removed.
+ */
+ goto retry;
+ }
}
up_write(&_hash_lock);
+
+ if (dev_skipped)
+ DMWARN("remove_all left %d open device(s)", dev_skipped);
}
static int dm_hash_rename(uint32_t cookie, uint32_t *flags, const char *old,
^ permalink raw reply [flat|nested] 115+ messages in thread
* [052/114] mm: make the vma list be doubly linked
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (50 preceding siblings ...)
2010-08-24 22:44 ` [051/114] dm ioctl: release _hash_lock between devices in remove_all Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [053/114] mm: make the mlock() stack guard page checks stricter Greg KH
` (61 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 297c5eee372478fc32fec5fe8eed711eedb13f3d upstream.
It's a really simple list, and several of the users want to go backwards
in it to find the previous vma. So rather than have to look up the
previous entry with 'find_vma_prev()' or something similar, just make it
doubly linked instead.
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/mm_types.h | 2 +-
kernel/fork.c | 7 +++++--
mm/mmap.c | 21 +++++++++++++++++----
mm/nommu.c | 7 +++++--
4 files changed, 28 insertions(+), 9 deletions(-)
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -134,7 +134,7 @@ struct vm_area_struct {
within vm_mm. */
/* linked list of VM areas per task, sorted by address */
- struct vm_area_struct *vm_next;
+ struct vm_area_struct *vm_next, *vm_prev;
pgprot_t vm_page_prot; /* Access permissions of this VMA. */
unsigned long vm_flags; /* Flags, see mm.h. */
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -300,7 +300,7 @@ out:
#ifdef CONFIG_MMU
static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
{
- struct vm_area_struct *mpnt, *tmp, **pprev;
+ struct vm_area_struct *mpnt, *tmp, *prev, **pprev;
struct rb_node **rb_link, *rb_parent;
int retval;
unsigned long charge;
@@ -328,6 +328,7 @@ static int dup_mmap(struct mm_struct *mm
if (retval)
goto out;
+ prev = NULL;
for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
struct file *file;
@@ -359,7 +360,7 @@ static int dup_mmap(struct mm_struct *mm
goto fail_nomem_anon_vma_fork;
tmp->vm_flags &= ~VM_LOCKED;
tmp->vm_mm = mm;
- tmp->vm_next = NULL;
+ tmp->vm_next = tmp->vm_prev = NULL;
file = tmp->vm_file;
if (file) {
struct inode *inode = file->f_path.dentry->d_inode;
@@ -392,6 +393,8 @@ static int dup_mmap(struct mm_struct *mm
*/
*pprev = tmp;
pprev = &tmp->vm_next;
+ tmp->vm_prev = prev;
+ prev = tmp;
__vma_link_rb(mm, tmp, rb_link, rb_parent);
rb_link = &tmp->vm_rb.rb_right;
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -388,17 +388,23 @@ static inline void
__vma_link_list(struct mm_struct *mm, struct vm_area_struct *vma,
struct vm_area_struct *prev, struct rb_node *rb_parent)
{
+ struct vm_area_struct *next;
+
+ vma->vm_prev = prev;
if (prev) {
- vma->vm_next = prev->vm_next;
+ next = prev->vm_next;
prev->vm_next = vma;
} else {
mm->mmap = vma;
if (rb_parent)
- vma->vm_next = rb_entry(rb_parent,
+ next = rb_entry(rb_parent,
struct vm_area_struct, vm_rb);
else
- vma->vm_next = NULL;
+ next = NULL;
}
+ vma->vm_next = next;
+ if (next)
+ next->vm_prev = vma;
}
void __vma_link_rb(struct mm_struct *mm, struct vm_area_struct *vma,
@@ -485,7 +491,11 @@ static inline void
__vma_unlink(struct mm_struct *mm, struct vm_area_struct *vma,
struct vm_area_struct *prev)
{
- prev->vm_next = vma->vm_next;
+ struct vm_area_struct *next = vma->vm_next;
+
+ prev->vm_next = next;
+ if (next)
+ next->vm_prev = prev;
rb_erase(&vma->vm_rb, &mm->mm_rb);
if (mm->mmap_cache == vma)
mm->mmap_cache = prev;
@@ -1900,6 +1910,7 @@ detach_vmas_to_be_unmapped(struct mm_str
unsigned long addr;
insertion_point = (prev ? &prev->vm_next : &mm->mmap);
+ vma->vm_prev = NULL;
do {
rb_erase(&vma->vm_rb, &mm->mm_rb);
mm->map_count--;
@@ -1907,6 +1918,8 @@ detach_vmas_to_be_unmapped(struct mm_str
vma = vma->vm_next;
} while (vma && vma->vm_start < end);
*insertion_point = vma;
+ if (vma)
+ vma->vm_prev = prev;
tail_vma->vm_next = NULL;
if (mm->unmap_area == arch_unmap_area)
addr = prev ? prev->vm_end : mm->mmap_base;
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -609,7 +609,7 @@ static void protect_vma(struct vm_area_s
*/
static void add_vma_to_mm(struct mm_struct *mm, struct vm_area_struct *vma)
{
- struct vm_area_struct *pvma, **pp;
+ struct vm_area_struct *pvma, **pp, *next;
struct address_space *mapping;
struct rb_node **p, *parent;
@@ -669,8 +669,11 @@ static void add_vma_to_mm(struct mm_stru
break;
}
- vma->vm_next = *pp;
+ next = *pp;
*pp = vma;
+ vma->vm_next = next;
+ if (next)
+ next->vm_prev = vma;
}
/*
^ permalink raw reply [flat|nested] 115+ messages in thread
* [053/114] mm: make the mlock() stack guard page checks stricter
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (51 preceding siblings ...)
2010-08-24 22:44 ` [052/114] mm: make the vma list be doubly linked Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:44 ` [054/114] mm: make stack guard page logic use vm_prev pointer Greg KH
` (60 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 7798330ac8114c731cfab83e634c6ecedaa233d7 upstream.
If we've split the stack vma, only the lowest one has the guard page.
Now that we have a doubly linked list of vma's, checking this is trivial.
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/mlock.c | 21 ++++++++++++++++-----
1 file changed, 16 insertions(+), 5 deletions(-)
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -135,6 +135,19 @@ void munlock_vma_page(struct page *page)
}
}
+/* Is the vma a continuation of the stack vma above it? */
+static inline int vma_stack_continue(struct vm_area_struct *vma, unsigned long addr)
+{
+ return vma && (vma->vm_end == addr) && (vma->vm_flags & VM_GROWSDOWN);
+}
+
+static inline int stack_guard_page(struct vm_area_struct *vma, unsigned long addr)
+{
+ return (vma->vm_flags & VM_GROWSDOWN) &&
+ (vma->vm_start == addr) &&
+ !vma_stack_continue(vma->vm_prev, addr);
+}
+
/**
* __mlock_vma_pages_range() - mlock a range of pages in the vma.
* @vma: target vma
@@ -168,11 +181,9 @@ static long __mlock_vma_pages_range(stru
gup_flags |= FOLL_WRITE;
/* We don't try to access the guard page of a stack vma */
- if (vma->vm_flags & VM_GROWSDOWN) {
- if (start == vma->vm_start) {
- start += PAGE_SIZE;
- nr_pages--;
- }
+ if (stack_guard_page(vma, start)) {
+ addr += PAGE_SIZE;
+ nr_pages--;
}
while (nr_pages > 0) {
^ permalink raw reply [flat|nested] 115+ messages in thread
* [054/114] mm: make stack guard page logic use vm_prev pointer
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (52 preceding siblings ...)
2010-08-24 22:44 ` [053/114] mm: make the mlock() stack guard page checks stricter Greg KH
@ 2010-08-24 22:44 ` Greg KH
2010-08-24 22:45 ` [055/114] x86, asm: Clean up and simplify set_64bit() Greg KH
` (59 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:44 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 0e8e50e20c837eeec8323bba7dcd25fe5479194c upstream.
Like the mlock() change previously, this makes the stack guard check
code use vma->vm_prev to see what the mapping below the current stack
is, rather than have to look it up with find_vma().
Also, accept an abutting stack segment, since that happens naturally if
you split the stack with mlock or mprotect.
Tested-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/memory.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2770,11 +2770,18 @@ static inline int check_stack_guard_page
{
address &= PAGE_MASK;
if ((vma->vm_flags & VM_GROWSDOWN) && address == vma->vm_start) {
- address -= PAGE_SIZE;
- if (find_vma(vma->vm_mm, address) != vma)
- return -ENOMEM;
+ struct vm_area_struct *prev = vma->vm_prev;
- expand_stack(vma, address);
+ /*
+ * Is there a mapping abutting this one below?
+ *
+ * That's only ok if it's the same stack mapping
+ * that has gotten split..
+ */
+ if (prev && prev->vm_end == address)
+ return prev->vm_flags & VM_GROWSDOWN ? 0 : -ENOMEM;
+
+ expand_stack(vma, address - PAGE_SIZE);
}
return 0;
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [055/114] x86, asm: Clean up and simplify set_64bit()
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (53 preceding siblings ...)
2010-08-24 22:44 ` [054/114] mm: make stack guard page logic use vm_prev pointer Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [056/114] slab: fix object alignment Greg KH
` (58 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, H. Peter Anvin
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: H. Peter Anvin <hpa@zytor.com>
commit 69309a05907546fb686b251d4ab041c26afe1e1d upstream.
Clean up and simplify set_64bit(). This code is quite old (1.3.11)
and contains a fair bit of auxilliary machinery that current versions
of gcc handle just fine automatically. Worse, the auxilliary
machinery can actually cause an unnecessary spill to memory.
Furthermore, the loading of the old value inside the loop in the
32-bit case is unnecessary: if the value doesn't match, the CMPXCHG8B
instruction will already have loaded the "new previous" value for us.
Clean up the comment, too, and remove page references to obsolete
versions of the Intel SDM.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
LKML-Reference: <tip-*@vger.kernel.org>
Tested-by: Mark Stanovich <mrktimber@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/include/asm/cmpxchg_32.h | 67 +++++++++++---------------------------
arch/x86/include/asm/cmpxchg_64.h | 4 --
2 files changed, 21 insertions(+), 50 deletions(-)
--- a/arch/x86/include/asm/cmpxchg_32.h
+++ b/arch/x86/include/asm/cmpxchg_32.h
@@ -53,60 +53,33 @@ struct __xchg_dummy {
__xchg((v), (ptr), sizeof(*ptr))
/*
- * The semantics of XCHGCMP8B are a bit strange, this is why
- * there is a loop and the loading of %%eax and %%edx has to
- * be inside. This inlines well in most cases, the cached
- * cost is around ~38 cycles. (in the future we might want
- * to do an SIMD/3DNOW!/MMX/FPU 64-bit store here, but that
- * might have an implicit FPU-save as a cost, so it's not
- * clear which path to go.)
+ * CMPXCHG8B only writes to the target if we had the previous
+ * value in registers, otherwise it acts as a read and gives us the
+ * "new previous" value. That is why there is a loop. Preloading
+ * EDX:EAX is a performance optimization: in the common case it means
+ * we need only one locked operation.
*
- * cmpxchg8b must be used with the lock prefix here to allow
- * the instruction to be executed atomically, see page 3-102
- * of the instruction set reference 24319102.pdf. We need
- * the reader side to see the coherent 64bit value.
+ * A SIMD/3DNOW!/MMX/FPU 64-bit store here would require at the very
+ * least an FPU save and/or %cr0.ts manipulation.
+ *
+ * cmpxchg8b must be used with the lock prefix here to allow the
+ * instruction to be executed atomically. We need to have the reader
+ * side to see the coherent 64bit value.
*/
-static inline void __set_64bit(unsigned long long *ptr,
- unsigned int low, unsigned int high)
+static inline void set_64bit(volatile u64 *ptr, u64 value)
{
+ u32 low = value;
+ u32 high = value >> 32;
+ u64 prev = *ptr;
+
asm volatile("\n1:\t"
- "movl (%1), %%eax\n\t"
- "movl 4(%1), %%edx\n\t"
- LOCK_PREFIX "cmpxchg8b (%1)\n\t"
+ LOCK_PREFIX "cmpxchg8b %0\n\t"
"jnz 1b"
- : "=m" (*ptr)
- : "D" (ptr),
- "b" (low),
- "c" (high)
- : "ax", "dx", "memory");
-}
-
-static inline void __set_64bit_constant(unsigned long long *ptr,
- unsigned long long value)
-{
- __set_64bit(ptr, (unsigned int)value, (unsigned int)(value >> 32));
+ : "=m" (*ptr), "+A" (prev)
+ : "b" (low), "c" (high)
+ : "memory");
}
-#define ll_low(x) *(((unsigned int *)&(x)) + 0)
-#define ll_high(x) *(((unsigned int *)&(x)) + 1)
-
-static inline void __set_64bit_var(unsigned long long *ptr,
- unsigned long long value)
-{
- __set_64bit(ptr, ll_low(value), ll_high(value));
-}
-
-#define set_64bit(ptr, value) \
- (__builtin_constant_p((value)) \
- ? __set_64bit_constant((ptr), (value)) \
- : __set_64bit_var((ptr), (value)))
-
-#define _set_64bit(ptr, value) \
- (__builtin_constant_p(value) \
- ? __set_64bit(ptr, (unsigned int)(value), \
- (unsigned int)((value) >> 32)) \
- : __set_64bit(ptr, ll_low((value)), ll_high((value))))
-
extern void __cmpxchg_wrong_size(void);
/*
--- a/arch/x86/include/asm/cmpxchg_64.h
+++ b/arch/x86/include/asm/cmpxchg_64.h
@@ -5,13 +5,11 @@
#define __xg(x) ((volatile long *)(x))
-static inline void set_64bit(volatile unsigned long *ptr, unsigned long val)
+static inline void set_64bit(volatile u64 *ptr, u64 val)
{
*ptr = val;
}
-#define _set_64bit set_64bit
-
extern void __xchg_wrong_size(void);
extern void __cmpxchg_wrong_size(void);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [056/114] slab: fix object alignment
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (54 preceding siblings ...)
2010-08-24 22:45 ` [055/114] x86, asm: Clean up and simplify set_64bit() Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [057/114] sparc64: Add missing ID to parport probing code Greg KH
` (57 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Christoph Lameter,
Carsten Otte, Pekka Enberg
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Carsten Otte <cotte@de.ibm.com>
commit 1ab335d8f85792e3b107ff8237d53cf64db714df upstream.
This patch fixes alignment of slab objects in case CONFIG_DEBUG_PAGEALLOC is
active.
Before this spot in kmem_cache_create, we have this situation:
- align contains the required alignment of the object
- cachep->obj_offset is 0 or equals align in case of CONFIG_DEBUG_SLAB
- size equals the size of the object, or object plus trailing redzone in case
of CONFIG_DEBUG_SLAB
This spot tries to fill one page per object if the object is in certain size
limits, however setting obj_offset to PAGE_SIZE - size does break the object
alignment since size may not be aligned with the required alignment.
This patch simply adds an ALIGN(size, align) to the equation and fixes the
object size detection accordingly.
This code in drivers/s390/cio/qdio_setup_init has lead to incorrectly aligned
slab objects (sizeof(struct qdio_q) equals 1792):
qdio_q_cache = kmem_cache_create("qdio_q", sizeof(struct qdio_q),
256, 0, NULL);
Acked-by: Christoph Lameter <cl@linux.com>
Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/slab.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -2331,8 +2331,8 @@ kmem_cache_create (const char *name, siz
}
#if FORCED_DEBUG && defined(CONFIG_DEBUG_PAGEALLOC)
if (size >= malloc_sizes[INDEX_L3 + 1].cs_size
- && cachep->obj_size > cache_line_size() && size < PAGE_SIZE) {
- cachep->obj_offset += PAGE_SIZE - size;
+ && cachep->obj_size > cache_line_size() && ALIGN(size, align) < PAGE_SIZE) {
+ cachep->obj_offset += PAGE_SIZE - ALIGN(size, align);
size = PAGE_SIZE;
}
#endif
^ permalink raw reply [flat|nested] 115+ messages in thread
* [057/114] sparc64: Add missing ID to parport probing code.
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (55 preceding siblings ...)
2010-08-24 22:45 ` [056/114] slab: fix object alignment Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [058/114] sparc64: Fix rwsem constant bug leading to hangs Greg KH
` (56 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commit bf8253bf5e7cfe17dd53e3f6340a45b11d9fb51c ]
SunBlade-2500 has 'parallel' device node with compatible
property "pnpALI,1533,3" so add that to the ID table.
Reported-by: Mikael Pettersson <mikpe@it.uu.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sparc/include/asm/parport.h | 4 ++++
1 file changed, 4 insertions(+)
--- a/arch/sparc/include/asm/parport.h
+++ b/arch/sparc/include/asm/parport.h
@@ -228,6 +228,10 @@ static const struct of_device_id ecpp_ma
.name = "parallel",
.compatible = "ns87317-ecpp",
},
+ {
+ .name = "parallel",
+ .compatible = "pnpALI,1533,3",
+ },
{},
};
^ permalink raw reply [flat|nested] 115+ messages in thread
* [058/114] sparc64: Fix rwsem constant bug leading to hangs.
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (56 preceding siblings ...)
2010-08-24 22:45 ` [057/114] sparc64: Add missing ID to parport probing code Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [059/114] sparc64: Fix atomic64_t routine return values Greg KH
` (55 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commit ef201bebe5afc91a2b99b45dacc8c6dd88ca9e58 ]
As noticed by Linus, it is critical that some of the
rwsem constants be signed. Yet, hex constants are
unsigned unless explicitly casted or negated.
The most critical one is RWSEM_WAITING_BIAS.
This bug was exacerbated by commit
424acaaeb3a3932d64a9b4bd59df6cf72c22d8f3 ("rwsem: wake queued readers
when writer blocks on active read lock")
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sparc/include/asm/rwsem-const.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/sparc/include/asm/rwsem-const.h
+++ b/arch/sparc/include/asm/rwsem-const.h
@@ -5,7 +5,7 @@
#define RWSEM_UNLOCKED_VALUE 0x00000000
#define RWSEM_ACTIVE_BIAS 0x00000001
#define RWSEM_ACTIVE_MASK 0x0000ffff
-#define RWSEM_WAITING_BIAS 0xffff0000
+#define RWSEM_WAITING_BIAS (-0x00010000)
#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
^ permalink raw reply [flat|nested] 115+ messages in thread
* [059/114] sparc64: Fix atomic64_t routine return values.
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (57 preceding siblings ...)
2010-08-24 22:45 ` [058/114] sparc64: Fix rwsem constant bug leading to hangs Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [060/114] sparc: Really fix "console=" for serial consoles Greg KH
` (54 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commits 86fa04b8742ac681d470786f55e2403ada0075b2
and b10f997bb0f4e5b34d447f498fb85834a40d3acb ]
Should return 'long' instead of 'int'.
Thanks to Dimitris Michailidis and Tony Luck.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sparc/include/asm/atomic_64.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/arch/sparc/include/asm/atomic_64.h
+++ b/arch/sparc/include/asm/atomic_64.h
@@ -20,14 +20,14 @@
#define atomic64_set(v, i) (((v)->counter) = i)
extern void atomic_add(int, atomic_t *);
-extern void atomic64_add(int, atomic64_t *);
+extern void atomic64_add(long, atomic64_t *);
extern void atomic_sub(int, atomic_t *);
-extern void atomic64_sub(int, atomic64_t *);
+extern void atomic64_sub(long, atomic64_t *);
extern int atomic_add_ret(int, atomic_t *);
-extern int atomic64_add_ret(int, atomic64_t *);
+extern long atomic64_add_ret(long, atomic64_t *);
extern int atomic_sub_ret(int, atomic_t *);
-extern int atomic64_sub_ret(int, atomic64_t *);
+extern long atomic64_sub_ret(long, atomic64_t *);
#define atomic_dec_return(v) atomic_sub_ret(1, v)
#define atomic64_dec_return(v) atomic64_sub_ret(1, v)
@@ -91,7 +91,7 @@ static inline int atomic_add_unless(atom
((__typeof__((v)->counter))cmpxchg(&((v)->counter), (o), (n)))
#define atomic64_xchg(v, new) (xchg(&((v)->counter), new))
-static inline int atomic64_add_unless(atomic64_t *v, long a, long u)
+static inline long atomic64_add_unless(atomic64_t *v, long a, long u)
{
long c, old;
c = atomic64_read(v);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [060/114] sparc: Really fix "console=" for serial consoles.
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (58 preceding siblings ...)
2010-08-24 22:45 ` [059/114] sparc64: Fix atomic64_t routine return values Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [061/114] bridge: add rcu_read_lock on transmit Greg KH
` (53 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commit 0a492896ac07336c98f37ad7fab4a6387b6ada78 ]
If a video head and keyboard are hooked up, specifying "console=ttyS0"
or similar to use a serial console will not work properly.
The key issue is that we must register all serial console capable
devices with register_console(), otherwise the command line specified
device won't be found. The sun serial drivers would only register
themselves as console devices if the OpenFirmware specified console
device node matched. To fix this part we now unconditionally get
the serial console register by setting serial_drv->cons always.
Secondarily we must not add_preferred_console() using the firmware
provided console setting if the user gaven an override on the kernel
command line using "console=" The "primary framebuffer" matching
logic was always triggering o n openfirmware device node match, make
it not when a command line override was given.
Reported-by: Frans Pop <elendil@planet.nl>
Tested-by: Frans Pop <elendil@planet.nl>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sparc/include/asm/fb.h | 4 ++++
drivers/serial/suncore.c | 15 +++++++++------
2 files changed, 13 insertions(+), 6 deletions(-)
--- a/arch/sparc/include/asm/fb.h
+++ b/arch/sparc/include/asm/fb.h
@@ -1,5 +1,6 @@
#ifndef _SPARC_FB_H_
#define _SPARC_FB_H_
+#include <linux/console.h>
#include <linux/fb.h>
#include <linux/fs.h>
#include <asm/page.h>
@@ -18,6 +19,9 @@ static inline int fb_is_primary_device(s
struct device *dev = info->device;
struct device_node *node;
+ if (console_set_on_cmdline)
+ return 0;
+
node = dev->of_node;
if (node &&
node == of_console_device)
--- a/drivers/serial/suncore.c
+++ b/drivers/serial/suncore.c
@@ -55,7 +55,12 @@ EXPORT_SYMBOL(sunserial_unregister_minor
int sunserial_console_match(struct console *con, struct device_node *dp,
struct uart_driver *drv, int line, bool ignore_line)
{
- if (!con || of_console_device != dp)
+ if (!con)
+ return 0;
+
+ drv->cons = con;
+
+ if (of_console_device != dp)
return 0;
if (!ignore_line) {
@@ -69,12 +74,10 @@ int sunserial_console_match(struct conso
return 0;
}
- con->index = line;
- drv->cons = con;
-
- if (!console_set_on_cmdline)
+ if (!console_set_on_cmdline) {
+ con->index = line;
add_preferred_console(con->name, line, NULL);
-
+ }
return 1;
}
EXPORT_SYMBOL(sunserial_console_match);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [061/114] bridge: add rcu_read_lock on transmit
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (59 preceding siblings ...)
2010-08-24 22:45 ` [060/114] sparc: Really fix "console=" for serial consoles Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [062/114] tcp: cookie transactions setsockopt memory leak Greg KH
` (52 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Stephen Hemminger,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stephen Hemminger <shemminger@vyatta.com>
[ Upstream commit eeaf61d8891f9c9ed12c1a667e72bf83f0857954 ]
Long ago, when bridge was converted to RCU, rcu lock was equivalent
to having preempt disabled. RCU has changed a lot since then and
bridge code was still assuming the since transmit was called with
bottom half disabled, it was RCU safe.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/bridge/br_device.c | 4 +++-
net/bridge/br_fdb.c | 2 +-
net/bridge/br_input.c | 6 +++---
net/bridge/br_stp_bpdu.c | 2 +-
4 files changed, 8 insertions(+), 6 deletions(-)
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -22,7 +22,7 @@
#include <asm/uaccess.h>
#include "br_private.h"
-/* net device transmit always called with no BH (preempt_disabled) */
+/* net device transmit always called with BH disabled */
netdev_tx_t br_dev_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct net_bridge *br = netdev_priv(dev);
@@ -46,6 +46,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *
skb_reset_mac_header(skb);
skb_pull(skb, ETH_HLEN);
+ rcu_read_lock();
if (is_multicast_ether_addr(dest)) {
if (br_multicast_rcv(br, NULL, skb))
goto out;
@@ -61,6 +62,7 @@ netdev_tx_t br_dev_xmit(struct sk_buff *
br_flood_deliver(br, skb);
out:
+ rcu_read_unlock();
return NETDEV_TX_OK;
}
--- a/net/bridge/br_fdb.c
+++ b/net/bridge/br_fdb.c
@@ -214,7 +214,7 @@ void br_fdb_delete_by_port(struct net_br
spin_unlock_bh(&br->hash_lock);
}
-/* No locking or refcounting, assumes caller has no preempt (rcu_read_lock) */
+/* No locking or refcounting, assumes caller has rcu_read_lock */
struct net_bridge_fdb_entry *__br_fdb_get(struct net_bridge *br,
const unsigned char *addr)
{
--- a/net/bridge/br_input.c
+++ b/net/bridge/br_input.c
@@ -37,7 +37,7 @@ static int br_pass_frame_up(struct sk_bu
netif_receive_skb);
}
-/* note: already called with rcu_read_lock (preempt_disabled) */
+/* note: already called with rcu_read_lock */
int br_handle_frame_finish(struct sk_buff *skb)
{
const unsigned char *dest = eth_hdr(skb)->h_dest;
@@ -108,7 +108,7 @@ drop:
goto out;
}
-/* note: already called with rcu_read_lock (preempt_disabled) */
+/* note: already called with rcu_read_lock */
static int br_handle_local_finish(struct sk_buff *skb)
{
struct net_bridge_port *p = rcu_dereference(skb->dev->br_port);
@@ -133,7 +133,7 @@ static inline int is_link_local(const un
/*
* Called via br_handle_frame_hook.
* Return NULL if skb is handled
- * note: already called with rcu_read_lock (preempt_disabled)
+ * note: already called with rcu_read_lock
*/
struct sk_buff *br_handle_frame(struct net_bridge_port *p, struct sk_buff *skb)
{
--- a/net/bridge/br_stp_bpdu.c
+++ b/net/bridge/br_stp_bpdu.c
@@ -131,7 +131,7 @@ void br_send_tcn_bpdu(struct net_bridge_
/*
* Called from llc.
*
- * NO locks, but rcu_read_lock (preempt_disabled)
+ * NO locks, but rcu_read_lock
*/
void br_stp_rcv(const struct stp_proto *proto, struct sk_buff *skb,
struct net_device *dev)
^ permalink raw reply [flat|nested] 115+ messages in thread
* [062/114] tcp: cookie transactions setsockopt memory leak
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (60 preceding siblings ...)
2010-08-24 22:45 ` [061/114] bridge: add rcu_read_lock on transmit Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [063/114] bridge: Fix skb leak when multicast parsing fails on TX Greg KH
` (51 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dmitry Popov,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dmitry Popov <dp@highloadlab.com>
[ Upstream commit a3bdb549e30e7a263f7a589747c40e9c50110315 ]
There is a bug in do_tcp_setsockopt(net/ipv4/tcp.c),
TCP_COOKIE_TRANSACTIONS case.
In some cases (when tp->cookie_values == NULL) new tcp_cookie_values
structure can be allocated (at cvp), but not bound to
tp->cookie_values. So a memory leak occurs.
Signed-off-by: Dmitry Popov <dp@highloadlab.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv4/tcp.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2176,6 +2176,8 @@ static int do_tcp_setsockopt(struct sock
GFP_KERNEL);
if (cvp == NULL)
return -ENOMEM;
+
+ kref_init(&cvp->kref);
}
lock_sock(sk);
tp->rx_opt.cookie_in_always =
@@ -2190,12 +2192,11 @@ static int do_tcp_setsockopt(struct sock
*/
kref_put(&tp->cookie_values->kref,
tcp_cookie_values_release);
- kref_init(&cvp->kref);
- tp->cookie_values = cvp;
} else {
cvp = tp->cookie_values;
}
}
+
if (cvp != NULL) {
cvp->cookie_desired = ctd.tcpct_cookie_desired;
@@ -2209,6 +2210,8 @@ static int do_tcp_setsockopt(struct sock
cvp->s_data_desired = ctd.tcpct_s_data_desired;
cvp->s_data_constant = 0; /* false */
}
+
+ tp->cookie_values = cvp;
}
release_sock(sk);
return err;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [063/114] bridge: Fix skb leak when multicast parsing fails on TX
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (61 preceding siblings ...)
2010-08-24 22:45 ` [062/114] tcp: cookie transactions setsockopt memory leak Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [064/114] act_nat: the checksum of ICMP doesnt have pseudo header Greg KH
` (50 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Herbert Xu, David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Herbert Xu <herbert@gondor.apana.org.au>
[ Upstream commit 6d1d1d398cb7db7a12c5d652d50f85355345234f ]
On the bridge TX path we're leaking an skb when br_multicast_rcv
returns an error.
Reported-by: David Lamparter <equinox@diac24.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/bridge/br_device.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/bridge/br_device.c
+++ b/net/bridge/br_device.c
@@ -48,8 +48,10 @@ netdev_tx_t br_dev_xmit(struct sk_buff *
rcu_read_lock();
if (is_multicast_ether_addr(dest)) {
- if (br_multicast_rcv(br, NULL, skb))
+ if (br_multicast_rcv(br, NULL, skb)) {
+ kfree_skb(skb);
goto out;
+ }
mdst = br_mdb_get(br, skb);
if (mdst || BR_INPUT_SKB_CB_MROUTERS_ONLY(skb))
^ permalink raw reply [flat|nested] 115+ messages in thread
* [064/114] act_nat: the checksum of ICMP doesnt have pseudo header
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (62 preceding siblings ...)
2010-08-24 22:45 ` [063/114] bridge: Fix skb leak when multicast parsing fails on TX Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [065/114] can: add limit for nframes and clean up signed/unsigned variables Greg KH
` (49 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Changli Gao, Herbert Xu,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Changli Gao <xiaosuo@gmail.com>
[ Upstream commit 3a3dfb062c2e086c202d34f09ce29634515ad256 ]
after updating the value of the ICMP payload, inet_proto_csum_replace4() should
be called with zero pseudohdr.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sched/act_nat.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -246,7 +246,7 @@ static int tcf_nat(struct sk_buff *skb,
iph->saddr = new_addr;
inet_proto_csum_replace4(&icmph->checksum, skb, addr, new_addr,
- 1);
+ 0);
break;
}
default:
^ permalink raw reply [flat|nested] 115+ messages in thread
* [065/114] can: add limit for nframes and clean up signed/unsigned variables
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (63 preceding siblings ...)
2010-08-24 22:45 ` [064/114] act_nat: the checksum of ICMP doesnt have pseudo header Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [066/114] isdn: fix information leak Greg KH
` (48 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Oliver Hartkopp,
Urs Thuermann, David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Oliver Hartkopp <socketcan@hartkopp.net>
[ Upstream commit 5b75c4973ce779520b9d1e392483207d6f842cde ]
This patch adds a limit for nframes as the number of frames in TX_SETUP and
RX_SETUP are derived from a single byte multiplex value by default.
Use-cases that would require to send/filter more than 256 CAN frames should
be implemented in userspace for complexity reasons anyway.
Additionally the assignments of unsigned values from userspace to signed
values in kernelspace and vice versa are fixed by using unsigned values in
kernelspace consistently.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Reported-by: Ben Hawkes <hawkes@google.com>
Acked-by: Urs Thuermann <urs.thuermann@volkswagen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/can/bcm.c | 41 +++++++++++++++++++++++++++--------------
1 file changed, 27 insertions(+), 14 deletions(-)
--- a/net/can/bcm.c
+++ b/net/can/bcm.c
@@ -60,6 +60,13 @@
#include <net/sock.h>
#include <net/net_namespace.h>
+/*
+ * To send multiple CAN frame content within TX_SETUP or to filter
+ * CAN messages with multiplex index within RX_SETUP, the number of
+ * different filters is limited to 256 due to the one byte index value.
+ */
+#define MAX_NFRAMES 256
+
/* use of last_frames[index].can_dlc */
#define RX_RECV 0x40 /* received data for this element */
#define RX_THR 0x80 /* element not been sent due to throttle feature */
@@ -89,16 +96,16 @@ struct bcm_op {
struct list_head list;
int ifindex;
canid_t can_id;
- int flags;
+ u32 flags;
unsigned long frames_abs, frames_filtered;
struct timeval ival1, ival2;
struct hrtimer timer, thrtimer;
struct tasklet_struct tsklet, thrtsklet;
ktime_t rx_stamp, kt_ival1, kt_ival2, kt_lastmsg;
int rx_ifindex;
- int count;
- int nframes;
- int currframe;
+ u32 count;
+ u32 nframes;
+ u32 currframe;
struct can_frame *frames;
struct can_frame *last_frames;
struct can_frame sframe;
@@ -175,7 +182,7 @@ static int bcm_proc_show(struct seq_file
seq_printf(m, "rx_op: %03X %-5s ",
op->can_id, bcm_proc_getifname(ifname, op->ifindex));
- seq_printf(m, "[%d]%c ", op->nframes,
+ seq_printf(m, "[%u]%c ", op->nframes,
(op->flags & RX_CHECK_DLC)?'d':' ');
if (op->kt_ival1.tv64)
seq_printf(m, "timeo=%lld ",
@@ -198,7 +205,7 @@ static int bcm_proc_show(struct seq_file
list_for_each_entry(op, &bo->tx_ops, list) {
- seq_printf(m, "tx_op: %03X %s [%d] ",
+ seq_printf(m, "tx_op: %03X %s [%u] ",
op->can_id,
bcm_proc_getifname(ifname, op->ifindex),
op->nframes);
@@ -283,7 +290,7 @@ static void bcm_send_to_user(struct bcm_
struct can_frame *firstframe;
struct sockaddr_can *addr;
struct sock *sk = op->sk;
- int datalen = head->nframes * CFSIZ;
+ unsigned int datalen = head->nframes * CFSIZ;
int err;
skb = alloc_skb(sizeof(*head) + datalen, gfp_any());
@@ -468,7 +475,7 @@ rx_changed_settime:
* bcm_rx_cmp_to_index - (bit)compares the currently received data to formerly
* received data stored in op->last_frames[]
*/
-static void bcm_rx_cmp_to_index(struct bcm_op *op, int index,
+static void bcm_rx_cmp_to_index(struct bcm_op *op, unsigned int index,
const struct can_frame *rxdata)
{
/*
@@ -554,7 +561,8 @@ static enum hrtimer_restart bcm_rx_timeo
/*
* bcm_rx_do_flush - helper for bcm_rx_thr_flush
*/
-static inline int bcm_rx_do_flush(struct bcm_op *op, int update, int index)
+static inline int bcm_rx_do_flush(struct bcm_op *op, int update,
+ unsigned int index)
{
if ((op->last_frames) && (op->last_frames[index].can_dlc & RX_THR)) {
if (update)
@@ -575,7 +583,7 @@ static int bcm_rx_thr_flush(struct bcm_o
int updated = 0;
if (op->nframes > 1) {
- int i;
+ unsigned int i;
/* for MUX filter we start at index 1 */
for (i = 1; i < op->nframes; i++)
@@ -624,7 +632,7 @@ static void bcm_rx_handler(struct sk_buf
{
struct bcm_op *op = (struct bcm_op *)data;
const struct can_frame *rxframe = (struct can_frame *)skb->data;
- int i;
+ unsigned int i;
/* disable timeout */
hrtimer_cancel(&op->timer);
@@ -822,14 +830,15 @@ static int bcm_tx_setup(struct bcm_msg_h
{
struct bcm_sock *bo = bcm_sk(sk);
struct bcm_op *op;
- int i, err;
+ unsigned int i;
+ int err;
/* we need a real device to send frames */
if (!ifindex)
return -ENODEV;
- /* we need at least one can_frame */
- if (msg_head->nframes < 1)
+ /* check nframes boundaries - we need at least one can_frame */
+ if (msg_head->nframes < 1 || msg_head->nframes > MAX_NFRAMES)
return -EINVAL;
/* check the given can_id */
@@ -993,6 +1002,10 @@ static int bcm_rx_setup(struct bcm_msg_h
msg_head->nframes = 0;
}
+ /* the first element contains the mux-mask => MAX_NFRAMES + 1 */
+ if (msg_head->nframes > MAX_NFRAMES + 1)
+ return -EINVAL;
+
if ((msg_head->flags & RX_RTR_FRAME) &&
((msg_head->nframes != 1) ||
(!(msg_head->can_id & CAN_RTR_FLAG))))
^ permalink raw reply [flat|nested] 115+ messages in thread
* [066/114] isdn: fix information leak
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (64 preceding siblings ...)
2010-08-24 22:45 ` [065/114] can: add limit for nframes and clean up signed/unsigned variables Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [067/114] net: Fix napi_gro_frags vs netpoll path Greg KH
` (47 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dan Carpenter,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dan Carpenter <error27@gmail.com>
[ Upstream commit 4b030d4288a569d6bdeca884d7f102d951f097f2 ]
The main motivation of this patch changing strcpy() to strlcpy().
We strcpy() to copy a 48 byte buffers into a 49 byte buffers. So at
best the last byte has leaked information, or maybe there is an
overflow? Anyway, this patch closes the information leaks by zeroing
the memory and the calls to strlcpy() prevent overflows.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/isdn/sc/ioctl.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/isdn/sc/ioctl.c
+++ b/drivers/isdn/sc/ioctl.c
@@ -174,7 +174,7 @@ int sc_ioctl(int card, scs_ioctl *data)
pr_debug("%s: SCIOGETSPID: ioctl received\n",
sc_adapter[card]->devicename);
- spid = kmalloc(SCIOC_SPIDSIZE, GFP_KERNEL);
+ spid = kzalloc(SCIOC_SPIDSIZE, GFP_KERNEL);
if (!spid) {
kfree(rcvmsg);
return -ENOMEM;
@@ -194,7 +194,7 @@ int sc_ioctl(int card, scs_ioctl *data)
kfree(rcvmsg);
return status;
}
- strcpy(spid, rcvmsg->msg_data.byte_array);
+ strlcpy(spid, rcvmsg->msg_data.byte_array, SCIOC_SPIDSIZE);
/*
* Package the switch type and send to user space
@@ -272,12 +272,12 @@ int sc_ioctl(int card, scs_ioctl *data)
return status;
}
- dn = kmalloc(SCIOC_DNSIZE, GFP_KERNEL);
+ dn = kzalloc(SCIOC_DNSIZE, GFP_KERNEL);
if (!dn) {
kfree(rcvmsg);
return -ENOMEM;
}
- strcpy(dn, rcvmsg->msg_data.byte_array);
+ strlcpy(dn, rcvmsg->msg_data.byte_array, SCIOC_DNSIZE);
kfree(rcvmsg);
/*
@@ -348,7 +348,7 @@ int sc_ioctl(int card, scs_ioctl *data)
pr_debug("%s: SCIOSTAT: ioctl received\n",
sc_adapter[card]->devicename);
- bi = kmalloc (sizeof(boardInfo), GFP_KERNEL);
+ bi = kzalloc(sizeof(boardInfo), GFP_KERNEL);
if (!bi) {
kfree(rcvmsg);
return -ENOMEM;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [067/114] net: Fix napi_gro_frags vs netpoll path
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (65 preceding siblings ...)
2010-08-24 22:45 ` [066/114] isdn: fix information leak Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [068/114] net: Fix a memmove bug in dev_gro_receive() Greg KH
` (46 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jarek Poplawski, Herbert Xu,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jarek Poplawski <jarkao2@gmail.com>
[ Upstream commit ce9e76c8450fc248d3e1fc16ef05e6eb50c02fa5 ]
The netpoll_rx_on() check in __napi_gro_receive() skips part of the
"common" GRO_NORMAL path, especially "pull:" in dev_gro_receive(),
where at least eth header should be copied for entirely paged skbs.
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/core/dev.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3064,7 +3064,7 @@ enum gro_result dev_gro_receive(struct n
int mac_len;
enum gro_result ret;
- if (!(skb->dev->features & NETIF_F_GRO))
+ if (!(skb->dev->features & NETIF_F_GRO) || netpoll_rx_on(skb))
goto normal;
if (skb_is_gso(skb) || skb_has_frags(skb))
@@ -3151,9 +3151,6 @@ __napi_gro_receive(struct napi_struct *n
{
struct sk_buff *p;
- if (netpoll_rx_on(skb))
- return GRO_NORMAL;
-
for (p = napi->gro_list; p; p = p->next) {
NAPI_GRO_CB(p)->same_flow =
(p->dev == skb->dev) &&
^ permalink raw reply [flat|nested] 115+ messages in thread
* [068/114] net: Fix a memmove bug in dev_gro_receive()
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (66 preceding siblings ...)
2010-08-24 22:45 ` [067/114] net: Fix napi_gro_frags vs netpoll path Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [069/114] pkt_sched: Fix sch_sfq vs tcf_bind_filter oops Greg KH
` (45 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jarek Poplawski,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jarek Poplawski <jarkao2@gmail.com>
[ Upstream commit e5093aec2e6b60c3df2420057ffab9ed4a6d2792 ]
>Xin Xiaohui wrote:
> I looked into the code dev_gro_receive(), found the code here:
> if the frags[0] is pulled to 0, then the page will be released,
> and memmove() frags left.
> Is that right? I'm not sure if memmove do right or not, but
> frags[0].size is never set after memove at least. what I think
> a simple way is not to do anything if we found frags[0].size == 0.
> The patch is as followed.
...
This version of the patch fixes the bug directly in memmove.
Reported-by: "Xin, Xiaohui" <xiaohui.xin@intel.com>
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3133,7 +3133,7 @@ pull:
put_page(skb_shinfo(skb)->frags[0].page);
memmove(skb_shinfo(skb)->frags,
skb_shinfo(skb)->frags + 1,
- --skb_shinfo(skb)->nr_frags);
+ --skb_shinfo(skb)->nr_frags * sizeof(skb_frag_t));
}
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [069/114] pkt_sched: Fix sch_sfq vs tcf_bind_filter oops
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (67 preceding siblings ...)
2010-08-24 22:45 ` [068/114] net: Fix a memmove bug in dev_gro_receive() Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [070/114] pkt_sched: Fix sch_sfq vs tc_modify_qdisc oops Greg KH
` (44 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jarek Poplawski,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jarek Poplawski <jarkao2@gmail.com>
[ Upstream commit eb4a5527b1f0d581ac217c80ef3278ed5e38693c ]
Since there was added ->tcf_chain() method without ->bind_tcf() to
sch_sfq class options, there is oops when a filter is added with
the classid parameter.
Fixes commit 7d2681a6ff4f9ab5e48d02550b4c6338f1638998
netdev thread: null pointer at cls_api.c
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Reported-by: Franchoze Eric <franchoze@yandex.ru>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sched/sch_sfq.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -502,6 +502,12 @@ static unsigned long sfq_get(struct Qdis
return 0;
}
+static unsigned long sfq_bind(struct Qdisc *sch, unsigned long parent,
+ u32 classid)
+{
+ return 0;
+}
+
static struct tcf_proto **sfq_find_tcf(struct Qdisc *sch, unsigned long cl)
{
struct sfq_sched_data *q = qdisc_priv(sch);
@@ -556,6 +562,7 @@ static void sfq_walk(struct Qdisc *sch,
static const struct Qdisc_class_ops sfq_class_ops = {
.get = sfq_get,
.tcf_chain = sfq_find_tcf,
+ .bind_tcf = sfq_bind,
.dump = sfq_dump_class,
.dump_stats = sfq_dump_class_stats,
.walk = sfq_walk,
^ permalink raw reply [flat|nested] 115+ messages in thread
* [070/114] pkt_sched: Fix sch_sfq vs tc_modify_qdisc oops
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (68 preceding siblings ...)
2010-08-24 22:45 ` [069/114] pkt_sched: Fix sch_sfq vs tcf_bind_filter oops Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [071/114] net: disable preemption before call smp_processor_id() Greg KH
` (43 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jarek Poplawski,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jarek Poplawski <jarkao2@gmail.com>
[ Upstream commit 41065fba846e795b31b17e4dec01cb904d56c6cd ]
sch_sfq as a classful qdisc needs the .leaf handler. Otherwise, there
is an oops possible in tc_modify_qdisc()/check_loop().
Fixes commit 7d2681a6ff4f9ab5e48d02550b4c6338f1638998
Signed-off-by: Jarek Poplawski <jarkao2@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sched/sch_sfq.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -497,6 +497,11 @@ nla_put_failure:
return -1;
}
+static struct Qdisc *sfq_leaf(struct Qdisc *sch, unsigned long arg)
+{
+ return NULL;
+}
+
static unsigned long sfq_get(struct Qdisc *sch, u32 classid)
{
return 0;
@@ -560,6 +565,7 @@ static void sfq_walk(struct Qdisc *sch,
}
static const struct Qdisc_class_ops sfq_class_ops = {
+ .leaf = sfq_leaf,
.get = sfq_get,
.tcf_chain = sfq_find_tcf,
.bind_tcf = sfq_bind,
^ permalink raw reply [flat|nested] 115+ messages in thread
* [071/114] net: disable preemption before call smp_processor_id()
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (69 preceding siblings ...)
2010-08-24 22:45 ` [070/114] pkt_sched: Fix sch_sfq vs tc_modify_qdisc oops Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [072/114] act_nat: fix wild pointer Greg KH
` (42 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Changli Gao, David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Changli Gao <xiaosuo@gmail.com>
[ Upstream commit cece1945bffcf1a823cdfa36669beae118419351 ]
Although netif_rx() isn't expected to be called in process context with
preemption enabled, it'd better handle this case. And this is why get_cpu()
is used in the non-RPS #ifdef branch. If tree RCU is selected,
rcu_read_lock() won't disable preemption, so preempt_disable() should be
called explictly.
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/core/dev.c | 2 ++
1 file changed, 2 insertions(+)
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2504,6 +2504,7 @@ int netif_rx(struct sk_buff *skb)
struct rps_dev_flow voidflow, *rflow = &voidflow;
int cpu;
+ preempt_disable();
rcu_read_lock();
cpu = get_rps_cpu(skb->dev, skb, &rflow);
@@ -2513,6 +2514,7 @@ int netif_rx(struct sk_buff *skb)
ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail);
rcu_read_unlock();
+ preempt_enable();
}
#else
{
^ permalink raw reply [flat|nested] 115+ messages in thread
* [072/114] act_nat: fix wild pointer
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (70 preceding siblings ...)
2010-08-24 22:45 ` [071/114] net: disable preemption before call smp_processor_id() Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [073/114] Fix init ordering of /dev/console vs callers of modprobe Greg KH
` (41 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Changli Gao, Herbert Xu,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Changli Gao <xiaosuo@gmail.com>
[ Upstream commit 072d79a31a3b870b49886f4347e23f81b7eca3ac ]
pskb_may_pull() may change skb pointers, so adjust icmph after pskb_may_pull().
Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sched/act_nat.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/sched/act_nat.c
+++ b/net/sched/act_nat.c
@@ -218,6 +218,7 @@ static int tcf_nat(struct sk_buff *skb,
if (!pskb_may_pull(skb, ihl + sizeof(*icmph) + sizeof(*iph)))
goto drop;
+ icmph = (void *)(skb_network_header(skb) + ihl);
iph = (void *)(icmph + 1);
if (egress)
addr = iph->daddr;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [073/114] Fix init ordering of /dev/console vs callers of modprobe
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (71 preceding siblings ...)
2010-08-24 22:45 ` [072/114] act_nat: fix wild pointer Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [074/114] gen_nand: Test if nr_chips field is valid Greg KH
` (40 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, David Howells
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Howells <dhowells@redhat.com>
commit 31d1d48e199e99077fb30f6fb9a793be7bec756f upstream.
Make /dev/console get initialised before any initialisation routine that
invokes modprobe because if modprobe fails, it's going to want to open
/dev/console, presumably to write an error message to.
The problem with that is that if the /dev/console driver is not yet
initialised, the chardev handler will call request_module() to invoke
modprobe, which will fail, because we never compile /dev/console as a
module.
This will lead to a modprobe loop, showing the following in the kernel
log:
request_module: runaway loop modprobe char-major-5-1
request_module: runaway loop modprobe char-major-5-1
request_module: runaway loop modprobe char-major-5-1
request_module: runaway loop modprobe char-major-5-1
request_module: runaway loop modprobe char-major-5-1
This can happen, for example, when the built in md5 module can't find
the built in cryptomgr module (because the latter fails to initialise).
The md5 module comes before the call to tty_init(), presumably because
'crypto' comes before 'drivers' alphabetically.
Fix this by calling tty_init() from chrdev_init().
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/mem.c | 2 +-
drivers/char/tty_io.c | 4 ++--
fs/char_dev.c | 1 +
include/linux/tty.h | 3 +++
4 files changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -916,7 +916,7 @@ static int __init chr_dev_init(void)
NULL, devlist[minor].name);
}
- return 0;
+ return tty_init();
}
fs_initcall(chr_dev_init);
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -3128,7 +3128,7 @@ static struct cdev tty_cdev, console_cde
* Ok, now we can initialize the rest of the tty devices and can count
* on memory allocations, interrupts etc..
*/
-static int __init tty_init(void)
+int __init tty_init(void)
{
cdev_init(&tty_cdev, &tty_fops);
if (cdev_add(&tty_cdev, MKDEV(TTYAUX_MAJOR, 0), 1) ||
@@ -3149,4 +3149,4 @@ static int __init tty_init(void)
#endif
return 0;
}
-module_init(tty_init);
+
--- a/fs/char_dev.c
+++ b/fs/char_dev.c
@@ -20,6 +20,7 @@
#include <linux/cdev.h>
#include <linux/mutex.h>
#include <linux/backing-dev.h>
+#include <linux/tty.h>
#include "internal.h"
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -552,6 +552,9 @@ static inline void tty_audit_push_task(s
}
#endif
+/* tty_io.c */
+extern int __init tty_init(void);
+
/* tty_ioctl.c */
extern int n_tty_ioctl_helper(struct tty_struct *tty, struct file *file,
unsigned int cmd, unsigned long arg);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [074/114] gen_nand: Test if nr_chips field is valid
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (72 preceding siblings ...)
2010-08-24 22:45 ` [073/114] Fix init ordering of /dev/console vs callers of modprobe Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [075/114] isdn/gigaset: reduce syslog spam Greg KH
` (39 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Marek Vasut, David Woodhouse
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marek Vasut <marek.vasut@gmail.com>
commit 01cd2ababddd55a127caa1cd20d570637e0d42e1 upstream.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/mtd/nand/plat_nand.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -37,6 +37,11 @@ static int __devinit plat_nand_probe(str
struct resource *res;
int err = 0;
+ if (pdata->chip.nr_chips < 1) {
+ dev_err(&pdev->dev, "invalid number of chips specified\n");
+ return -EINVAL;
+ }
+
res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
if (!res)
return -ENXIO;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [075/114] isdn/gigaset: reduce syslog spam
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (73 preceding siblings ...)
2010-08-24 22:45 ` [074/114] gen_nand: Test if nr_chips field is valid Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [076/114] isdn: gigaset: add missing unlock Greg KH
` (38 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tilman Schmidt,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
commit 7d060ed2877ff6d00e7238226edbaf91493d6d0b upstream.
Downgrade some error messages which occur frequently during
normal operation to debug messages.
Impact: logging
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/isdn/gigaset/capi.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -378,13 +378,13 @@ void gigaset_skb_sent(struct bc_state *b
++bcs->trans_up;
if (!ap) {
- dev_err(cs->dev, "%s: no application\n", __func__);
+ gig_dbg(DEBUG_MCMD, "%s: application gone", __func__);
return;
}
/* don't send further B3 messages if disconnected */
if (bcs->apconnstate < APCONN_ACTIVE) {
- gig_dbg(DEBUG_LLDATA, "disconnected, discarding ack");
+ gig_dbg(DEBUG_MCMD, "%s: disconnected", __func__);
return;
}
@@ -422,13 +422,14 @@ void gigaset_skb_rcvd(struct bc_state *b
bcs->trans_down++;
if (!ap) {
- dev_err(cs->dev, "%s: no application\n", __func__);
+ gig_dbg(DEBUG_MCMD, "%s: application gone", __func__);
+ dev_kfree_skb_any(skb);
return;
}
/* don't send further B3 messages if disconnected */
if (bcs->apconnstate < APCONN_ACTIVE) {
- gig_dbg(DEBUG_LLDATA, "disconnected, discarding data");
+ gig_dbg(DEBUG_MCMD, "%s: disconnected", __func__);
dev_kfree_skb_any(skb);
return;
}
@@ -747,7 +748,7 @@ void gigaset_isdn_connD(struct bc_state
ap = bcs->ap;
if (!ap) {
spin_unlock_irqrestore(&bcs->aplock, flags);
- dev_err(cs->dev, "%s: no application\n", __func__);
+ gig_dbg(DEBUG_CMD, "%s: application gone", __func__);
return;
}
if (bcs->apconnstate == APCONN_NONE) {
@@ -843,7 +844,7 @@ void gigaset_isdn_connB(struct bc_state
ap = bcs->ap;
if (!ap) {
spin_unlock_irqrestore(&bcs->aplock, flags);
- dev_err(cs->dev, "%s: no application\n", __func__);
+ gig_dbg(DEBUG_CMD, "%s: application gone", __func__);
return;
}
if (!bcs->apconnstate) {
@@ -901,13 +902,12 @@ void gigaset_isdn_connB(struct bc_state
*/
void gigaset_isdn_hupB(struct bc_state *bcs)
{
- struct cardstate *cs = bcs->cs;
struct gigaset_capi_appl *ap = bcs->ap;
/* ToDo: assure order of DISCONNECT_B3_IND and DISCONNECT_IND ? */
if (!ap) {
- dev_err(cs->dev, "%s: no application\n", __func__);
+ gig_dbg(DEBUG_CMD, "%s: application gone", __func__);
return;
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [076/114] isdn: gigaset: add missing unlock
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (74 preceding siblings ...)
2010-08-24 22:45 ` [075/114] isdn/gigaset: reduce syslog spam Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [077/114] Oprofile: Change CPUIDS from decimal to hex, and add some comments Greg KH
` (37 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dan Carpenter,
David S. Miller, Tilman Schmidt
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dan Carpenter <error27@gmail.com>
commit 7e27a0aeb98d53539bdc38384eee899d6db62617 upstream.
We should unlock here. This is the only place where we return from the
function with the lock held. The caller isn't expecting it.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/isdn/gigaset/capi.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -1044,6 +1044,7 @@ static inline void remove_appl_from_chan
do {
if (bcap->bcnext == ap) {
bcap->bcnext = bcap->bcnext->bcnext;
+ spin_unlock_irqrestore(&bcs->aplock, flags);
return;
}
bcap = bcap->bcnext;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [077/114] Oprofile: Change CPUIDS from decimal to hex, and add some comments
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (75 preceding siblings ...)
2010-08-24 22:45 ` [076/114] isdn: gigaset: add missing unlock Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [078/114] oprofile: add support for Intel processor model 30 Greg KH
` (36 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, John L. Villalovos,
Robert Richter
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: John Villalovos <sodarock@gmail.com>
commit 45c34e05c4e3d36e7c44e790241ea11a1d90d54e upstream.
Back when the patch was submitted for "Add Xeon 7500 series support to
oprofile", Robert Richter had asked for a followon patch that
converted all the CPU ID values to hex.
I have done that here for the "i386/core_i7" and "i386/atom" class
processors in the ppro_init() function and also added some comments on
where to find documentation on the Intel processors.
Signed-off-by: John L. Villalovos <john.l.villalovos@intel.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/oprofile/nmi_int.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -634,6 +634,18 @@ static int __init ppro_init(char **cpu_t
if (force_arch_perfmon && cpu_has_arch_perfmon)
return 0;
+ /*
+ * Documentation on identifying Intel processors by CPU family
+ * and model can be found in the Intel Software Developer's
+ * Manuals (SDM):
+ *
+ * http://www.intel.com/products/processor/manuals/
+ *
+ * As of May 2010 the documentation for this was in the:
+ * "Intel 64 and IA-32 Architectures Software Developer's
+ * Manual Volume 3B: System Programming Guide", "Table B-1
+ * CPUID Signature Values of DisplayFamily_DisplayModel".
+ */
switch (cpu_model) {
case 0 ... 2:
*cpu_type = "i386/ppro";
@@ -655,12 +667,12 @@ static int __init ppro_init(char **cpu_t
case 15: case 23:
*cpu_type = "i386/core_2";
break;
+ case 0x1a:
case 0x2e:
- case 26:
spec = &op_arch_perfmon_spec;
*cpu_type = "i386/core_i7";
break;
- case 28:
+ case 0x1c:
*cpu_type = "i386/atom";
break;
default:
^ permalink raw reply [flat|nested] 115+ messages in thread
* [078/114] oprofile: add support for Intel processor model 30
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (76 preceding siblings ...)
2010-08-24 22:45 ` [077/114] Oprofile: Change CPUIDS from decimal to hex, and add some comments Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [079/114] drm/agp/i915: trim stolen space to 32M Greg KH
` (35 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Josh Hunt, Robert Richter
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Josh Hunt <johunt@akamai.com>
commit a7c55cbee0c1bae9bf5a15a08300e91d88706e45 upstream.
Newer Intel processors identifying themselves as model 30 are not recognized by
oprofile.
<cpuinfo snippet>
model : 30
model name : Intel(R) Xeon(R) CPU X3470 @ 2.93GHz
</cpuinfo snippet>
Running oprofile on these machines gives the following:
+ opcontrol --init
+ opcontrol --list-events
oprofile: available events for CPU type "Intel Architectural Perfmon"
See Intel 64 and IA-32 Architectures Software Developer's Manual
Volume 3B (Document 253669) Chapter 18 for architectural perfmon events
This is a limited set of fallback events because oprofile doesn't know your CPU
CPU_CLK_UNHALTED: (counter: all)
Clock cycles when not halted (min count: 6000)
INST_RETIRED: (counter: all)
number of instructions retired (min count: 6000)
LLC_MISSES: (counter: all)
Last level cache demand requests from this core that missed the LLC
(min count: 6000)
Unit masks (default 0x41)
----------
0x41: No unit mask
LLC_REFS: (counter: all)
Last level cache demand requests from this core (min count: 6000)
Unit masks (default 0x4f)
----------
0x4f: No unit mask
BR_MISS_PRED_RETIRED: (counter: all)
number of mispredicted branches retired (precise) (min count: 500)
+ opcontrol --shutdown
Tested using oprofile 0.9.6.
Signed-off-by: Josh Hunt <johunt@akamai.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Robert Richter <robert.richter@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/oprofile/nmi_int.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/x86/oprofile/nmi_int.c
+++ b/arch/x86/oprofile/nmi_int.c
@@ -668,6 +668,7 @@ static int __init ppro_init(char **cpu_t
*cpu_type = "i386/core_2";
break;
case 0x1a:
+ case 0x1e:
case 0x2e:
spec = &op_arch_perfmon_spec;
*cpu_type = "i386/core_i7";
^ permalink raw reply [flat|nested] 115+ messages in thread
* [079/114] drm/agp/i915: trim stolen space to 32M
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (77 preceding siblings ...)
2010-08-24 22:45 ` [078/114] oprofile: add support for Intel processor model 30 Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [080/114] timekeeping: Fix overflow in rawtime tv_nsec on 32 bit archs Greg KH
` (34 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jesse Barnes, Eric Anholt
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jesse Barnes <jbarnes@virtuousgeek.org>
commit d1d6ca73ef548748e141747e7260798327d6a2c1 upstream.
Some BIOSes will claim a large chunk of stolen space. Unless we
reclaim it, our aperture for remapping buffer objects will be
constrained. So clamp the stolen space to 32M and ignore the rest.
Fixes https://bugzilla.kernel.org/show_bug.cgi?id=15469 among others.
Adding the ignored stolen memory back into the general pool using the
memory hotplug code is left as an exercise for the reader.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Reviewed-by: Simon Farnsworth <simon.farnsworth@onelan.com>
Tested-by: Artem S. Tashkinov <t.artem@mailcity.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/agp/intel-gtt.c | 11 ++++++++++-
drivers/gpu/drm/i915/i915_dma.c | 8 ++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -25,6 +25,10 @@
#define USE_PCI_DMA_API 1
#endif
+/* Max amount of stolen space, anything above will be returned to Linux */
+int intel_max_stolen = 32 * 1024 * 1024;
+EXPORT_SYMBOL(intel_max_stolen);
+
static const struct aper_size_info_fixed intel_i810_sizes[] =
{
{64, 16384, 4},
@@ -710,7 +714,12 @@ static void intel_i830_init_gtt_entries(
break;
}
}
- if (gtt_entries > 0) {
+ if (!local && gtt_entries > intel_max_stolen) {
+ dev_info(&agp_bridge->dev->dev,
+ "detected %dK stolen memory, trimming to %dK\n",
+ gtt_entries / KB(1), intel_max_stolen / KB(1));
+ gtt_entries = intel_max_stolen / KB(4);
+ } else if (gtt_entries > 0) {
dev_info(&agp_bridge->dev->dev, "detected %dK %s memory\n",
gtt_entries / KB(1), local ? "local" : "stolen");
gtt_entries /= KB(4);
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -40,6 +40,8 @@
#include <linux/vga_switcheroo.h>
#include <linux/slab.h>
+extern int intel_max_stolen; /* from AGP driver */
+
/**
* Sets up the hardware status page for devices that need a physical address
* in the register.
@@ -2104,6 +2106,12 @@ int i915_driver_load(struct drm_device *
if (ret)
goto out_iomapfree;
+ if (prealloc_size > intel_max_stolen) {
+ DRM_INFO("detected %dM stolen memory, trimming to %dM\n",
+ prealloc_size >> 20, intel_max_stolen >> 20);
+ prealloc_size = intel_max_stolen;
+ }
+
dev_priv->wq = create_singlethread_workqueue("i915");
if (dev_priv->wq == NULL) {
DRM_ERROR("Failed to create our workqueue.\n");
^ permalink raw reply [flat|nested] 115+ messages in thread
* [080/114] timekeeping: Fix overflow in rawtime tv_nsec on 32 bit archs
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (78 preceding siblings ...)
2010-08-24 22:45 ` [079/114] drm/agp/i915: trim stolen space to 32M Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [081/114] time: Workaround gcc loop optimization that causes 64bit div errors Greg KH
` (33 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jason Wessel, John Stultz,
Thomas Gleixner, H. Peter Anvin
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jason Wessel <jason.wessel@windriver.com>
commit deda2e81961e96be4f2c09328baca4710a2fd1a0 upstream.
The tv_nsec is a long and when added to the shifted interval it can wrap
and become negative which later causes looping problems in the
getrawmonotonic(). The edge case occurs when the system has slept for
a short period of time of ~2 seconds.
A trace printk of the values in this patch illustrate the problem:
ftrace time stamp: log
43.716079: logarithmic_accumulation: raw: 3d0913 tv_nsec d687faa
43.718513: logarithmic_accumulation: raw: 3d0913 tv_nsec da588bd
43.722161: logarithmic_accumulation: raw: 3d0913 tv_nsec de291d0
46.349925: logarithmic_accumulation: raw: 7a122600 tv_nsec e1f9ae3
46.349930: logarithmic_accumulation: raw: 1e848980 tv_nsec 8831c0e3
The kernel starts looping at 46.349925 in the getrawmonotonic() due to
the negative value from adding the raw value to tv_nsec.
A simple solution is to accumulate into a u64, and then normalize it
to a timespec_t.
Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
[ Reworked variable names and simplified some of the code. - John ]
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/time/timekeeping.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -736,6 +736,7 @@ static void timekeeping_adjust(s64 offse
static cycle_t logarithmic_accumulation(cycle_t offset, int shift)
{
u64 nsecps = (u64)NSEC_PER_SEC << timekeeper.shift;
+ u64 raw_nsecs;
/* If the offset is smaller then a shifted interval, do nothing */
if (offset < timekeeper.cycle_interval<<shift)
@@ -752,12 +753,14 @@ static cycle_t logarithmic_accumulation(
second_overflow();
}
- /* Accumulate into raw time */
- raw_time.tv_nsec += timekeeper.raw_interval << shift;;
- while (raw_time.tv_nsec >= NSEC_PER_SEC) {
- raw_time.tv_nsec -= NSEC_PER_SEC;
+ /* Accumulate raw time */
+ raw_nsecs = timekeeper.raw_interval << shift;
+ raw_nsecs += raw_time.tv_nsec;
+ while (raw_nsecs >= NSEC_PER_SEC) {
+ raw_nsecs -= NSEC_PER_SEC;
raw_time.tv_sec++;
}
+ raw_time.tv_nsec = raw_nsecs;
/* Accumulate error between NTP and clock interval */
timekeeper.ntp_error += tick_length << shift;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [081/114] time: Workaround gcc loop optimization that causes 64bit div errors
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (79 preceding siblings ...)
2010-08-24 22:45 ` [080/114] timekeeping: Fix overflow in rawtime tv_nsec on 32 bit archs Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [082/114] can-raw: Fix skb_orphan_try handling Greg KH
` (32 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, John Stultz, Jason Wessel,
Larry Finger, Ingo Molnar
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: John Stultz <johnstul@us.ibm.com>
commit c7dcf87a6881bf796faee83003163eb3de41a309 upstream.
Early 4.3 versions of gcc apparently aggressively optimize the raw
time accumulation loop, replacing it with a divide.
On 32bit systems, this causes the following link errors:
undefined reference to `__umoddi3'
undefined reference to `__udivdi3'
The gcc issue has been fixed in 4.4 and greater.
This patch replaces the accumulation loop with a do_div, as suggested
by Linus.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
CC: Jason Wessel <jason.wessel@windriver.com>
CC: Larry Finger <Larry.Finger@lwfinger.net>
CC: Ingo Molnar <mingo@elte.hu>
CC: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/time/timekeeping.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/kernel/time/timekeeping.c
+++ b/kernel/time/timekeeping.c
@@ -756,9 +756,10 @@ static cycle_t logarithmic_accumulation(
/* Accumulate raw time */
raw_nsecs = timekeeper.raw_interval << shift;
raw_nsecs += raw_time.tv_nsec;
- while (raw_nsecs >= NSEC_PER_SEC) {
- raw_nsecs -= NSEC_PER_SEC;
- raw_time.tv_sec++;
+ if (raw_nsecs >= NSEC_PER_SEC) {
+ u64 raw_secs = raw_nsecs;
+ raw_nsecs = do_div(raw_secs, NSEC_PER_SEC);
+ raw_time.tv_sec += raw_secs;
}
raw_time.tv_nsec = raw_nsecs;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [082/114] can-raw: Fix skb_orphan_try handling
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (80 preceding siblings ...)
2010-08-24 22:45 ` [081/114] time: Workaround gcc loop optimization that causes 64bit div errors Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [083/114] iwlagn: fix rts cts protection Greg KH
` (31 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Oliver Hartkopp,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Oliver Hartkopp <socketcan@hartkopp.net>
commit cff0d6e6edac7672b3f915bb4fb59f279243b7f9 upstream.
Commit fc6055a5ba31e2c14e36e8939f9bf2b6d586a7f5 (net: Introduce
skb_orphan_try()) allows an early orphan of the skb and takes care on
tx timestamping, which needs the sk-reference in the skb on driver level.
So does the can-raw socket, which has not been taken into account here.
The patch below adds a 'prevent_sk_orphan' bit in the skb tx shared info,
which fixes the problem discovered by Matthias Fuchs here:
http://marc.info/?t=128030411900003&r=1&w=2
Even if it's not a primary tx timestamp topic it fits well into some skb
shared tx context. Or should be find a different place for the information to
protect the sk reference until it reaches the driver level?
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/skbuff.h | 4 +++-
net/can/raw.c | 4 ++++
2 files changed, 7 insertions(+), 1 deletion(-)
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -169,6 +169,7 @@ struct skb_shared_hwtstamps {
* @software: generate software time stamp
* @in_progress: device driver is going to provide
* hardware time stamp
+ * @prevent_sk_orphan: make sk reference available on driver level
* @flags: all shared_tx flags
*
* These flags are attached to packets as part of the
@@ -178,7 +179,8 @@ union skb_shared_tx {
struct {
__u8 hardware:1,
software:1,
- in_progress:1;
+ in_progress:1,
+ prevent_sk_orphan:1;
};
__u8 flags;
};
--- a/net/can/raw.c
+++ b/net/can/raw.c
@@ -655,6 +655,10 @@ static int raw_sendmsg(struct kiocb *ioc
err = sock_tx_timestamp(msg, sk, skb_tx(skb));
if (err < 0)
goto free_skb;
+
+ /* to be able to check the received tx sock reference in raw_rcv() */
+ skb_tx(skb)->prevent_sk_orphan = 1;
+
skb->dev = dev;
skb->sk = sk;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [083/114] iwlagn: fix rts cts protection
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (81 preceding siblings ...)
2010-08-24 22:45 ` [082/114] can-raw: Fix skb_orphan_try handling Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [084/114] dm: separate device deletion from dm_put Greg KH
` (30 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Johannes Berg, Wey-Yi Guy,
John W. Linville
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
This is a backport of mainline commit
94597ab23ea10b3bdcba534be00a9f7b35791c07.
I removed the variable renamings from it
and made it apply on 2.6.35. It now also
incorporates some changes from commit
cfecc6b492162fb49209a83dc207f182b87ea27a
since those were required as well.
commit 94597ab23ea10b3bdcba534be00a9f7b35791c07 upstream.
Currently the driver will try to protect all frames,
which leads to a lot of odd things like sending an
RTS with a zeroed RA before multicast frames, which
is clearly bogus.
In order to fix all of this, we need to take a step
back and see what we need to achieve:
* we need RTS/CTS protection if requested by
the AP for the BSS, mac80211 tells us this
* in that case, CTS-to-self should only be
enabled when mac80211 tells us
* additionally, as a hardware workaround, on
some devices we have to protect aggregated
frames with RTS
To achieve the first two items, set up the RXON
accordingly and set the protection required flag
in the transmit command when mac80211 requests
protection for the frame.
To achieve the last item, set the rate-control
RTS-requested flag for all stations that we have
aggregation sessions with, and set the protection
required flag when sending aggregated frames (on
those devices where this is required).
Since otherwise bugs can occur, do not allow the
user to override the RTS-for-aggregation setting
from sysfs any more.
Finally, also clean up the way all these flags get
set in the driver and move everything into the
device-specific functions.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/iwlwifi/iwl-3945.c | 16 -----------
drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 17 ++++++++++--
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 17 +++---------
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 20 --------------
drivers/net/wireless/iwlwifi/iwl-agn.c | 38 +++++++++++++++++++++-------
drivers/net/wireless/iwlwifi/iwl-core.c | 25 ++++++++++++++++--
drivers/net/wireless/iwlwifi/iwl-core.h | 10 ++++---
drivers/net/wireless/iwlwifi/iwl3945-base.c | 5 ---
8 files changed, 79 insertions(+), 69 deletions(-)
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -915,22 +915,6 @@ void iwl3945_hw_build_tx_cmd_rate(struct
rts_retry_limit = data_retry_limit;
tx_cmd->rts_retry_limit = rts_retry_limit;
- if (ieee80211_is_mgmt(fc)) {
- switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) {
- case cpu_to_le16(IEEE80211_STYPE_AUTH):
- case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
- case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ):
- case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ):
- if (tx_flags & TX_CMD_FLG_RTS_MSK) {
- tx_flags &= ~TX_CMD_FLG_RTS_MSK;
- tx_flags |= TX_CMD_FLG_CTS_MSK;
- }
- break;
- default:
- break;
- }
- }
-
tx_cmd->rate = rate;
tx_cmd->tx_flags = tx_flags;
--- a/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c
@@ -209,10 +209,21 @@ static void iwlagn_chain_noise_reset(str
}
}
-static void iwlagn_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
- __le32 *tx_flags)
+static void iwlagn_rts_tx_cmd_flag(struct iwl_priv *priv,
+ struct ieee80211_tx_info *info,
+ __le16 fc, __le32 *tx_flags)
{
- *tx_flags |= TX_CMD_FLG_RTS_CTS_MSK;
+ if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS ||
+ info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
+ *tx_flags |= TX_CMD_FLG_RTS_CTS_MSK;
+ return;
+ }
+
+ if (priv->cfg->use_rts_for_ht &&
+ info->flags & IEEE80211_TX_CTL_AMPDU) {
+ *tx_flags |= TX_CMD_FLG_RTS_CTS_MSK;
+ return;
+ }
}
/* Calc max signal level (dBm) among 3 possible receivers */
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -325,18 +325,11 @@ static void rs_tl_turn_on_agg(struct iwl
struct iwl_lq_sta *lq_data,
struct ieee80211_sta *sta)
{
- if ((tid < TID_MAX_LOAD_COUNT) &&
- !rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta)) {
- if (priv->cfg->use_rts_for_ht) {
- /*
- * switch to RTS/CTS if it is the prefer protection
- * method for HT traffic
- */
- IWL_DEBUG_HT(priv, "use RTS/CTS protection for HT\n");
- priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN;
- iwlcore_commit_rxon(priv);
- }
- }
+ if (tid < TID_MAX_LOAD_COUNT)
+ rs_tl_turn_on_agg_for_tid(priv, lq_data, tid, sta);
+ else
+ IWL_ERR(priv, "tid exceeds max load count: %d/%d\n",
+ tid, TID_MAX_LOAD_COUNT);
}
static inline int get_num_of_ant_from_rate(u32 rate_n_flags)
--- a/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-tx.c
@@ -376,10 +376,7 @@ static void iwlagn_tx_cmd_build_basic(st
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
}
- priv->cfg->ops->utils->rts_tx_cmd_flag(info, &tx_flags);
-
- if ((tx_flags & TX_CMD_FLG_RTS_MSK) || (tx_flags & TX_CMD_FLG_CTS_MSK))
- tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
+ priv->cfg->ops->utils->rts_tx_cmd_flag(priv, info, fc, &tx_flags);
tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK);
if (ieee80211_is_mgmt(fc)) {
@@ -453,21 +450,6 @@ static void iwlagn_tx_cmd_build_rate(str
if ((rate_idx >= IWL_FIRST_CCK_RATE) && (rate_idx <= IWL_LAST_CCK_RATE))
rate_flags |= RATE_MCS_CCK_MSK;
- /* Set up RTS and CTS flags for certain packets */
- switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) {
- case cpu_to_le16(IEEE80211_STYPE_AUTH):
- case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
- case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ):
- case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ):
- if (tx_cmd->tx_flags & TX_CMD_FLG_RTS_MSK) {
- tx_cmd->tx_flags &= ~TX_CMD_FLG_RTS_MSK;
- tx_cmd->tx_flags |= TX_CMD_FLG_CTS_MSK;
- }
- break;
- default:
- break;
- }
-
/* Set up antennas */
priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant);
rate_flags |= iwl_ant_idx_to_flags(priv->mgmt_tx_ant);
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -200,13 +200,6 @@ int iwl_commit_rxon(struct iwl_priv *pri
priv->start_calib = 0;
if (new_assoc) {
- /*
- * allow CTS-to-self if possible for new association.
- * this is relevant only for 5000 series and up,
- * but will not damage 4965
- */
- priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN;
-
/* Apply the new configuration
* RXON assoc doesn't clear the station table in uCode,
*/
@@ -3336,13 +3329,40 @@ static int iwl_mac_ampdu_action(struct i
IWL_DEBUG_HT(priv, "priv->_agn.agg_tids_count = %u\n",
priv->_agn.agg_tids_count);
}
+ if (priv->cfg->use_rts_for_ht) {
+ struct iwl_station_priv *sta_priv =
+ (void *) sta->drv_priv;
+ /*
+ * switch off RTS/CTS if it was previously enabled
+ */
+
+ sta_priv->lq_sta.lq.general_params.flags &=
+ ~LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK;
+ iwl_send_lq_cmd(priv, &sta_priv->lq_sta.lq,
+ CMD_ASYNC, false);
+ }
+ break;
if (test_bit(STATUS_EXIT_PENDING, &priv->status))
return 0;
else
return ret;
case IEEE80211_AMPDU_TX_OPERATIONAL:
- /* do nothing */
- return -EOPNOTSUPP;
+ if (priv->cfg->use_rts_for_ht) {
+ struct iwl_station_priv *sta_priv =
+ (void *) sta->drv_priv;
+
+ /*
+ * switch to RTS/CTS if it is the prefer protection
+ * method for HT traffic
+ */
+
+ sta_priv->lq_sta.lq.general_params.flags |=
+ LINK_QUAL_FLAGS_SET_STA_TLC_RTS_MSK;
+ iwl_send_lq_cmd(priv, &sta_priv->lq_sta.lq,
+ CMD_ASYNC, false);
+ }
+ ret = 0;
+ break;
default:
IWL_DEBUG_HT(priv, "unknown\n");
return -EINVAL;
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -403,19 +403,36 @@ EXPORT_SYMBOL(iwlcore_free_geos);
* iwlcore_rts_tx_cmd_flag: Set rts/cts. 3945 and 4965 only share this
* function.
*/
-void iwlcore_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
- __le32 *tx_flags)
+void iwlcore_rts_tx_cmd_flag(struct iwl_priv *priv,
+ struct ieee80211_tx_info *info,
+ __le16 fc, __le32 *tx_flags)
{
if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_RTS_CTS) {
*tx_flags |= TX_CMD_FLG_RTS_MSK;
*tx_flags &= ~TX_CMD_FLG_CTS_MSK;
+ *tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
+
+ if (!ieee80211_is_mgmt(fc))
+ return;
+
+ switch (fc & cpu_to_le16(IEEE80211_FCTL_STYPE)) {
+ case cpu_to_le16(IEEE80211_STYPE_AUTH):
+ case cpu_to_le16(IEEE80211_STYPE_DEAUTH):
+ case cpu_to_le16(IEEE80211_STYPE_ASSOC_REQ):
+ case cpu_to_le16(IEEE80211_STYPE_REASSOC_REQ):
+ *tx_flags &= ~TX_CMD_FLG_RTS_MSK;
+ *tx_flags |= TX_CMD_FLG_CTS_MSK;
+ break;
+ }
} else if (info->control.rates[0].flags & IEEE80211_TX_RC_USE_CTS_PROTECT) {
*tx_flags &= ~TX_CMD_FLG_RTS_MSK;
*tx_flags |= TX_CMD_FLG_CTS_MSK;
+ *tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
}
}
EXPORT_SYMBOL(iwlcore_rts_tx_cmd_flag);
+
static bool is_single_rx_stream(struct iwl_priv *priv)
{
return priv->current_ht_config.smps == IEEE80211_SMPS_STATIC ||
@@ -1936,6 +1953,10 @@ void iwl_bss_info_changed(struct ieee802
priv->staging_rxon.flags |= RXON_FLG_TGG_PROTECT_MSK;
else
priv->staging_rxon.flags &= ~RXON_FLG_TGG_PROTECT_MSK;
+ if (bss_conf->use_cts_prot)
+ priv->staging_rxon.flags |= RXON_FLG_SELF_CTS_EN;
+ else
+ priv->staging_rxon.flags &= ~RXON_FLG_SELF_CTS_EN;
}
if (changes & BSS_CHANGED_BASIC_RATES) {
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -102,8 +102,9 @@ struct iwl_hcmd_utils_ops {
u32 min_average_noise,
u8 default_chain);
void (*chain_noise_reset)(struct iwl_priv *priv);
- void (*rts_tx_cmd_flag)(struct ieee80211_tx_info *info,
- __le32 *tx_flags);
+ void (*rts_tx_cmd_flag)(struct iwl_priv *priv,
+ struct ieee80211_tx_info *info,
+ __le16 fc, __le32 *tx_flags);
int (*calc_rssi)(struct iwl_priv *priv,
struct iwl_rx_phy_res *rx_resp);
void (*request_scan)(struct iwl_priv *priv, struct ieee80211_vif *vif);
@@ -375,8 +376,9 @@ void iwl_config_ap(struct iwl_priv *priv
void iwl_mac_reset_tsf(struct ieee80211_hw *hw);
int iwl_alloc_txq_mem(struct iwl_priv *priv);
void iwl_free_txq_mem(struct iwl_priv *priv);
-void iwlcore_rts_tx_cmd_flag(struct ieee80211_tx_info *info,
- __le32 *tx_flags);
+void iwlcore_rts_tx_cmd_flag(struct iwl_priv *priv,
+ struct ieee80211_tx_info *info,
+ __le16 fc, __le32 *tx_flags);
#ifdef CONFIG_IWLWIFI_DEBUGFS
int iwl_alloc_traffic_mem(struct iwl_priv *priv);
void iwl_free_traffic_mem(struct iwl_priv *priv);
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -434,10 +434,7 @@ static void iwl3945_build_tx_cmd_basic(s
tx_flags |= TX_CMD_FLG_SEQ_CTL_MSK;
}
- priv->cfg->ops->utils->rts_tx_cmd_flag(info, &tx_flags);
-
- if ((tx_flags & TX_CMD_FLG_RTS_MSK) || (tx_flags & TX_CMD_FLG_CTS_MSK))
- tx_flags |= TX_CMD_FLG_FULL_TXOP_PROT_MSK;
+ priv->cfg->ops->utils->rts_tx_cmd_flag(priv, info, fc, &tx_flags);
tx_flags &= ~(TX_CMD_FLG_ANT_SEL_MSK);
if (ieee80211_is_mgmt(fc)) {
^ permalink raw reply [flat|nested] 115+ messages in thread
* [084/114] dm: separate device deletion from dm_put
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (82 preceding siblings ...)
2010-08-24 22:45 ` [083/114] iwlagn: fix rts cts protection Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [085/114] e1000e: disable ASPM L1 on 82573 Greg KH
` (29 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Kiyoshi Ueda, Junichi Nomura,
Alasdair G Kergon
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
commit 3f77316de0ec0fd208467fbee8d9edc70e2c73b2 upstream.
This patch separates the device deletion code from dm_put()
to make sure the deletion happens in the process context.
By this patch, device deletion always occurs in an ioctl (process)
context and dm_put() can be called in interrupt context.
As a result, the request-based dm's bad dm_put() usage pointed out
by Mikulas below disappears.
http://marc.info/?l=dm-devel&m=126699981019735&w=2
Without this patch, I confirmed there is a case to crash the system:
dm_put() => dm_table_destroy() => vfree() => BUG_ON(in_interrupt())
Some more backgrounds and details:
In request-based dm, a device opener can remove a mapped_device
while the last request is still completing, because bios in the last
request complete first and then the device opener can close and remove
the mapped_device before the last request completes:
CPU0 CPU1
=================================================================
<<INTERRUPT>>
blk_end_request_all(clone_rq)
blk_update_request(clone_rq)
bio_endio(clone_bio) == end_clone_bio
blk_update_request(orig_rq)
bio_endio(orig_bio)
<<I/O completed>>
dm_blk_close()
dev_remove()
dm_put(md)
<<Free md>>
blk_finish_request(clone_rq)
....
dm_end_request(clone_rq)
free_rq_clone(clone_rq)
blk_end_request_all(orig_rq)
rq_completed(md)
So request-based dm used dm_get()/dm_put() to hold md for each I/O
until its request completion handling is fully done.
However, the final dm_put() can call the device deletion code which
must not be run in interrupt context and may cause kernel panic.
To solve the problem, this patch moves the device deletion code,
dm_destroy(), to predetermined places that is actually deleting
the mapped_device in ioctl (process) context, and changes dm_put()
just to decrement the reference count of the mapped_device.
By this change, dm_put() can be used in any context and the symmetric
model below is introduced:
dm_create(): create a mapped_device
dm_destroy(): destroy a mapped_device
dm_get(): increment the reference count of a mapped_device
dm_put(): decrement the reference count of a mapped_device
dm_destroy() waits for all references of the mapped_device to disappear,
then deletes the mapped_device.
dm_destroy() uses active waiting with msleep(1), since deleting
the mapped_device isn't performance-critical task.
And since at this point, nobody opens the mapped_device and no new
reference will be taken, the pending counts are just for racing
completing activity and will eventually decrease to zero.
For the unlikely case of the forced module unload, dm_destroy_immediate(),
which doesn't wait and forcibly deletes the mapped_device, is also
introduced and used in dm_hash_remove_all(). Otherwise, "rmmod -f"
may be stuck and never return.
And now, because the mapped_device is deleted at this point, subsequent
accesses to the mapped_device may cause NULL pointer references.
Signed-off-by: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>
Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/md/dm-ioctl.c | 6 ++++
drivers/md/dm.c | 62 +++++++++++++++++++++++++++++++++++++-------------
drivers/md/dm.h | 5 ++++
3 files changed, 57 insertions(+), 16 deletions(-)
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -274,6 +274,10 @@ retry:
up_write(&_hash_lock);
dm_put(md);
+ if (likely(keep_open_devices))
+ dm_destroy(md);
+ else
+ dm_destroy_immediate(md);
/*
* Some mapped devices may be using other mapped
@@ -646,6 +650,7 @@ static int dev_create(struct dm_ioctl *p
r = dm_hash_insert(param->name, *param->uuid ? param->uuid : NULL, md);
if (r) {
dm_put(md);
+ dm_destroy(md);
return r;
}
@@ -748,6 +753,7 @@ static int dev_remove(struct dm_ioctl *p
param->flags |= DM_UEVENT_GENERATED_FLAG;
dm_put(md);
+ dm_destroy(md);
return 0;
}
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -19,6 +19,7 @@
#include <linux/slab.h>
#include <linux/idr.h>
#include <linux/hdreg.h>
+#include <linux/delay.h>
#include <trace/events/block.h>
@@ -2176,6 +2177,7 @@ void dm_set_mdptr(struct mapped_device *
void dm_get(struct mapped_device *md)
{
atomic_inc(&md->holders);
+ BUG_ON(test_bit(DMF_FREEING, &md->flags));
}
const char *dm_device_name(struct mapped_device *md)
@@ -2184,27 +2186,55 @@ const char *dm_device_name(struct mapped
}
EXPORT_SYMBOL_GPL(dm_device_name);
-void dm_put(struct mapped_device *md)
+static void __dm_destroy(struct mapped_device *md, bool wait)
{
struct dm_table *map;
- BUG_ON(test_bit(DMF_FREEING, &md->flags));
+ might_sleep();
- if (atomic_dec_and_lock(&md->holders, &_minor_lock)) {
- map = dm_get_live_table(md);
- idr_replace(&_minor_idr, MINOR_ALLOCED,
- MINOR(disk_devt(dm_disk(md))));
- set_bit(DMF_FREEING, &md->flags);
- spin_unlock(&_minor_lock);
- if (!dm_suspended_md(md)) {
- dm_table_presuspend_targets(map);
- dm_table_postsuspend_targets(map);
- }
- dm_sysfs_exit(md);
- dm_table_put(map);
- dm_table_destroy(__unbind(md));
- free_dev(md);
+ spin_lock(&_minor_lock);
+ map = dm_get_live_table(md);
+ idr_replace(&_minor_idr, MINOR_ALLOCED, MINOR(disk_devt(dm_disk(md))));
+ set_bit(DMF_FREEING, &md->flags);
+ spin_unlock(&_minor_lock);
+
+ if (!dm_suspended_md(md)) {
+ dm_table_presuspend_targets(map);
+ dm_table_postsuspend_targets(map);
}
+
+ /*
+ * Rare, but there may be I/O requests still going to complete,
+ * for example. Wait for all references to disappear.
+ * No one should increment the reference count of the mapped_device,
+ * after the mapped_device state becomes DMF_FREEING.
+ */
+ if (wait)
+ while (atomic_read(&md->holders))
+ msleep(1);
+ else if (atomic_read(&md->holders))
+ DMWARN("%s: Forcibly removing mapped_device still in use! (%d users)",
+ dm_device_name(md), atomic_read(&md->holders));
+
+ dm_sysfs_exit(md);
+ dm_table_put(map);
+ dm_table_destroy(__unbind(md));
+ free_dev(md);
+}
+
+void dm_destroy(struct mapped_device *md)
+{
+ __dm_destroy(md, true);
+}
+
+void dm_destroy_immediate(struct mapped_device *md)
+{
+ __dm_destroy(md, false);
+}
+
+void dm_put(struct mapped_device *md)
+{
+ atomic_dec(&md->holders);
}
EXPORT_SYMBOL_GPL(dm_put);
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -122,6 +122,11 @@ void dm_linear_exit(void);
int dm_stripe_init(void);
void dm_stripe_exit(void);
+/*
+ * mapped_device operations
+ */
+void dm_destroy(struct mapped_device *md);
+void dm_destroy_immediate(struct mapped_device *md);
int dm_open_count(struct mapped_device *md);
int dm_lock_for_deletion(struct mapped_device *md);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [085/114] e1000e: disable ASPM L1 on 82573
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (83 preceding siblings ...)
2010-08-24 22:45 ` [084/114] dm: separate device deletion from dm_put Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [086/114] e1000e: dont check for alternate MAC addr on parts that dont support it Greg KH
` (28 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bruce Allan, Jeff Kirsher,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bruce Allan <bruce.w.allan@intel.com>
commit 19833b5dffe2f2e92a1b377f9aae9d5f32239512 upstream.
On the e1000-devel mailing list, Nils Faerber reported latency issues with
the 82573 LOM on a ThinkPad X60. It was found to be caused by ASPM L1;
disabling it resolves the latency. The issue is present in kernels back
to 2.6.34 and possibly 2.6.33.
Reported-by: Nils Faerber <nils.faerber@kernelconcepts.de>
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/e1000e/82571.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/e1000e/82571.c
+++ b/drivers/net/e1000e/82571.c
@@ -1833,6 +1833,7 @@ struct e1000_info e1000_82573_info = {
| FLAG_HAS_SMART_POWER_DOWN
| FLAG_HAS_AMT
| FLAG_HAS_SWSM_ON_LOAD,
+ .flags2 = FLAG2_DISABLE_ASPM_L1,
.pba = 20,
.max_hw_frame_size = ETH_FRAME_LEN + ETH_FCS_LEN,
.get_variants = e1000_get_variants_82571,
^ permalink raw reply [flat|nested] 115+ messages in thread
* [086/114] e1000e: dont check for alternate MAC addr on parts that dont support it
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (84 preceding siblings ...)
2010-08-24 22:45 ` [085/114] e1000e: disable ASPM L1 on 82573 Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [087/114] iwlwifi: fix 3945 filter flags Greg KH
` (27 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bruce Allan, Jeff Kirsher,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bruce Allan <bruce.w.allan@intel.com>
commit 1aef70ef125165e0114a8e475636eff242a52030 upstream.
From: Bruce Allan <bruce.w.allan@intel.com>
The alternate MAC address feature is only supported by 80003ES2LAN and
82571 LOMs as well as a couple 82571 mezzanine cards. Checking for an
alternate MAC address on other parts can fail leading to the driver not
able to load. This patch limits the check for an alternate MAC address
to be done only for parts that support the feature.
This issue has been around since support for the feature was introduced
to the e1000e driver in 2.6.34.
Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Reported-by: Fabio Varesano <fax8@users.sourceforge.net>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/e1000e/82571.c | 30 +++++++++++++++++-------------
drivers/net/e1000e/defines.h | 4 ++++
drivers/net/e1000e/lib.c | 10 ++++++++++
3 files changed, 31 insertions(+), 13 deletions(-)
--- a/drivers/net/e1000e/82571.c
+++ b/drivers/net/e1000e/82571.c
@@ -936,12 +936,14 @@ static s32 e1000_reset_hw_82571(struct e
ew32(IMC, 0xffffffff);
icr = er32(ICR);
- /* Install any alternate MAC address into RAR0 */
- ret_val = e1000_check_alt_mac_addr_generic(hw);
- if (ret_val)
- return ret_val;
+ if (hw->mac.type == e1000_82571) {
+ /* Install any alternate MAC address into RAR0 */
+ ret_val = e1000_check_alt_mac_addr_generic(hw);
+ if (ret_val)
+ return ret_val;
- e1000e_set_laa_state_82571(hw, true);
+ e1000e_set_laa_state_82571(hw, true);
+ }
/* Reinitialize the 82571 serdes link state machine */
if (hw->phy.media_type == e1000_media_type_internal_serdes)
@@ -1618,14 +1620,16 @@ static s32 e1000_read_mac_addr_82571(str
{
s32 ret_val = 0;
- /*
- * If there's an alternate MAC address place it in RAR0
- * so that it will override the Si installed default perm
- * address.
- */
- ret_val = e1000_check_alt_mac_addr_generic(hw);
- if (ret_val)
- goto out;
+ if (hw->mac.type == e1000_82571) {
+ /*
+ * If there's an alternate MAC address place it in RAR0
+ * so that it will override the Si installed default perm
+ * address.
+ */
+ ret_val = e1000_check_alt_mac_addr_generic(hw);
+ if (ret_val)
+ goto out;
+ }
ret_val = e1000_read_mac_addr_generic(hw);
--- a/drivers/net/e1000e/defines.h
+++ b/drivers/net/e1000e/defines.h
@@ -620,6 +620,7 @@
#define E1000_FLASH_UPDATES 2000
/* NVM Word Offsets */
+#define NVM_COMPAT 0x0003
#define NVM_ID_LED_SETTINGS 0x0004
#define NVM_INIT_CONTROL2_REG 0x000F
#define NVM_INIT_CONTROL3_PORT_B 0x0014
@@ -642,6 +643,9 @@
/* Mask bits for fields in Word 0x1a of the NVM */
#define NVM_WORD1A_ASPM_MASK 0x000C
+/* Mask bits for fields in Word 0x03 of the EEPROM */
+#define NVM_COMPAT_LOM 0x0800
+
/* For checksumming, the sum of all words in the NVM should equal 0xBABA. */
#define NVM_SUM 0xBABA
--- a/drivers/net/e1000e/lib.c
+++ b/drivers/net/e1000e/lib.c
@@ -183,6 +183,16 @@ s32 e1000_check_alt_mac_addr_generic(str
u16 offset, nvm_alt_mac_addr_offset, nvm_data;
u8 alt_mac_addr[ETH_ALEN];
+ ret_val = e1000_read_nvm(hw, NVM_COMPAT, 1, &nvm_data);
+ if (ret_val)
+ goto out;
+
+ /* Check for LOM (vs. NIC) or one of two valid mezzanine cards */
+ if (!((nvm_data & NVM_COMPAT_LOM) ||
+ (hw->adapter->pdev->device == E1000_DEV_ID_82571EB_SERDES_DUAL) ||
+ (hw->adapter->pdev->device == E1000_DEV_ID_82571EB_SERDES_QUAD)))
+ goto out;
+
ret_val = e1000_read_nvm(hw, NVM_ALT_MAC_ADDR_PTR, 1,
&nvm_alt_mac_addr_offset);
if (ret_val) {
^ permalink raw reply [flat|nested] 115+ messages in thread
* [087/114] iwlwifi: fix 3945 filter flags
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (85 preceding siblings ...)
2010-08-24 22:45 ` [086/114] e1000e: dont check for alternate MAC addr on parts that dont support it Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [088/114] fixes for using make 3.82 Greg KH
` (26 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Johannes Berg,
John W. Linville
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
commit 8b8ab9d5e352aae0dcae53c657b25ab61bb73f0f upstream.
Applying the filter flags directly as done since
commit 3474ad635db371b0d8d0ee40086f15d223d5b6a4
Author: Johannes Berg <johannes.berg@intel.com>
Date: Thu Apr 29 04:43:05 2010 -0700
iwlwifi: apply filter flags directly
broke 3945 under some unknown circumstances, as
reported by Alex.
Since I want to keep the direct application of
filter flags on iwlagn, duplicate the code into
both 3945 and agn and remove committing the
RXON that broke things from the 3945 version.
Reported-by: Alex Romosan <romosan@sycorax.lbl.gov>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/iwlwifi/iwl-agn.c | 45 ++++++++++++++++++++++++
drivers/net/wireless/iwlwifi/iwl-core.c | 45 ------------------------
drivers/net/wireless/iwlwifi/iwl-core.h | 3 -
drivers/net/wireless/iwlwifi/iwl3945-base.c | 51 +++++++++++++++++++++++++++-
4 files changed, 94 insertions(+), 50 deletions(-)
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -3443,6 +3443,49 @@ static int iwlagn_mac_sta_add(struct iee
return 0;
}
+static void iwlagn_configure_filter(struct ieee80211_hw *hw,
+ unsigned int changed_flags,
+ unsigned int *total_flags,
+ u64 multicast)
+{
+ struct iwl_priv *priv = hw->priv;
+ __le32 filter_or = 0, filter_nand = 0;
+
+#define CHK(test, flag) do { \
+ if (*total_flags & (test)) \
+ filter_or |= (flag); \
+ else \
+ filter_nand |= (flag); \
+ } while (0)
+
+ IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n",
+ changed_flags, *total_flags);
+
+ CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
+ CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
+ CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);
+
+#undef CHK
+
+ mutex_lock(&priv->mutex);
+
+ priv->staging_rxon.filter_flags &= ~filter_nand;
+ priv->staging_rxon.filter_flags |= filter_or;
+
+ iwlcore_commit_rxon(priv);
+
+ mutex_unlock(&priv->mutex);
+
+ /*
+ * Receiving all multicast frames is always enabled by the
+ * default flags setup in iwl_connection_init_rx_config()
+ * since we currently do not support programming multicast
+ * filters into the device.
+ */
+ *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
+ FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
+}
+
/*****************************************************************************
*
* driver setup and teardown
@@ -3603,7 +3646,7 @@ static struct ieee80211_ops iwl_hw_ops =
.add_interface = iwl_mac_add_interface,
.remove_interface = iwl_mac_remove_interface,
.config = iwl_mac_config,
- .configure_filter = iwl_configure_filter,
+ .configure_filter = iwlagn_configure_filter,
.set_key = iwl_mac_set_key,
.update_tkip_key = iwl_mac_update_tkip_key,
.conf_tx = iwl_mac_conf_tx,
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1311,51 +1311,6 @@ out:
EXPORT_SYMBOL(iwl_apm_init);
-
-void iwl_configure_filter(struct ieee80211_hw *hw,
- unsigned int changed_flags,
- unsigned int *total_flags,
- u64 multicast)
-{
- struct iwl_priv *priv = hw->priv;
- __le32 filter_or = 0, filter_nand = 0;
-
-#define CHK(test, flag) do { \
- if (*total_flags & (test)) \
- filter_or |= (flag); \
- else \
- filter_nand |= (flag); \
- } while (0)
-
- IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n",
- changed_flags, *total_flags);
-
- CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
- CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
- CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);
-
-#undef CHK
-
- mutex_lock(&priv->mutex);
-
- priv->staging_rxon.filter_flags &= ~filter_nand;
- priv->staging_rxon.filter_flags |= filter_or;
-
- iwlcore_commit_rxon(priv);
-
- mutex_unlock(&priv->mutex);
-
- /*
- * Receiving all multicast frames is always enabled by the
- * default flags setup in iwl_connection_init_rx_config()
- * since we currently do not support programming multicast
- * filters into the device.
- */
- *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
- FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
-}
-EXPORT_SYMBOL(iwl_configure_filter);
-
int iwl_set_hw_params(struct iwl_priv *priv)
{
priv->hw_params.max_rxq_size = RX_QUEUE_SIZE;
--- a/drivers/net/wireless/iwlwifi/iwl-core.h
+++ b/drivers/net/wireless/iwlwifi/iwl-core.h
@@ -356,9 +356,6 @@ int iwl_set_decrypted_flag(struct iwl_pr
u32 decrypt_res,
struct ieee80211_rx_status *stats);
void iwl_irq_handle_error(struct iwl_priv *priv);
-void iwl_configure_filter(struct ieee80211_hw *hw,
- unsigned int changed_flags,
- unsigned int *total_flags, u64 multicast);
int iwl_set_hw_params(struct iwl_priv *priv);
void iwl_post_associate(struct iwl_priv *priv, struct ieee80211_vif *vif);
void iwl_bss_info_changed(struct ieee80211_hw *hw,
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -3462,6 +3462,55 @@ static int iwl3945_mac_sta_add(struct ie
return 0;
}
+
+static void iwl3945_configure_filter(struct ieee80211_hw *hw,
+ unsigned int changed_flags,
+ unsigned int *total_flags,
+ u64 multicast)
+{
+ struct iwl_priv *priv = hw->priv;
+ __le32 filter_or = 0, filter_nand = 0;
+
+#define CHK(test, flag) do { \
+ if (*total_flags & (test)) \
+ filter_or |= (flag); \
+ else \
+ filter_nand |= (flag); \
+ } while (0)
+
+ IWL_DEBUG_MAC80211(priv, "Enter: changed: 0x%x, total: 0x%x\n",
+ changed_flags, *total_flags);
+
+ CHK(FIF_OTHER_BSS | FIF_PROMISC_IN_BSS, RXON_FILTER_PROMISC_MSK);
+ CHK(FIF_CONTROL, RXON_FILTER_CTL2HOST_MSK);
+ CHK(FIF_BCN_PRBRESP_PROMISC, RXON_FILTER_BCON_AWARE_MSK);
+
+#undef CHK
+
+ mutex_lock(&priv->mutex);
+
+ priv->staging_rxon.filter_flags &= ~filter_nand;
+ priv->staging_rxon.filter_flags |= filter_or;
+
+ /*
+ * Committing directly here breaks for some reason,
+ * but we'll eventually commit the filter flags
+ * change anyway.
+ */
+
+ mutex_unlock(&priv->mutex);
+
+ /*
+ * Receiving all multicast frames is always enabled by the
+ * default flags setup in iwl_connection_init_rx_config()
+ * since we currently do not support programming multicast
+ * filters into the device.
+ */
+ *total_flags &= FIF_OTHER_BSS | FIF_ALLMULTI | FIF_PROMISC_IN_BSS |
+ FIF_BCN_PRBRESP_PROMISC | FIF_CONTROL;
+}
+
+
/*****************************************************************************
*
* sysfs attributes
@@ -3867,7 +3916,7 @@ static struct ieee80211_ops iwl3945_hw_o
.add_interface = iwl_mac_add_interface,
.remove_interface = iwl_mac_remove_interface,
.config = iwl_mac_config,
- .configure_filter = iwl_configure_filter,
+ .configure_filter = iwl3945_configure_filter,
.set_key = iwl3945_mac_set_key,
.conf_tx = iwl_mac_conf_tx,
.reset_tsf = iwl_mac_reset_tsf,
^ permalink raw reply [flat|nested] 115+ messages in thread
* [088/114] fixes for using make 3.82
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (86 preceding siblings ...)
2010-08-24 22:45 ` [087/114] iwlwifi: fix 3945 filter flags Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [089/114] ALSA: intel8x0: Mute External Amplifier by default for ThinkPad X31 Greg KH
` (25 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jan Beulich, Sam Ravnborg,
Michal Marek
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Beulich <JBeulich@novell.com>
commit 3c955b407a084810f57260d61548cc92c14bc627 upstream.
It doesn't like pattern and explicit rules to be on the same line,
and it seems to be more picky when matching file (or really directory)
names with different numbers of trailing slashes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
Andrew Benton <b3nton@gmail.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
firmware/Makefile | 2 +-
scripts/mkmakefile | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
--- a/firmware/Makefile
+++ b/firmware/Makefile
@@ -142,7 +142,7 @@ fw-shipped-$(CONFIG_YAM) += yam/1200.bin
fw-shipped-all := $(fw-shipped-y) $(fw-shipped-m) $(fw-shipped-)
# Directories which we _might_ need to create, so we have a rule for them.
-firmware-dirs := $(sort $(patsubst %,$(objtree)/$(obj)/%/,$(dir $(fw-external-y) $(fw-shipped-all))))
+firmware-dirs := $(sort $(addprefix $(objtree)/$(obj)/,$(dir $(fw-external-y) $(fw-shipped-all))))
quiet_cmd_mkdir = MKDIR $(patsubst $(objtree)/%,%,$@)
cmd_mkdir = mkdir -p $@
--- a/scripts/mkmakefile
+++ b/scripts/mkmakefile
@@ -44,7 +44,9 @@ all:
Makefile:;
-\$(all) %/: all
+\$(all): all
@:
+%/: all
+ @:
EOF
^ permalink raw reply [flat|nested] 115+ messages in thread
* [089/114] ALSA: intel8x0: Mute External Amplifier by default for ThinkPad X31
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (87 preceding siblings ...)
2010-08-24 22:45 ` [088/114] fixes for using make 3.82 Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [090/114] netlink: fix compat recvmsg Greg KH
` (24 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit 9c77b846ec8b4e0c7107dd7f820172462dc84a61 upstream.
BugLink: https://bugs.launchpad.net/bugs/619439
This ThinkPad model needs External Amplifier muted for audible playback,
so set the inv_eapd quirk for it.
Reported-and-tested-by: Dennis Bell <dennis.bell@parkerg.co.uk>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/intel8x0.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/sound/pci/intel8x0.c
+++ b/sound/pci/intel8x0.c
@@ -1776,6 +1776,12 @@ static struct ac97_quirk ac97_quirks[] _
},
{
.subvendor = 0x1014,
+ .subdevice = 0x0534,
+ .name = "ThinkPad X31",
+ .type = AC97_TUNE_INV_EAPD
+ },
+ {
+ .subvendor = 0x1014,
.subdevice = 0x1f00,
.name = "MS-9128",
.type = AC97_TUNE_ALC_JACK
^ permalink raw reply [flat|nested] 115+ messages in thread
* [090/114] netlink: fix compat recvmsg
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (88 preceding siblings ...)
2010-08-24 22:45 ` [089/114] ALSA: intel8x0: Mute External Amplifier by default for ThinkPad X31 Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [091/114] drm/radeon/kms: dont enable MSIs on AGP boards Greg KH
` (23 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric Dumazet, Johannes Berg,
David S. Miller
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Johannes Berg <johannes.berg@intel.com>
commit 68d6ac6d2740b6a55f3ae92a4e0be6d881904b32 upstream.
Since
commit 1dacc76d0014a034b8aca14237c127d7c19d7726
Author: Johannes Berg <johannes@sipsolutions.net>
Date: Wed Jul 1 11:26:02 2009 +0000
net/compat/wext: send different messages to compat tasks
we had a race condition when setting and then
restoring frag_list. Eric attempted to fix it,
but the fix created even worse problems.
However, the original motivation I had when I
added the code that turned out to be racy is
no longer clear to me, since we only copy up
to skb->len to userspace, which doesn't include
the frag_list length. As a result, not doing
any frag_list clearing and restoring avoids
the race condition, while not introducing any
other problems.
Additionally, while preparing this patch I found
that since none of the remaining netlink code is
really aware of the frag_list, we need to use the
original skb's information for packet information
and credentials. This fixes, for example, the
group information received by compat tasks.
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/netlink/af_netlink.c | 46 ++++++++++++++++------------------------------
1 file changed, 16 insertions(+), 30 deletions(-)
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1400,7 +1400,7 @@ static int netlink_recvmsg(struct kiocb
struct netlink_sock *nlk = nlk_sk(sk);
int noblock = flags&MSG_DONTWAIT;
size_t copied;
- struct sk_buff *skb, *frag __maybe_unused = NULL;
+ struct sk_buff *skb, *data_skb;
int err;
if (flags&MSG_OOB)
@@ -1412,45 +1412,35 @@ static int netlink_recvmsg(struct kiocb
if (skb == NULL)
goto out;
+ data_skb = skb;
+
#ifdef CONFIG_COMPAT_NETLINK_MESSAGES
if (unlikely(skb_shinfo(skb)->frag_list)) {
- bool need_compat = !!(flags & MSG_CMSG_COMPAT);
-
/*
- * If this skb has a frag_list, then here that means that
- * we will have to use the frag_list skb for compat tasks
- * and the regular skb for non-compat tasks.
+ * If this skb has a frag_list, then here that means that we
+ * will have to use the frag_list skb's data for compat tasks
+ * and the regular skb's data for normal (non-compat) tasks.
*
- * The skb might (and likely will) be cloned, so we can't
- * just reset frag_list and go on with things -- we need to
- * keep that. For the compat case that's easy -- simply get
- * a reference to the compat skb and free the regular one
- * including the frag. For the non-compat case, we need to
- * avoid sending the frag to the user -- so assign NULL but
- * restore it below before freeing the skb.
+ * If we need to send the compat skb, assign it to the
+ * 'data_skb' variable so that it will be used below for data
+ * copying. We keep 'skb' for everything else, including
+ * freeing both later.
*/
- if (need_compat) {
- struct sk_buff *compskb = skb_shinfo(skb)->frag_list;
- skb_get(compskb);
- kfree_skb(skb);
- skb = compskb;
- } else {
- frag = skb_shinfo(skb)->frag_list;
- skb_shinfo(skb)->frag_list = NULL;
- }
+ if (flags & MSG_CMSG_COMPAT)
+ data_skb = skb_shinfo(skb)->frag_list;
}
#endif
msg->msg_namelen = 0;
- copied = skb->len;
+ copied = data_skb->len;
if (len < copied) {
msg->msg_flags |= MSG_TRUNC;
copied = len;
}
- skb_reset_transport_header(skb);
- err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied);
+ skb_reset_transport_header(data_skb);
+ err = skb_copy_datagram_iovec(data_skb, 0, msg->msg_iov, copied);
if (msg->msg_name) {
struct sockaddr_nl *addr = (struct sockaddr_nl *)msg->msg_name;
@@ -1470,11 +1460,7 @@ static int netlink_recvmsg(struct kiocb
}
siocb->scm->creds = *NETLINK_CREDS(skb);
if (flags & MSG_TRUNC)
- copied = skb->len;
-
-#ifdef CONFIG_COMPAT_NETLINK_MESSAGES
- skb_shinfo(skb)->frag_list = frag;
-#endif
+ copied = data_skb->len;
skb_free_datagram(sk, skb);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [091/114] drm/radeon/kms: dont enable MSIs on AGP boards
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (89 preceding siblings ...)
2010-08-24 22:45 ` [090/114] netlink: fix compat recvmsg Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [092/114] drm/radeon/kms/pm: bail early if nothings changing Greg KH
` (22 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alex Deucher, Dave Airlie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alex Deucher <alexdeucher@gmail.com>
commit da7be684c55dbaeebfc1a048d5faf52d52cb3c1f upstream.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=29327
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_irq_kms.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -121,11 +121,12 @@ int radeon_irq_kms_init(struct radeon_de
* chips. Disable MSI on them for now.
*/
if ((rdev->family >= CHIP_RV380) &&
- (!(rdev->flags & RADEON_IS_IGP))) {
+ (!(rdev->flags & RADEON_IS_IGP)) &&
+ (!(rdev->flags & RADEON_IS_AGP))) {
int ret = pci_enable_msi(rdev->pdev);
if (!ret) {
rdev->msi_enabled = 1;
- DRM_INFO("radeon: using MSI.\n");
+ dev_info(rdev->dev, "radeon: using MSI.\n");
}
}
rdev->irq.installed = true;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [092/114] drm/radeon/kms/pm: bail early if nothings changing
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (90 preceding siblings ...)
2010-08-24 22:45 ` [091/114] drm/radeon/kms: dont enable MSIs on AGP boards Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [093/114] drm/radeon/kms: fix typo in radeon_compute_pll_gain Greg KH
` (21 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alex Deucher, Dave Airlie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alex Deucher <alexdeucher@gmail.com>
commit 4e186b2d6c878793587c35d7f06c94565d76e9b8 upstream.
If we aren't changing the power state, no need to take
locks and schedule fences, etc.
There seem to be lock ordering issues in the CP and
fence code in some cases; see bug 29140 below.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=29140
Possibly also:
https://bugzilla.kernel.org/show_bug.cgi?id=16581
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_pm.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/drivers/gpu/drm/radeon/radeon_pm.c
+++ b/drivers/gpu/drm/radeon/radeon_pm.c
@@ -224,6 +224,11 @@ static void radeon_pm_set_clocks(struct
{
int i;
+ /* no need to take locks, etc. if nothing's going to change */
+ if ((rdev->pm.requested_clock_mode_index == rdev->pm.current_clock_mode_index) &&
+ (rdev->pm.requested_power_state_index == rdev->pm.current_power_state_index))
+ return;
+
mutex_lock(&rdev->ddev->struct_mutex);
mutex_lock(&rdev->vram_mutex);
mutex_lock(&rdev->cp.mutex);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [093/114] drm/radeon/kms: fix typo in radeon_compute_pll_gain
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (91 preceding siblings ...)
2010-08-24 22:45 ` [092/114] drm/radeon/kms/pm: bail early if nothings changing Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [094/114] drm/radeon/kms/DCE3+: switch pads to ddc mode when going i2c Greg KH
` (20 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Benjamin Herrenschmidt,
Alex Deucher, Dave Airlie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alex Deucher <alexdeucher@gmail.com>
commit 0537398b211b4f040564beec458e23571042d335 upstream.
Looks like this got copied from the ddx wrong.
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
+++ b/drivers/gpu/drm/radeon/radeon_legacy_crtc.c
@@ -272,7 +272,7 @@ static uint8_t radeon_compute_pll_gain(u
if (!ref_div)
return 1;
- vcoFreq = ((unsigned)ref_freq & fb_div) / ref_div;
+ vcoFreq = ((unsigned)ref_freq * fb_div) / ref_div;
/*
* This is horribly crude: the VCO frequency range is divided into
^ permalink raw reply [flat|nested] 115+ messages in thread
* [094/114] drm/radeon/kms/DCE3+: switch pads to ddc mode when going i2c
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (92 preceding siblings ...)
2010-08-24 22:45 ` [093/114] drm/radeon/kms: fix typo in radeon_compute_pll_gain Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [095/114] drm/radeon/kms: fix sideport detection on newer rs880 boards Greg KH
` (19 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alex Deucher, Dave Airlie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alex Deucher <alexdeucher@gmail.com>
commit 5786e2c5a3f519647c50bbc276e45d36a704415a upstream.
The pins for ddc and aux are shared so you need to switch the
mode when doing ddc. The ProcessAuxChannel table already sets
the pin mode to DP. This should fix unreliable ddc issues
on DP ports using non-DP monitors.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_i2c.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/gpu/drm/radeon/radeon_i2c.c
+++ b/drivers/gpu/drm/radeon/radeon_i2c.c
@@ -95,6 +95,13 @@ static void radeon_i2c_do_lock(struct ra
}
}
+ /* switch the pads to ddc mode */
+ if (ASIC_IS_DCE3(rdev) && rec->hw_capable) {
+ temp = RREG32(rec->mask_clk_reg);
+ temp &= ~(1 << 16);
+ WREG32(rec->mask_clk_reg, temp);
+ }
+
/* clear the output pin values */
temp = RREG32(rec->a_clk_reg) & ~rec->a_clk_mask;
WREG32(rec->a_clk_reg, temp);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [095/114] drm/radeon/kms: fix sideport detection on newer rs880 boards
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (93 preceding siblings ...)
2010-08-24 22:45 ` [094/114] drm/radeon/kms/DCE3+: switch pads to ddc mode when going i2c Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [096/114] drm/radeon/kms: fix GTT/VRAM overlapping test Greg KH
` (18 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alex Deucher, Dave Airlie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alex Deucher <alexdeucher@gmail.com>
commit 4b80d954a7e54c13a5063af18d01719ad6a0daf3 upstream.
The meaning of ucMemoryType changed on recent boards, however,
ulBootUpSidePortClock should be set properly across all boards.
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_atombios.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/radeon/radeon_atombios.c
+++ b/drivers/gpu/drm/radeon/radeon_atombios.c
@@ -1059,7 +1059,7 @@ bool radeon_atombios_sideport_present(st
}
break;
case 2:
- if (igp_info->info_2.ucMemoryType & 0x0f)
+ if (igp_info->info_2.ulBootUpSidePortClock)
return true;
break;
default:
^ permalink raw reply [flat|nested] 115+ messages in thread
* [096/114] drm/radeon/kms: fix GTT/VRAM overlapping test
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (94 preceding siblings ...)
2010-08-24 22:45 ` [095/114] drm/radeon/kms: fix sideport detection on newer rs880 boards Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [097/114] drm: stop information leak of old kernel stack Greg KH
` (17 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jerome Glisse, Dave Airlie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jerome Glisse <jglisse@redhat.com>
commit 2cbeb4efc2b9739fe6019b613ae658bd2119a3eb upstream.
GTT/VRAM overlapping test had a typo which leaded to not
detecting case when vram_end > gtt_end. This patch fix the
logic and should fix #16574
Signed-off-by: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/radeon/radeon_device.c
+++ b/drivers/gpu/drm/radeon/radeon_device.c
@@ -199,7 +199,7 @@ void radeon_vram_location(struct radeon_
mc->mc_vram_size = mc->aper_size;
}
mc->vram_end = mc->vram_start + mc->mc_vram_size - 1;
- if (rdev->flags & RADEON_IS_AGP && mc->vram_end > mc->gtt_start && mc->vram_end <= mc->gtt_end) {
+ if (rdev->flags & RADEON_IS_AGP && mc->vram_end > mc->gtt_start && mc->vram_start <= mc->gtt_end) {
dev_warn(rdev->dev, "limiting VRAM to PCI aperture size\n");
mc->real_vram_size = mc->aper_size;
mc->mc_vram_size = mc->aper_size;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [097/114] drm: stop information leak of old kernel stack.
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (95 preceding siblings ...)
2010-08-24 22:45 ` [096/114] drm/radeon/kms: fix GTT/VRAM overlapping test Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [098/114] Staging: batman-adv: unify orig_hash_lock spinlock handling to avoid deadlocks Greg KH
` (16 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Dave Airlie
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dave Airlie <airlied@redhat.com>
commit b9f0aee83335db1f3915f4e42a5e21b351740afd upstream.
non-critical issue, CVE-2010-2803
Userspace controls the amount of memory to be allocate, so it can
get the ioctl to allocate more memory than the kernel uses, and get
access to kernel stack. This can only be done for processes authenticated
to the X server for DRI access, and if the user has DRI access.
Fix is to just memset the data to 0 if the user doesn't copy into
it in the first place.
Reported-by: Kees Cook <kees@ubuntu.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/drm_drv.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/drm_drv.c
+++ b/drivers/gpu/drm/drm_drv.c
@@ -502,7 +502,9 @@ long drm_ioctl(struct file *filp,
retcode = -EFAULT;
goto err_i1;
}
- }
+ } else
+ memset(kdata, 0, _IOC_SIZE(cmd));
+
if (ioctl->flags & DRM_UNLOCKED)
retcode = func(dev, kdata, file_priv);
else {
^ permalink raw reply [flat|nested] 115+ messages in thread
* [098/114] Staging: batman-adv: unify orig_hash_lock spinlock handling to avoid deadlocks
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (96 preceding siblings ...)
2010-08-24 22:45 ` [097/114] drm: stop information leak of old kernel stack Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [099/114] Staging: batman-adv: Create batman_if only on register event Greg KH
` (15 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Marek Lindner,
Sven Eckelmann
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marek Lindner <lindner_marek@yahoo.de>
commit 9abc10238e1df7ce81c58a441f65efd5e905b9e8 upstream.
The orig_hash_lock spinlock always has to be locked with IRQs being
disabled to avoid deadlocks between code that is being executed in
IRQ context and code that is being executed in non-IRQ context.
Reported-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/originator.c | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
--- a/drivers/staging/batman-adv/originator.c
+++ b/drivers/staging/batman-adv/originator.c
@@ -401,11 +401,12 @@ static int orig_node_add_if(struct orig_
int orig_hash_add_if(struct batman_if *batman_if, int max_if_num)
{
struct orig_node *orig_node;
+ unsigned long flags;
HASHIT(hashit);
/* resize all orig nodes because orig_node->bcast_own(_sum) depend on
* if_num */
- spin_lock(&orig_hash_lock);
+ spin_lock_irqsave(&orig_hash_lock, flags);
while (hash_iterate(orig_hash, &hashit)) {
orig_node = hashit.bucket->data;
@@ -414,11 +415,11 @@ int orig_hash_add_if(struct batman_if *b
goto err;
}
- spin_unlock(&orig_hash_lock);
+ spin_unlock_irqrestore(&orig_hash_lock, flags);
return 0;
err:
- spin_unlock(&orig_hash_lock);
+ spin_unlock_irqrestore(&orig_hash_lock, flags);
return -ENOMEM;
}
@@ -480,12 +481,13 @@ int orig_hash_del_if(struct batman_if *b
{
struct batman_if *batman_if_tmp;
struct orig_node *orig_node;
+ unsigned long flags;
HASHIT(hashit);
int ret;
/* resize all orig nodes because orig_node->bcast_own(_sum) depend on
* if_num */
- spin_lock(&orig_hash_lock);
+ spin_lock_irqsave(&orig_hash_lock, flags);
while (hash_iterate(orig_hash, &hashit)) {
orig_node = hashit.bucket->data;
@@ -512,10 +514,10 @@ int orig_hash_del_if(struct batman_if *b
rcu_read_unlock();
batman_if->if_num = -1;
- spin_unlock(&orig_hash_lock);
+ spin_unlock_irqrestore(&orig_hash_lock, flags);
return 0;
err:
- spin_unlock(&orig_hash_lock);
+ spin_unlock_irqrestore(&orig_hash_lock, flags);
return -ENOMEM;
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [099/114] Staging: batman-adv: Create batman_if only on register event
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (97 preceding siblings ...)
2010-08-24 22:45 ` [098/114] Staging: batman-adv: unify orig_hash_lock spinlock handling to avoid deadlocks Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [100/114] Staging: batman-adv: Dont use net_dev after dev_put Greg KH
` (14 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Sven Eckelmann
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sven Eckelmann <sven.eckelmann@gmx.de>
commit 1189f130f89b73eecb6117c0fc5e90abbcb7faa0 upstream.
We try to get all events for all net_devices to be able to add special
sysfs folders for the batman-adv configuration. This also includes such
events like NETDEV_POST_INIT which has no valid kobject according to
v2.6.32-rc3-13-g7ffbe3f. This would create an oops in that situation.
It is enough to create the batman_if only on NETDEV_REGISTER events
because we will also receive those events for devices which already
existed when we registered the notifier call.
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/hard-interface.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/drivers/staging/batman-adv/hard-interface.c
+++ b/drivers/staging/batman-adv/hard-interface.c
@@ -397,15 +397,13 @@ static int hard_if_event(struct notifier
/* FIXME: each batman_if will be attached to a softif */
struct bat_priv *bat_priv = netdev_priv(soft_device);
- if (!batman_if)
- batman_if = hardif_add_interface(net_dev);
+ if (!batman_if && event == NETDEV_REGISTER)
+ batman_if = hardif_add_interface(net_dev);
if (!batman_if)
goto out;
switch (event) {
- case NETDEV_REGISTER:
- break;
case NETDEV_UP:
hardif_activate_interface(bat_priv, batman_if);
break;
^ permalink raw reply [flat|nested] 115+ messages in thread
* [100/114] Staging: batman-adv: Dont use net_dev after dev_put
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (98 preceding siblings ...)
2010-08-24 22:45 ` [099/114] Staging: batman-adv: Create batman_if only on register event Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [101/114] Staging: batman-adv: Dont write in not allocated packet_buff Greg KH
` (13 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Sven Eckelmann
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sven Eckelmann <sven.eckelmann@gmx.de>
commit 51a00eaf6e008b60943af6ab68c17ac3622208dc upstream.
dev_put allows a device to be freed when all its references are dropped.
After that we are not allowed to access that information anymore. Access
to the data structure of a net_device must be surrounded a dev_hold
and ended using dev_put.
batman-adv adds a device to its own management structure in
hardif_add_interface and will release it in hardif_remove_interface.
Thus it must hold a reference all the time between those functions to
prevent any access to the already released net_device structure.
Reported-by: Tim Glaremin <Tim.Glaremin@web.de>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/hard-interface.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/drivers/staging/batman-adv/hard-interface.c
+++ b/drivers/staging/batman-adv/hard-interface.c
@@ -194,8 +194,6 @@ static void hardif_activate_interface(st
if (batman_if->if_status != IF_INACTIVE)
return;
- dev_hold(batman_if->net_dev);
-
update_mac_addresses(batman_if);
batman_if->if_status = IF_TO_BE_ACTIVATED;
@@ -222,8 +220,6 @@ static void hardif_deactivate_interface(
(batman_if->if_status != IF_TO_BE_ACTIVATED))
return;
- dev_put(batman_if->net_dev);
-
batman_if->if_status = IF_INACTIVE;
printk(KERN_INFO "batman-adv:Interface deactivated: %s\n",
@@ -321,12 +317,14 @@ static struct batman_if *hardif_add_inte
if (ret != 1)
goto out;
+ dev_hold(net_dev);
+
batman_if = kmalloc(sizeof(struct batman_if), GFP_ATOMIC);
if (!batman_if) {
printk(KERN_ERR "batman-adv:"
"Can't add interface (%s): out of memory\n",
net_dev->name);
- goto out;
+ goto release_dev;
}
batman_if->dev = kstrdup(net_dev->name, GFP_ATOMIC);
@@ -350,6 +348,8 @@ free_dev:
kfree(batman_if->dev);
free_if:
kfree(batman_if);
+release_dev:
+ dev_put(net_dev);
out:
return NULL;
}
@@ -378,6 +378,7 @@ static void hardif_remove_interface(stru
batman_if->if_status = IF_TO_BE_REMOVED;
list_del_rcu(&batman_if->list);
sysfs_del_hardif(&batman_if->hardif_obj);
+ dev_put(batman_if->net_dev);
call_rcu(&batman_if->rcu, hardif_free_interface);
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [101/114] Staging: batman-adv: Dont write in not allocated packet_buff
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (99 preceding siblings ...)
2010-08-24 22:45 ` [100/114] Staging: batman-adv: Dont use net_dev after dev_put Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [102/114] powerpc: Fix typo in uImage target Greg KH
` (12 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Sven Eckelmann
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sven Eckelmann <sven.eckelmann@gmx.de>
commit f86b9984250fa2b71ce36d4693a939a58579583b upstream.
Each net_device in a system will automatically managed as a possible
batman_if and holds different informations like a buffer with a prepared
originator messages. To reduce the memory usage, the packet_buff will
only be allocated when the interface is really added/enabled for
batman-adv.
The function to update the hw address information inside the packet_buff
just assumes that the packet_buff is always initialised and thus the
kernel will just oops when we try to change the hw address of a not
already fully enabled interface.
We must always check if the packet_buff is allocated before we try to
change information inside of it.
Reported-by: Tim Glaremin <Tim.Glaremin@web.de>
Reported-by: Kazuki Shimada <zukky@bb.banban.jp>
Signed-off-by: Sven Eckelmann <sven.eckelmann@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/batman-adv/hard-interface.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/staging/batman-adv/hard-interface.c
+++ b/drivers/staging/batman-adv/hard-interface.c
@@ -128,6 +128,9 @@ static bool hardif_is_iface_up(struct ba
static void update_mac_addresses(struct batman_if *batman_if)
{
+ if (!batman_if || !batman_if->packet_buff)
+ return;
+
addr_to_string(batman_if->addr_str, batman_if->net_dev->dev_addr);
memcpy(((struct batman_packet *)(batman_if->packet_buff))->orig,
@@ -338,6 +341,7 @@ static struct batman_if *hardif_add_inte
batman_if->if_num = -1;
batman_if->net_dev = net_dev;
batman_if->if_status = IF_NOT_IN_USE;
+ batman_if->packet_buff = NULL;
INIT_LIST_HEAD(&batman_if->list);
check_known_mac_addr(batman_if->net_dev->dev_addr);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [102/114] powerpc: Fix typo in uImage target
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (100 preceding siblings ...)
2010-08-24 22:45 ` [101/114] Staging: batman-adv: Dont write in not allocated packet_buff Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [103/114] powerpc: Initialise paca->kstack before early_setup_secondary Greg KH
` (11 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Anatolij Gustschin,
Benjamin Herrenschmidt
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Anatolij Gustschin <agust@denx.de>
commit c686ecf5040d287a68d4fca7f1948472f556a6d3 upstream.
Commit e32e78c5ee8aadef020fbaecbe6fb741ed9029fd
(powerpc: fix build with make 3.82) introduced a
typo in uImage target and broke building uImage:
make: *** No rule to make target `uImage'. Stop.
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/powerpc/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -164,7 +164,7 @@ drivers-$(CONFIG_OPROFILE) += arch/power
all: zImage
# With make 3.82 we cannot mix normal and wildcard targets
-BOOT_TARGETS1 := zImage zImage.initrd uImaged
+BOOT_TARGETS1 := zImage zImage.initrd uImage
BOOT_TARGETS2 := zImage% dtbImage% treeImage.% cuImage.% simpleImage.%
PHONY += $(BOOT_TARGETS1) $(BOOT_TARGETS2)
^ permalink raw reply [flat|nested] 115+ messages in thread
* [103/114] powerpc: Initialise paca->kstack before early_setup_secondary
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (101 preceding siblings ...)
2010-08-24 22:45 ` [102/114] powerpc: Fix typo in uImage target Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [104/114] USB: option: add Celot CT-650 Greg KH
` (10 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Matt Evans,
Benjamin Herrenschmidt
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Matt Evans <matt@ozlabs.org>
commit f761622e59433130bc33ad086ce219feee9eb961 upstream.
As early setup calls down to slb_initialize(), we must have kstack
initialised before checking "should we add a bolted SLB entry for our kstack?"
Failing to do so means stack access requires an SLB miss exception to refill
an entry dynamically, if the stack isn't accessible via SLB(0) (kernel text
& static data). It's not always allowable to take such a miss, and
intermittent crashes will result.
Primary CPUs don't have this issue; an SLB entry is not bolted for their
stack anyway (as that lives within SLB(0)). This patch therefore only
affects the init of secondaries.
Signed-off-by: Matt Evans <matt@ozlabs.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/powerpc/kernel/head_64.S | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -572,9 +572,6 @@ __secondary_start:
/* Set thread priority to MEDIUM */
HMT_MEDIUM
- /* Do early setup for that CPU (stab, slb, hash table pointer) */
- bl .early_setup_secondary
-
/* Initialize the kernel stack. Just a repeat for iSeries. */
LOAD_REG_ADDR(r3, current_set)
sldi r28,r24,3 /* get current_set[cpu#] */
@@ -582,6 +579,9 @@ __secondary_start:
addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD
std r1,PACAKSAVE(r13)
+ /* Do early setup for that CPU (stab, slb, hash table pointer) */
+ bl .early_setup_secondary
+
/* Clear backchain so we get nice backtraces */
li r7,0
mtlr r7
^ permalink raw reply [flat|nested] 115+ messages in thread
* [104/114] USB: option: add Celot CT-650
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (102 preceding siblings ...)
2010-08-24 22:45 ` [103/114] powerpc: Initialise paca->kstack before early_setup_secondary Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [105/114] USB: add device IDs for igotu to navman Greg KH
` (9 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Michael Tokarev
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Tokarev <mjt@tls.msk.ru>
commit 76078dc4fc389185fe467d33428f259ea9e69807 upstream.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/option.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -368,6 +368,10 @@ static void option_instat_callback(struc
#define OLIVETTI_VENDOR_ID 0x0b3c
#define OLIVETTI_PRODUCT_OLICARD100 0xc000
+/* Celot products */
+#define CELOT_VENDOR_ID 0x211f
+#define CELOT_PRODUCT_CT680M 0x6801
+
/* some devices interfaces need special handling due to a number of reasons */
enum option_blacklist_reason {
OPTION_BLACKLIST_NONE = 0,
@@ -891,10 +895,9 @@ static const struct usb_device_id option
{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_100F) },
{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1011)},
{ USB_DEVICE(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_1012)},
-
{ USB_DEVICE(CINTERION_VENDOR_ID, 0x0047) },
-
{ USB_DEVICE(OLIVETTI_VENDOR_ID, OLIVETTI_PRODUCT_OLICARD100) },
+ { USB_DEVICE(CELOT_VENDOR_ID, CELOT_PRODUCT_CT680M) }, /* CT-650 CDMA 450 1xEVDO modem */
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, option_ids);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [105/114] USB: add device IDs for igotu to navman
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (103 preceding siblings ...)
2010-08-24 22:45 ` [104/114] USB: option: add Celot CT-650 Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [106/114] USB: pl2303: New vendor and product id Greg KH
` (8 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ross Burton <ross@linux.intel.com>
commit 0eee6a2b2a52e17066a572d30ad2805d3ebc7508 upstream.
I recently bought a i-gotU USB GPS, and whilst hunting around for linux
support discovered this post by you back in 2009:
http://kerneltrap.org/mailarchive/linux-usb/2009/3/12/5148644
>Try the navman driver instead. You can either add the device id to the
> driver and rebuild it, or do this before you plug the device in:
> modprobe navman
> echo -n "0x0df7 0x0900" > /sys/bus/usb-serial/drivers/navman/new_id
>
> and then plug your device in and see if that works.
I can confirm that the navman driver works with the right device IDs on
my i-gotU GT-600, which has the same device IDs. Attached is a patch
adding the IDs.
From: Ross Burton <ross@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/navman.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/usb/serial/navman.c
+++ b/drivers/usb/serial/navman.c
@@ -25,6 +25,7 @@ static int debug;
static const struct usb_device_id id_table[] = {
{ USB_DEVICE(0x0a99, 0x0001) }, /* Talon Technology device */
+ { USB_DEVICE(0x0df7, 0x0900) }, /* Mobile Action i-gotU */
{ },
};
MODULE_DEVICE_TABLE(usb, id_table);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [106/114] USB: pl2303: New vendor and product id
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (104 preceding siblings ...)
2010-08-24 22:45 ` [105/114] USB: add device IDs for igotu to navman Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [107/114] USB: CP210x Fix Break On/Off Greg KH
` (7 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Jef Driesen
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jef Driesen <jefdriesen@telenet.be>
commit f36ecd5de93e4c85a9e3d25100c6e233155b12e5 upstream.
Add support for the Zeagle N2iTiON3 dive computer interface. Since
Zeagle devices are actually manufactured by Seiko, this patch will
support other Seiko based models as well.
Signed-off-by: Jef Driesen <jefdriesen@telenet.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/pl2303.c | 1 +
drivers/usb/serial/pl2303.h | 4 ++++
2 files changed, 5 insertions(+)
--- a/drivers/usb/serial/pl2303.c
+++ b/drivers/usb/serial/pl2303.c
@@ -86,6 +86,7 @@ static const struct usb_device_id id_tab
{ USB_DEVICE(SUPERIAL_VENDOR_ID, SUPERIAL_PRODUCT_ID) },
{ USB_DEVICE(HP_VENDOR_ID, HP_LD220_PRODUCT_ID) },
{ USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) },
+ { USB_DEVICE(ZEAGLE_VENDOR_ID, ZEAGLE_N2ITION3_PRODUCT_ID) },
{ USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) },
{ USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) },
{ USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) },
--- a/drivers/usb/serial/pl2303.h
+++ b/drivers/usb/serial/pl2303.h
@@ -128,6 +128,10 @@
#define CRESSI_VENDOR_ID 0x04b8
#define CRESSI_EDY_PRODUCT_ID 0x0521
+/* Zeagle dive computer interface */
+#define ZEAGLE_VENDOR_ID 0x04b8
+#define ZEAGLE_N2ITION3_PRODUCT_ID 0x0522
+
/* Sony, USB data cable for CMD-Jxx mobile phones */
#define SONY_VENDOR_ID 0x054c
#define SONY_QN3USB_PRODUCT_ID 0x0437
^ permalink raw reply [flat|nested] 115+ messages in thread
* [107/114] USB: CP210x Fix Break On/Off
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (105 preceding siblings ...)
2010-08-24 22:45 ` [106/114] USB: pl2303: New vendor and product id Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [108/114] USB: ftdi_sio: fix endianess of max packet size Greg KH
` (6 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Craig Shelley
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Craig Shelley <craig@microtron.org.uk>
commit 72916791cbeb9cc607ae620cfba207dea481cd76 upstream.
The definitions for BREAK_ON and BREAK_OFF are inverted, causing break
requests to fail. This patch sets BREAK_ON and BREAK_OFF to the correct
values.
Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/cp210x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/usb/serial/cp210x.c
+++ b/drivers/usb/serial/cp210x.c
@@ -222,8 +222,8 @@ static struct usb_serial_driver cp210x_d
#define BITS_STOP_2 0x0002
/* CP210X_SET_BREAK */
-#define BREAK_ON 0x0000
-#define BREAK_OFF 0x0001
+#define BREAK_ON 0x0001
+#define BREAK_OFF 0x0000
/* CP210X_(SET_MHS|GET_MDMSTS) */
#define CONTROL_DTR 0x0001
^ permalink raw reply [flat|nested] 115+ messages in thread
* [108/114] USB: ftdi_sio: fix endianess of max packet size
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (106 preceding siblings ...)
2010-08-24 22:45 ` [107/114] USB: CP210x Fix Break On/Off Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [109/114] USB: io_ti: check firmware version before updating Greg KH
` (5 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Michael Wileczka
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Wileczka <mikewileczka@yahoo.com>
commit d1ab903d2552b2362339b19203c7f01c797cb316 upstream.
The USB max packet size (always little-endian) was not being byte
swapped on big-endian systems.
Applicable since [USB: ftdi_sio: fix hi-speed device packet size calculation] approx 2.6.31
Signed-off-by: Michael Wileczka <mikewileczka@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/ftdi_sio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -1376,7 +1376,7 @@ static void ftdi_set_max_packet_size(str
}
/* set max packet size based on descriptor */
- priv->max_packet_size = ep_desc->wMaxPacketSize;
+ priv->max_packet_size = le16_to_cpu(ep_desc->wMaxPacketSize);
dev_info(&udev->dev, "Setting MaxPacketSize %d\n", priv->max_packet_size);
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [109/114] USB: io_ti: check firmware version before updating
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (107 preceding siblings ...)
2010-08-24 22:45 ` [108/114] USB: ftdi_sio: fix endianess of max packet size Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [110/114] USB: xhci: Remove buggy assignment in next_trb() Greg KH
` (4 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Alan Stern
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Greg Kroah-Hartman <gregkh@suse.de>
commit 0827a9ff2bbcbb03c33f1a6eb283fe051059482c upstream.
If we can't read the firmware for a device from the disk, and yet the
device already has a valid firmware image in it, we don't want to
replace the firmware with something invalid. So check the version
number to be less than the current one to verify this is the correct
thing to do.
Reported-by: Chris Beauchamp <chris@chillibean.tv>
Tested-by: Chris Beauchamp <chris@chillibean.tv>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/io_ti.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/serial/io_ti.c
+++ b/drivers/usb/serial/io_ti.c
@@ -1151,7 +1151,7 @@ static int download_fw(struct edgeport_s
/* Check if we have an old version in the I2C and
update if necessary */
- if (download_cur_ver != download_new_ver) {
+ if (download_cur_ver < download_new_ver) {
dbg("%s - Update I2C dld from %d.%d to %d.%d",
__func__,
firmware_version->Ver_Major,
^ permalink raw reply [flat|nested] 115+ messages in thread
* [110/114] USB: xhci: Remove buggy assignment in next_trb()
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (108 preceding siblings ...)
2010-08-24 22:45 ` [109/114] USB: io_ti: check firmware version before updating Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [111/114] USB: ftdi_sio: Add ID for Ionics PlugComputer Greg KH
` (3 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, John Youn, Sarah Sharp
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: John Youn <John.Youn@synopsys.com>
commit a1669b2c64a9c8b031e0ac5cbf2692337a577f7c upstream.
The code to increment the TRB pointer has a slight ambiguity that could
lead to a bug on different compilers. The ANSI C specification does not
specify the precedence of the assignment operator over the postfix
operator. gcc 4.4 produced the correct code (increment the pointer and
assign the value), but a MIPS compiler that one of John's clients used
assigned the old (unincremented) value.
Remove the unnecessary assignment to make all compilers produce the
correct assembly.
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/xhci-ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/usb/host/xhci-ring.c
+++ b/drivers/usb/host/xhci-ring.c
@@ -131,7 +131,7 @@ static void next_trb(struct xhci_hcd *xh
*seg = (*seg)->next;
*trb = ((*seg)->trbs);
} else {
- *trb = (*trb)++;
+ (*trb)++;
}
}
^ permalink raw reply [flat|nested] 115+ messages in thread
* [111/114] USB: ftdi_sio: Add ID for Ionics PlugComputer
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (109 preceding siblings ...)
2010-08-24 22:45 ` [110/114] USB: xhci: Remove buggy assignment in next_trb() Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [112/114] USB: ftdi_sio: add product ID for Lenz LI-USB Greg KH
` (2 subsequent siblings)
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Martin Michlmayr
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Martin Michlmayr <tbm@cyrius.com>
commit 666cc076d284e32d11bfc5ea2fbfc50434cff051 upstream.
Add the ID for the Ionics PlugComputer (<http://ionicsplug.com/>).
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/ftdi_sio.c | 2 ++
drivers/usb/serial/ftdi_sio_ids.h | 6 ++++++
2 files changed, 8 insertions(+)
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -750,6 +750,8 @@ static struct usb_device_id id_table_com
{ USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID),
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
{ USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) },
+ { USB_DEVICE(IONICS_VID, IONICS_PLUGCOMPUTER_PID),
+ .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
{ }, /* Optional parameter entry */
{ } /* Terminating entry */
};
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -989,6 +989,12 @@
#define ALTI2_N3_PID 0x6001 /* Neptune 3 */
/*
+ * Ionics PlugComputer
+ */
+#define IONICS_VID 0x1c0c
+#define IONICS_PLUGCOMPUTER_PID 0x0102
+
+/*
* Dresden Elektronik Sensor Terminal Board
*/
#define DE_VID 0x1cf1 /* Vendor ID */
^ permalink raw reply [flat|nested] 115+ messages in thread
* [112/114] USB: ftdi_sio: add product ID for Lenz LI-USB
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (110 preceding siblings ...)
2010-08-24 22:45 ` [111/114] USB: ftdi_sio: Add ID for Ionics PlugComputer Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [113/114] mutex: Improve the scalability of optimistic spinning Greg KH
2010-08-24 22:45 ` [114/114] tracing: Fix timer tracing Greg KH
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan, Galen Seitz
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Galen Seitz <galens@seitzassoc.com>
commit ea233f805537f5da16c2b34d85b6c5cf88a0f9aa upstream.
Add ftdi product ID for Lenz LI-USB, a model train interface. This
was NOT tested against 2.6.35, but a similar patch was tested with the
CentOS 2.6.18-194.11.1.el5 kernel. It wasn't clear to me what
ordering is being used in ftdi_sio.c, so I inserted the ID after another
model train entry(SPROG_II).
Signed-off-by: Galen Seitz <galens@seitzassoc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/ftdi_sio.c | 1 +
drivers/usb/serial/ftdi_sio_ids.h | 3 +++
2 files changed, 4 insertions(+)
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -180,6 +180,7 @@ static struct usb_device_id id_table_com
{ USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_IOBOARD_PID) },
{ USB_DEVICE(INTERBIOMETRICS_VID, INTERBIOMETRICS_MINI_IOBOARD_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_SPROG_II) },
+ { USB_DEVICE(FTDI_VID, FTDI_LENZ_LIUSB_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_XF_632_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_XF_634_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_XF_547_PID) },
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -110,6 +110,9 @@
/* Propox devices */
#define FTDI_PROPOX_JTAGCABLEII_PID 0xD738
+/* Lenz LI-USB Computer Interface. */
+#define FTDI_LENZ_LIUSB_PID 0xD780
+
/*
* Xsens Technologies BV products (http://www.xsens.com).
*/
^ permalink raw reply [flat|nested] 115+ messages in thread
* [113/114] mutex: Improve the scalability of optimistic spinning
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (111 preceding siblings ...)
2010-08-24 22:45 ` [112/114] USB: ftdi_sio: add product ID for Lenz LI-USB Greg KH
@ 2010-08-24 22:45 ` Greg KH
2010-08-24 22:45 ` [114/114] tracing: Fix timer tracing Greg KH
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tim Chen, Peter Zijlstra,
Thomas Gleixner, Frederic Weisbecker, Ingo Molnar
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 5297 bytes --]
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tim Chen <tim.c.chen@linux.intel.com>
commit 9d0f4dcc5c4d1c5dd01172172684a45b5f49d740 upstream.
There is a scalability issue for current implementation of optimistic
mutex spin in the kernel. It is found on a 8 node 64 core Nehalem-EX
system (HT mode).
The intention of the optimistic mutex spin is to busy wait and spin on a
mutex if the owner of the mutex is running, in the hope that the mutex
will be released soon and be acquired, without the thread trying to
acquire mutex going to sleep. However, when we have a large number of
threads, contending for the mutex, we could have the mutex grabbed by
other thread, and then another ……, and we will keep spinning, wasting cpu
cycles and adding to the contention. One possible fix is to quit
spinning and put the current thread on wait-list if mutex lock switch to
a new owner while we spin, indicating heavy contention (see the patch
included).
I did some testing on a 8 socket Nehalem-EX system with a total of 64
cores. Using Ingo's test-mutex program that creates/delete files with 256
threads (http://lkml.org/lkml/2006/1/8/50) , I see the following speed up
after putting in the mutex spin fix:
./mutex-test V 256 10
Ops/sec
2.6.34 62864
With fix 197200
Repeating the test with Aim7 fserver workload, again there is a speed up
with the fix:
Jobs/min
2.6.34 91657
With fix 149325
To look at the impact on the distribution of mutex acquisition time, I
collected the mutex acquisition time on Aim7 fserver workload with some
instrumentation. The average acquisition time is reduced by 48% and
number of contentions reduced by 32%.
#contentions Time to acquire mutex (cycles)
2.6.34 72973 44765791
With fix 49210 23067129
The histogram of mutex acquisition time is listed below. The acquisition
time is in 2^bin cycles. We see that without the fix, the acquisition
time is mostly around 2^26 cycles. With the fix, we the distribution get
spread out a lot more towards the lower cycles, starting from 2^13.
However, there is an increase of the tail distribution with the fix at
2^28 and 2^29 cycles. It seems a small price to pay for the reduced
average acquisition time and also getting the cpu to do useful work.
Mutex acquisition time distribution (acq time = 2^bin cycles):
2.6.34 With Fix
bin #occurrence % #occurrence %
11 2 0.00% 120 0.24%
12 10 0.01% 790 1.61%
13 14 0.02% 2058 4.18%
14 86 0.12% 3378 6.86%
15 393 0.54% 4831 9.82%
16 710 0.97% 4893 9.94%
17 815 1.12% 4667 9.48%
18 790 1.08% 5147 10.46%
19 580 0.80% 6250 12.70%
20 429 0.59% 6870 13.96%
21 311 0.43% 1809 3.68%
22 255 0.35% 2305 4.68%
23 317 0.44% 916 1.86%
24 610 0.84% 233 0.47%
25 3128 4.29% 95 0.19%
26 63902 87.69% 122 0.25%
27 619 0.85% 286 0.58%
28 0 0.00% 3536 7.19%
29 0 0.00% 903 1.83%
30 0 0.00% 0 0.00%
I've done similar experiments with 2.6.35 kernel on smaller boxes as
well. One is on a dual-socket Westmere box (12 cores total, with HT).
Another experiment is on an old dual-socket Core 2 box (4 cores total, no
HT)
On the 12-core Westmere box, I see a 250% increase for Ingo's mutex-test
program with my mutex patch but no significant difference in aim7's
fserver workload.
On the 4-core Core 2 box, I see the difference with the patch for both
mutex-test and aim7 fserver are negligible.
So far, it seems like the patch has not caused regression on smaller
systems.
Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
LKML-Reference: <1282168827.9542.72.camel@schen9-DESK>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/sched.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3694,8 +3694,16 @@ int mutex_spin_on_owner(struct mutex *lo
/*
* Owner changed, break to re-assess state.
*/
- if (lock->owner != owner)
+ if (lock->owner != owner) {
+ /*
+ * If the lock has switched to a different owner,
+ * we likely have heavy contention. Return 0 to quit
+ * optimistic spinning and not contend further:
+ */
+ if (lock->owner)
+ return 0;
break;
+ }
/*
* Is that owner really running on that cpu?
^ permalink raw reply [flat|nested] 115+ messages in thread
* [114/114] tracing: Fix timer tracing
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
` (112 preceding siblings ...)
2010-08-24 22:45 ` [113/114] mutex: Improve the scalability of optimistic spinning Greg KH
@ 2010-08-24 22:45 ` Greg KH
113 siblings, 0 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:45 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Arjan van de Ven,
xiaoguangrong, Steven Rostedt, Frederic Weisbecker,
Peter Zijlstra, Ingo Molnar
2.6.35-stable review patch. If anyone has any objections, please let us know.
------------------
From: Arjan van de Ven <arjan@linux.intel.com>
commit ede1b4290781ae82ccf0f2ecc6dada8d3dd35779 upstream.
PowerTOP would like to be able to trace timers.
Unfortunately, the current timer tracing is not very useful: the
actual timer function is not recorded in the trace at the start
of timer execution.
Although this is recorded for timer "start" time (when it gets
armed), this is not useful; most timers get started early, and a
tracer like PowerTOP will never see this event, but will only
see the actual running of the timer.
This patch just adds the function to the timer tracing; I've
verified with PowerTOP that now it can get useful information
about timers.
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Cc: xiaoguangrong@cn.fujitsu.com
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <4C6C5FA9.3000405@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/trace/events/timer.h | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/include/trace/events/timer.h
+++ b/include/trace/events/timer.h
@@ -74,14 +74,16 @@ TRACE_EVENT(timer_expire_entry,
TP_STRUCT__entry(
__field( void *, timer )
__field( unsigned long, now )
+ __field( void *, function)
),
TP_fast_assign(
__entry->timer = timer;
__entry->now = jiffies;
+ __entry->function = timer->function;
),
- TP_printk("timer=%p now=%lu", __entry->timer, __entry->now)
+ TP_printk("timer=%p function=%pf now=%lu", __entry->timer, __entry->function,__entry->now)
);
/**
@@ -213,14 +215,16 @@ TRACE_EVENT(hrtimer_expire_entry,
TP_STRUCT__entry(
__field( void *, hrtimer )
__field( s64, now )
+ __field( void *, function)
),
TP_fast_assign(
__entry->hrtimer = hrtimer;
__entry->now = now->tv64;
+ __entry->function = hrtimer->function;
),
- TP_printk("hrtimer=%p now=%llu", __entry->hrtimer,
+ TP_printk("hrtimer=%p function=%pf now=%llu", __entry->hrtimer, __entry->function,
(unsigned long long)ktime_to_ns((ktime_t) { .tv64 = __entry->now }))
);
^ permalink raw reply [flat|nested] 115+ messages in thread
* [000/114] 2.6.35.4-stable review
@ 2010-08-24 22:46 Greg KH
2010-08-24 22:44 ` [001/114] memstick: init sysfs attributes Greg KH
` (113 more replies)
0 siblings, 114 replies; 115+ messages in thread
From: Greg KH @ 2010-08-24 22:46 UTC (permalink / raw)
To: linux-kernel, stable; +Cc: stable-review, torvalds, akpm, alan
This is the start of the stable review cycle for the 2.6.35.4 release.
There are 114 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 us know. If anyone is a maintainer of the proper subsystem, and
wants to add a Signed-off-by: line to the patch, please respond with it.
Responses should be made by Thursday, August 26, 2010 22:00:00 UTC
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/v2.6/stable-review/patch-2.6.35.4-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
Makefile | 2 +-
arch/arm/include/asm/ptrace.h | 17 ++-
arch/arm/mach-ixp4xx/ixdp425-setup.c | 1 +
arch/arm/mach-mx3/mach-qong.c | 1 +
arch/arm/mach-orion5x/ts78xx-setup.c | 1 +
arch/blackfin/mach-bf537/boards/stamp.c | 1 +
arch/blackfin/mach-bf561/boards/acvilon.c | 1 +
arch/powerpc/Makefile | 2 +-
arch/powerpc/kernel/head_64.S | 6 +-
arch/sparc/include/asm/atomic_64.h | 10 +-
arch/sparc/include/asm/fb.h | 4 +
arch/sparc/include/asm/parport.h | 4 +
arch/sparc/include/asm/rwsem-const.h | 2 +-
arch/x86/Kconfig | 5 +
arch/x86/include/asm/cmpxchg_32.h | 67 ++-----
arch/x86/include/asm/cmpxchg_64.h | 4 +-
arch/x86/kernel/apic/apic.c | 2 +-
arch/x86/kernel/apic/io_apic.c | 2 +
arch/x86/kernel/cpu/perf_event_intel.c | 81 +++++++--
arch/x86/kernel/cpu/perf_event_p4.c | 9 +-
arch/x86/kernel/mpparse.c | 16 ++
arch/x86/kernel/smpboot.c | 19 ++
arch/x86/lib/atomic64_386_32.S | 236 +++++++++++++-----------
arch/x86/oprofile/nmi_int.c | 17 ++-
drivers/acpi/apei/erst.c | 1 +
drivers/char/agp/intel-gtt.c | 11 +-
drivers/char/mem.c | 2 +-
drivers/char/tty_io.c | 4 +-
drivers/gpu/drm/drm_drv.c | 4 +-
drivers/gpu/drm/i915/i915_dma.c | 8 +
drivers/gpu/drm/i915/intel_display.c | 23 ++-
drivers/gpu/drm/radeon/radeon_atombios.c | 16 ++-
drivers/gpu/drm/radeon/radeon_device.c | 2 +-
drivers/gpu/drm/radeon/radeon_i2c.c | 7 +
drivers/gpu/drm/radeon/radeon_irq_kms.c | 5 +-
drivers/gpu/drm/radeon/radeon_kms.c | 4 +-
drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 2 +-
drivers/gpu/drm/radeon/radeon_pm.c | 5 +
drivers/hwmon/pc87360.c | 31 ++--
drivers/isdn/gigaset/capi.c | 17 +-
drivers/isdn/sc/ioctl.c | 10 +-
drivers/md/dm-exception-store.c | 4 +-
drivers/md/dm-exception-store.h | 3 +-
drivers/md/dm-ioctl.c | 50 ++++--
drivers/md/dm-snap.c | 44 +++--
drivers/md/dm.c | 63 +++++--
drivers/md/dm.h | 5 +
drivers/memstick/core/mspro_block.c | 6 +-
drivers/mtd/chips/cfi_cmdset_0001.c | 20 +-
drivers/mtd/lpddr/lpddr_cmds.c | 20 +-
drivers/mtd/nand/nand_base.c | 1 +
drivers/mtd/nand/plat_nand.c | 5 +
drivers/mtd/nand/pxa3xx_nand.c | 2 +-
drivers/net/e1000e/82571.c | 31 ++--
drivers/net/e1000e/defines.h | 4 +
drivers/net/e1000e/lib.c | 10 +
drivers/net/wireless/ath/ath5k/base.c | 21 +++
drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 15 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 16 --
drivers/net/wireless/iwlwifi/iwl-agn-hcmd.c | 17 ++-
drivers/net/wireless/iwlwifi/iwl-agn-rs.c | 17 +--
drivers/net/wireless/iwlwifi/iwl-agn-tx.c | 20 +--
drivers/net/wireless/iwlwifi/iwl-agn.c | 83 ++++++++-
drivers/net/wireless/iwlwifi/iwl-core.c | 70 +++-----
drivers/net/wireless/iwlwifi/iwl-core.h | 13 +-
drivers/net/wireless/iwlwifi/iwl3945-base.c | 56 ++++++-
drivers/net/wireless/wl12xx/wl1251_cmd.c | 2 +-
drivers/platform/x86/compal-laptop.c | 9 +
drivers/platform/x86/dell-laptop.c | 7 +
drivers/regulator/wm8994-regulator.c | 5 +-
drivers/serial/suncore.c | 15 +-
drivers/staging/batman-adv/hard-interface.c | 21 ++-
drivers/staging/batman-adv/originator.c | 14 +-
drivers/usb/host/xhci-ring.c | 2 +-
drivers/usb/serial/cp210x.c | 4 +-
drivers/usb/serial/ftdi_sio.c | 5 +-
drivers/usb/serial/ftdi_sio_ids.h | 9 +
drivers/usb/serial/io_ti.c | 2 +-
drivers/usb/serial/navman.c | 1 +
drivers/usb/serial/option.c | 7 +-
drivers/usb/serial/pl2303.c | 1 +
drivers/usb/serial/pl2303.h | 4 +
drivers/video/matrox/matroxfb_base.h | 4 +-
firmware/Makefile | 2 +-
fs/char_dev.c | 1 +
fs/nfs/dir.c | 2 +-
fs/nfs/nfs4proc.c | 8 +-
fs/nfs/super.c | 7 +
fs/nilfs2/super.c | 4 +-
fs/ocfs2/acl.c | 33 +++-
fs/ocfs2/dlm/dlmmaster.c | 9 +-
fs/ocfs2/dlm/dlmrecovery.c | 22 +--
fs/ocfs2/dlm/dlmthread.c | 114 ++++++------
fs/ocfs2/refcounttree.c | 20 ++-
include/acpi/platform/aclinux.h | 10 +-
include/linux/mm_types.h | 2 +-
include/linux/mtd/flashchip.h | 2 +-
include/linux/skbuff.h | 4 +-
include/linux/tty.h | 3 +
include/sound/emu10k1.h | 1 +
include/trace/events/timer.h | 8 +-
kernel/fork.c | 7 +-
kernel/sched.c | 10 +-
kernel/time/timekeeping.c | 14 +-
kernel/trace/ring_buffer.c | 3 +
kernel/trace/trace_functions_graph.c | 10 +-
mm/memory.c | 15 ++-
mm/mlock.c | 21 ++-
mm/mmap.c | 21 ++-
mm/nommu.c | 7 +-
mm/slab.c | 4 +-
net/bridge/br_device.c | 8 +-
net/bridge/br_fdb.c | 2 +-
net/bridge/br_input.c | 6 +-
net/bridge/br_stp_bpdu.c | 2 +-
net/can/bcm.c | 41 +++--
net/can/raw.c | 4 +
net/core/dev.c | 9 +-
net/ipv4/tcp.c | 7 +-
net/netlink/af_netlink.c | 46 ++---
net/sched/act_nat.c | 3 +-
net/sched/sch_sfq.c | 13 ++
net/wireless/mlme.c | 8 +-
scripts/mkmakefile | 4 +-
sound/core/pcm_native.c | 4 +
sound/pci/emu10k1/emu10k1.c | 4 +
sound/pci/emu10k1/emupcm.c | 30 +++-
sound/pci/emu10k1/memory.c | 4 +-
sound/pci/hda/patch_conexant.c | 1 +
sound/pci/hda/patch_realtek.c | 1 +
sound/pci/intel8x0.c | 6 +
sound/pci/riptide/riptide.c | 11 +-
sound/soc/codecs/wm8580.c | 6 +-
sound/soc/codecs/wm8776.c | 7 -
sound/soc/soc-cache.c | 4 +-
135 files changed, 1262 insertions(+), 703 deletions(-)
^ permalink raw reply [flat|nested] 115+ messages in thread
end of thread, other threads:[~2010-08-24 23:25 UTC | newest]
Thread overview: 115+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-24 22:46 [000/114] 2.6.35.4-stable review Greg KH
2010-08-24 22:44 ` [001/114] memstick: init sysfs attributes Greg KH
2010-08-24 22:44 ` [002/114] memstick: fix hangs on unexpected device removal in mspro_blk Greg KH
2010-08-24 22:44 ` [003/114] acpi: fix bogus preemption logic Greg KH
2010-08-24 22:44 ` [004/114] ASoC: Fix inverted mute controls for WM8580 Greg KH
2010-08-24 22:44 ` [005/114] ASoC: Remove DSP mode support for WM8776 Greg KH
2010-08-24 22:44 ` [006/114] ASoC: register cache should be 1 byte aligned for 1 byte long register Greg KH
2010-08-24 22:44 ` [007/114] regulator: Default GPIO controlled WM8994 regulators to disabled Greg KH
2010-08-24 22:44 ` [008/114] ALSA: riptide - Fix detection / load of firmware files Greg KH
2010-08-24 22:44 ` [009/114] ALSA: emu10k1 - delay the PCM interrupts (add pcm_irq_delay parameter) Greg KH
2010-08-24 22:44 ` [010/114] ALSA: hda - Fix missing stream for second ADC on Realtek ALC260 HDA codec Greg KH
2010-08-24 22:44 ` [011/114] ALSA: hda - Add quirk for Dell Vostro 1220 Greg KH
2010-08-24 22:44 ` [012/114] ocfs2: do not overwrite error codes in ocfs2_init_acl Greg KH
2010-08-24 22:44 ` [013/114] ocfs2/dlm: fix a dead lock Greg KH
2010-08-24 22:44 ` [014/114] ocfs2 fix o2dlm dlm run purgelist (rev 3) Greg KH
2010-08-24 22:44 ` [015/114] ocfs2: Count more refcount records in file system fragmentation Greg KH
2010-08-24 22:44 ` [016/114] ocfs2/dlm: avoid incorrect bit set in refmap on recovery master Greg KH
2010-08-24 22:44 ` [017/114] ocfs2/dlm: remove potential deadlock -V3 Greg KH
2010-08-24 22:44 ` [018/114] wl1251: fix trigger scan timeout usage Greg KH
2010-08-24 22:44 ` [019/114] nilfs2: fix list corruption after ifile creation failure Greg KH
2010-08-24 22:44 ` [020/114] tracing: Fix an unallocated memory access in function_graph Greg KH
2010-08-24 22:44 ` [021/114] tracing: Fix ring_buffer_read_page reading out of page boundary Greg KH
2010-08-24 22:44 ` [022/114] cfg80211: fix locking in action frame TX Greg KH
2010-08-24 22:44 ` [023/114] x86, asm: Refactor atomic64_386_32.S to support old binutils and be cleaner Greg KH
2010-08-24 22:44 ` [024/114] perf, x86: P4 PMU -- update nmi irq statistics and unmask lvt entry properly Greg KH
2010-08-24 22:44 ` [025/114] x86, apic: Map the local apic when parsing the MP table Greg KH
2010-08-24 22:44 ` [026/114] platform/x86: move rfkill for Dell Mini 1012 to compal-laptop Greg KH
2010-08-24 22:44 ` [027/114] x86, hotplug: Serialize CPU hotplug to avoid bringup concurrency issues Greg KH
2010-08-24 22:44 ` [028/114] perf, x86: Fix Intel-nhm PMU programming errata workaround Greg KH
2010-08-24 22:44 ` [029/114] x86, apic: Fix apic=debug boot crash Greg KH
2010-08-24 22:44 ` [030/114] Fix the nested PR lock calling issue in ACL Greg KH
2010-08-24 22:44 ` [031/114] drm/radeon/kms: add additional quirk for Acer rv620 laptop Greg KH
2010-08-24 22:44 ` [032/114] drm/radeon/kms: add missing copy from user Greg KH
2010-08-24 22:44 ` [033/114] hwmon: (pc87360) Fix device resource declaration Greg KH
2010-08-24 22:44 ` [034/114] ARM: Tighten check for allowable CPSR values Greg KH
2010-08-24 22:44 ` [035/114] ARM: Fix gen_nand probe structures contents Greg KH
2010-08-24 22:44 ` [036/114] BFIN: " Greg KH
2010-08-24 22:44 ` [037/114] ath9k_htc: fix panic on packet injection using airbase-ng tool Greg KH
2010-08-24 22:44 ` [038/114] nfs: Add "lookupcache" to displayed mount options Greg KH
2010-08-24 22:44 ` [039/114] NFS: Fix an Oops in the NFSv4 atomic open code Greg KH
2010-08-24 22:44 ` [040/114] ath5k: disable ASPM L0s for all cards Greg KH
2010-08-24 22:44 ` [041/114] pxa3xx: fix ns2cycle equation Greg KH
2010-08-24 22:44 ` [042/114] matroxfb: fix incorrect use of memcpy_toio() Greg KH
2010-08-24 22:44 ` [043/114] mtd: nand: Fix probe of Samsung NAND chips Greg KH
2010-08-24 22:44 ` [044/114] mtd: change struct flchip_shared spinlock locking into mutex Greg KH
2010-08-24 22:44 ` [045/114] drm/i915: fixup pageflip ringbuffer commands for i8xx Greg KH
2010-08-24 22:44 ` [046/114] drm/i915: i8xx also doesnt like multiple oustanding pageflips Greg KH
2010-08-24 22:44 ` [047/114] drm/i915/edp: Flush the write before waiting for PLLs Greg KH
2010-08-24 22:44 ` [048/114] dm snapshot: iterate origin and cow devices Greg KH
2010-08-24 22:44 ` [049/114] dm snapshot: test chunk size against both origin and snapshot Greg KH
2010-08-24 22:44 ` [050/114] dm: prevent access to md being deleted Greg KH
2010-08-24 22:44 ` [051/114] dm ioctl: release _hash_lock between devices in remove_all Greg KH
2010-08-24 22:44 ` [052/114] mm: make the vma list be doubly linked Greg KH
2010-08-24 22:44 ` [053/114] mm: make the mlock() stack guard page checks stricter Greg KH
2010-08-24 22:44 ` [054/114] mm: make stack guard page logic use vm_prev pointer Greg KH
2010-08-24 22:45 ` [055/114] x86, asm: Clean up and simplify set_64bit() Greg KH
2010-08-24 22:45 ` [056/114] slab: fix object alignment Greg KH
2010-08-24 22:45 ` [057/114] sparc64: Add missing ID to parport probing code Greg KH
2010-08-24 22:45 ` [058/114] sparc64: Fix rwsem constant bug leading to hangs Greg KH
2010-08-24 22:45 ` [059/114] sparc64: Fix atomic64_t routine return values Greg KH
2010-08-24 22:45 ` [060/114] sparc: Really fix "console=" for serial consoles Greg KH
2010-08-24 22:45 ` [061/114] bridge: add rcu_read_lock on transmit Greg KH
2010-08-24 22:45 ` [062/114] tcp: cookie transactions setsockopt memory leak Greg KH
2010-08-24 22:45 ` [063/114] bridge: Fix skb leak when multicast parsing fails on TX Greg KH
2010-08-24 22:45 ` [064/114] act_nat: the checksum of ICMP doesnt have pseudo header Greg KH
2010-08-24 22:45 ` [065/114] can: add limit for nframes and clean up signed/unsigned variables Greg KH
2010-08-24 22:45 ` [066/114] isdn: fix information leak Greg KH
2010-08-24 22:45 ` [067/114] net: Fix napi_gro_frags vs netpoll path Greg KH
2010-08-24 22:45 ` [068/114] net: Fix a memmove bug in dev_gro_receive() Greg KH
2010-08-24 22:45 ` [069/114] pkt_sched: Fix sch_sfq vs tcf_bind_filter oops Greg KH
2010-08-24 22:45 ` [070/114] pkt_sched: Fix sch_sfq vs tc_modify_qdisc oops Greg KH
2010-08-24 22:45 ` [071/114] net: disable preemption before call smp_processor_id() Greg KH
2010-08-24 22:45 ` [072/114] act_nat: fix wild pointer Greg KH
2010-08-24 22:45 ` [073/114] Fix init ordering of /dev/console vs callers of modprobe Greg KH
2010-08-24 22:45 ` [074/114] gen_nand: Test if nr_chips field is valid Greg KH
2010-08-24 22:45 ` [075/114] isdn/gigaset: reduce syslog spam Greg KH
2010-08-24 22:45 ` [076/114] isdn: gigaset: add missing unlock Greg KH
2010-08-24 22:45 ` [077/114] Oprofile: Change CPUIDS from decimal to hex, and add some comments Greg KH
2010-08-24 22:45 ` [078/114] oprofile: add support for Intel processor model 30 Greg KH
2010-08-24 22:45 ` [079/114] drm/agp/i915: trim stolen space to 32M Greg KH
2010-08-24 22:45 ` [080/114] timekeeping: Fix overflow in rawtime tv_nsec on 32 bit archs Greg KH
2010-08-24 22:45 ` [081/114] time: Workaround gcc loop optimization that causes 64bit div errors Greg KH
2010-08-24 22:45 ` [082/114] can-raw: Fix skb_orphan_try handling Greg KH
2010-08-24 22:45 ` [083/114] iwlagn: fix rts cts protection Greg KH
2010-08-24 22:45 ` [084/114] dm: separate device deletion from dm_put Greg KH
2010-08-24 22:45 ` [085/114] e1000e: disable ASPM L1 on 82573 Greg KH
2010-08-24 22:45 ` [086/114] e1000e: dont check for alternate MAC addr on parts that dont support it Greg KH
2010-08-24 22:45 ` [087/114] iwlwifi: fix 3945 filter flags Greg KH
2010-08-24 22:45 ` [088/114] fixes for using make 3.82 Greg KH
2010-08-24 22:45 ` [089/114] ALSA: intel8x0: Mute External Amplifier by default for ThinkPad X31 Greg KH
2010-08-24 22:45 ` [090/114] netlink: fix compat recvmsg Greg KH
2010-08-24 22:45 ` [091/114] drm/radeon/kms: dont enable MSIs on AGP boards Greg KH
2010-08-24 22:45 ` [092/114] drm/radeon/kms/pm: bail early if nothings changing Greg KH
2010-08-24 22:45 ` [093/114] drm/radeon/kms: fix typo in radeon_compute_pll_gain Greg KH
2010-08-24 22:45 ` [094/114] drm/radeon/kms/DCE3+: switch pads to ddc mode when going i2c Greg KH
2010-08-24 22:45 ` [095/114] drm/radeon/kms: fix sideport detection on newer rs880 boards Greg KH
2010-08-24 22:45 ` [096/114] drm/radeon/kms: fix GTT/VRAM overlapping test Greg KH
2010-08-24 22:45 ` [097/114] drm: stop information leak of old kernel stack Greg KH
2010-08-24 22:45 ` [098/114] Staging: batman-adv: unify orig_hash_lock spinlock handling to avoid deadlocks Greg KH
2010-08-24 22:45 ` [099/114] Staging: batman-adv: Create batman_if only on register event Greg KH
2010-08-24 22:45 ` [100/114] Staging: batman-adv: Dont use net_dev after dev_put Greg KH
2010-08-24 22:45 ` [101/114] Staging: batman-adv: Dont write in not allocated packet_buff Greg KH
2010-08-24 22:45 ` [102/114] powerpc: Fix typo in uImage target Greg KH
2010-08-24 22:45 ` [103/114] powerpc: Initialise paca->kstack before early_setup_secondary Greg KH
2010-08-24 22:45 ` [104/114] USB: option: add Celot CT-650 Greg KH
2010-08-24 22:45 ` [105/114] USB: add device IDs for igotu to navman Greg KH
2010-08-24 22:45 ` [106/114] USB: pl2303: New vendor and product id Greg KH
2010-08-24 22:45 ` [107/114] USB: CP210x Fix Break On/Off Greg KH
2010-08-24 22:45 ` [108/114] USB: ftdi_sio: fix endianess of max packet size Greg KH
2010-08-24 22:45 ` [109/114] USB: io_ti: check firmware version before updating Greg KH
2010-08-24 22:45 ` [110/114] USB: xhci: Remove buggy assignment in next_trb() Greg KH
2010-08-24 22:45 ` [111/114] USB: ftdi_sio: Add ID for Ionics PlugComputer Greg KH
2010-08-24 22:45 ` [112/114] USB: ftdi_sio: add product ID for Lenz LI-USB Greg KH
2010-08-24 22:45 ` [113/114] mutex: Improve the scalability of optimistic spinning Greg KH
2010-08-24 22:45 ` [114/114] tracing: Fix timer tracing Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox