* [001/156] drivers/scsi/ses.c: eliminate double free
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [002/156] decompress: fix new decompressor for PIC Greg KH
` (154 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Julia Lawall,
James Bottomley, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Julia Lawall <julia@diku.dk>
commit 9b3a6549b2602ca30f58715a0071e29f9898cae9 upstream.
The few lines below the kfree of hdr_buf may go to the label err_free
which will also free hdr_buf. The most straightforward solution seems to
be to just move the kfree of hdr_buf after these gotos.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r@
identifier E;
expression E1;
iterator I;
statement S;
@@
*kfree(E);
... when != E = E1
when != I(E,...) S
when != &E
*kfree(E);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: James Bottomley <James.Bottomley@HansenPartnership.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/scsi/ses.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -591,8 +591,6 @@ static int ses_intf_add(struct device *c
ses_dev->page10_len = len;
buf = NULL;
}
- kfree(hdr_buf);
-
scomp = kzalloc(sizeof(struct ses_component) * components, GFP_KERNEL);
if (!scomp)
goto err_free;
@@ -604,6 +602,8 @@ static int ses_intf_add(struct device *c
goto err_free;
}
+ kfree(hdr_buf);
+
edev->scratch = ses_dev;
for (i = 0; i < components; i++)
edev->component[i].scratch = scomp + i;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [002/156] decompress: fix new decompressor for PIC
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
2010-03-30 22:40 ` [001/156] drivers/scsi/ses.c: eliminate double free Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [003/156] ARM: Fix decompressors kernel size estimation for ROM=y Greg KH
` (153 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Russell King, Alain Knaff,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Russell King <rmk@arm.linux.org.uk>
commit 5ceaa2f39bfa73c4398cd01e78f1c3ebde3d3383 upstream.
The ARM kernel decompressor wants to be able to relocate r/w data
independently from the rest of the image, and we do this by ensuring that
r/w data has global visibility. Define STATIC_RW_DATA to be empty to
achieve this.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Alain Knaff <alain@knaff.lu>
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>
--- a/include/linux/decompress/mm.h
+++ b/include/linux/decompress/mm.h
@@ -14,11 +14,21 @@
/* Code active when included from pre-boot environment: */
+/*
+ * Some architectures want to ensure there is no local data in their
+ * pre-boot environment, so that data can arbitarily relocated (via
+ * GOT references). This is achieved by defining STATIC_RW_DATA to
+ * be null.
+ */
+#ifndef STATIC_RW_DATA
+#define STATIC_RW_DATA static
+#endif
+
/* A trivial malloc implementation, adapted from
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
*/
-static unsigned long malloc_ptr;
-static int malloc_count;
+STATIC_RW_DATA unsigned long malloc_ptr;
+STATIC_RW_DATA int malloc_count;
static void *malloc(int size)
{
^ permalink raw reply [flat|nested] 432+ messages in thread
* [003/156] ARM: Fix decompressors kernel size estimation for ROM=y
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
2010-03-30 22:40 ` [001/156] drivers/scsi/ses.c: eliminate double free Greg KH
2010-03-30 22:40 ` [002/156] decompress: fix new decompressor for PIC Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [004/156] mac80211: Fix HT rate control configuration Greg KH
` (152 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Russell King,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Russell King <rmk+kernel@arm.linux.org.uk>
commit 98e12b5a6e05413420a7e3b3eca7fbfc2ff41b6d upstream.
Commit 2552fc2 changed the way the decompressor decides if it is safe
to decompress the kernel directly to its final location. Unfortunately,
it took the top of the compressed data as being the stack pointer,
which it is for ROM=n cases. However, for ROM=y, the stack pointer
is not relevant, and results in the wrong answer.
Fix this by explicitly storing the end of the biggybacked data in the
decompressor, and use that to calculate the compressed image size.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/arm/boot/compressed/head.S | 50 ++++++++++++++------------------
arch/arm/boot/compressed/vmlinux.lds.in | 3 +
2 files changed, 26 insertions(+), 27 deletions(-)
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -170,8 +170,8 @@ not_angel:
.text
adr r0, LC0
- ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, ip, sp} )
- THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, ip} )
+ ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp})
+ THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} )
THUMB( ldr sp, [r0, #28] )
subs r0, r0, r1 @ calculate the delta offset
@@ -182,12 +182,13 @@ not_angel:
/*
* We're running at a different address. We need to fix
* up various pointers:
- * r5 - zImage base address
- * r6 - GOT start
+ * r5 - zImage base address (_start)
+ * r6 - size of decompressed image
+ * r11 - GOT start
* ip - GOT end
*/
add r5, r5, r0
- add r6, r6, r0
+ add r11, r11, r0
add ip, ip, r0
#ifndef CONFIG_ZBOOT_ROM
@@ -205,10 +206,10 @@ not_angel:
/*
* Relocate all entries in the GOT table.
*/
-1: ldr r1, [r6, #0] @ relocate entries in the GOT
+1: ldr r1, [r11, #0] @ relocate entries in the GOT
add r1, r1, r0 @ table. This fixes up the
- str r1, [r6], #4 @ C references.
- cmp r6, ip
+ str r1, [r11], #4 @ C references.
+ cmp r11, ip
blo 1b
#else
@@ -216,12 +217,12 @@ not_angel:
* Relocate entries in the GOT table. We only relocate
* the entries that are outside the (relocated) BSS region.
*/
-1: ldr r1, [r6, #0] @ relocate entries in the GOT
+1: ldr r1, [r11, #0] @ relocate entries in the GOT
cmp r1, r2 @ entry < bss_start ||
cmphs r3, r1 @ _end < entry
addlo r1, r1, r0 @ table. This fixes up the
- str r1, [r6], #4 @ C references.
- cmp r6, ip
+ str r1, [r11], #4 @ C references.
+ cmp r11, ip
blo 1b
#endif
@@ -247,6 +248,7 @@ not_relocated: mov r0, #0
* Check to see if we will overwrite ourselves.
* r4 = final kernel address
* r5 = start of this image
+ * r6 = size of decompressed image
* r2 = end of malloc space (and therefore this image)
* We basically want:
* r4 >= r2 -> OK
@@ -254,8 +256,7 @@ not_relocated: mov r0, #0
*/
cmp r4, r2
bhs wont_overwrite
- sub r3, sp, r5 @ > compressed kernel size
- add r0, r4, r3, lsl #2 @ allow for 4x expansion
+ add r0, r4, r6
cmp r0, r5
bls wont_overwrite
@@ -271,7 +272,6 @@ not_relocated: mov r0, #0
* r1-r3 = unused
* r4 = kernel execution address
* r5 = decompressed kernel start
- * r6 = processor ID
* r7 = architecture ID
* r8 = atags pointer
* r9-r12,r14 = corrupted
@@ -312,7 +312,8 @@ LC0: .word LC0 @ r1
.word _end @ r3
.word zreladdr @ r4
.word _start @ r5
- .word _got_start @ r6
+ .word _image_size @ r6
+ .word _got_start @ r11
.word _got_end @ ip
.word user_stack+4096 @ sp
LC1: .word reloc_end - reloc_start
@@ -336,7 +337,6 @@ params: ldr r0, =params_phys
*
* On entry,
* r4 = kernel execution address
- * r6 = processor ID
* r7 = architecture number
* r8 = atags pointer
* r9 = run-time address of "start" (???)
@@ -542,7 +542,6 @@ __common_mmu_cache_on:
* r1-r3 = unused
* r4 = kernel execution address
* r5 = decompressed kernel start
- * r6 = processor ID
* r7 = architecture ID
* r8 = atags pointer
* r9-r12,r14 = corrupted
@@ -581,19 +580,19 @@ call_kernel: bl cache_clean_flush
* r1 = corrupted
* r2 = corrupted
* r3 = block offset
- * r6 = corrupted
+ * r9 = corrupted
* r12 = corrupted
*/
call_cache_fn: adr r12, proc_types
#ifdef CONFIG_CPU_CP15
- mrc p15, 0, r6, c0, c0 @ get processor ID
+ mrc p15, 0, r9, c0, c0 @ get processor ID
#else
- ldr r6, =CONFIG_PROCESSOR_ID
+ ldr r9, =CONFIG_PROCESSOR_ID
#endif
1: ldr r1, [r12, #0] @ get value
ldr r2, [r12, #4] @ get mask
- eor r1, r1, r6 @ (real ^ match)
+ eor r1, r1, r9 @ (real ^ match)
tst r1, r2 @ & mask
ARM( addeq pc, r12, r3 ) @ call cache function
THUMB( addeq r12, r3 )
@@ -778,8 +777,7 @@ proc_types:
* Turn off the Cache and MMU. ARMv3 does not support
* reading the control register, but ARMv4 does.
*
- * On entry, r6 = processor ID
- * On exit, r0, r1, r2, r3, r12 corrupted
+ * On exit, r0, r1, r2, r3, r9, r12 corrupted
* This routine must preserve: r4, r6, r7
*/
.align 5
@@ -852,10 +850,8 @@ __armv3_mmu_cache_off:
/*
* Clean and flush the cache to maintain consistency.
*
- * On entry,
- * r6 = processor ID
* On exit,
- * r1, r2, r3, r11, r12 corrupted
+ * r1, r2, r3, r9, r11, r12 corrupted
* This routine must preserve:
* r0, r4, r5, r6, r7
*/
@@ -967,7 +963,7 @@ __armv4_mmu_cache_flush:
mov r2, #64*1024 @ default: 32K dcache size (*2)
mov r11, #32 @ default: 32 byte line size
mrc p15, 0, r3, c0, c0, 1 @ read cache type
- teq r3, r6 @ cache ID register present?
+ teq r3, r9 @ cache ID register present?
beq no_cache_id
mov r1, r3, lsr #18
and r1, r1, #7
--- a/arch/arm/boot/compressed/vmlinux.lds.in
+++ b/arch/arm/boot/compressed/vmlinux.lds.in
@@ -36,6 +36,9 @@ SECTIONS
_etext = .;
+ /* Assume size of decompressed image is 4x the compressed image */
+ _image_size = (_etext - _text) * 4;
+
_got_start = .;
.got : { *(.got) }
_got_end = .;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [004/156] mac80211: Fix HT rate control configuration
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (2 preceding siblings ...)
2010-03-30 22:40 ` [003/156] ARM: Fix decompressors kernel size estimation for ROM=y Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [005/156] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt() Greg KH
` (151 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Sujith, John W. Linville,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sujith <Sujith.Manoharan@atheros.com>
commit 4fa004373133ece3d9b1c0a7e243b0e53760b165 upstream.
Handling HT configuration changes involved setting the channel
with the new HT parameters and then issuing a rate_update()
notification to the driver.
This behavior changed after the off-channel changes. Now, the channel
is not updated with the new HT params in enable_ht() - instead, it
is now done when the scan work terminates. This results in the driver
depending on stale information, defaulting to non-HT mode always.
Fix this by passing the new channel type to the driver.
Signed-off-by: Sujith <Sujith.Manoharan@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/rc.c | 6 +++---
include/net/mac80211.h | 3 ++-
net/mac80211/mlme.c | 3 ++-
net/mac80211/rate.h | 5 +++--
4 files changed, 10 insertions(+), 7 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/rc.c
+++ b/drivers/net/wireless/ath/ath9k/rc.c
@@ -1323,7 +1323,7 @@ static void ath_rate_init(void *priv, st
static void ath_rate_update(void *priv, struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta, void *priv_sta,
- u32 changed)
+ u32 changed, enum nl80211_channel_type oper_chan_type)
{
struct ath_softc *sc = priv;
struct ath_rate_priv *ath_rc_priv = priv_sta;
@@ -1340,8 +1340,8 @@ static void ath_rate_update(void *priv,
if (sc->sc_ah->opmode != NL80211_IFTYPE_STATION)
return;
- if (sc->hw->conf.channel_type == NL80211_CHAN_HT40MINUS ||
- sc->hw->conf.channel_type == NL80211_CHAN_HT40PLUS)
+ if (oper_chan_type == NL80211_CHAN_HT40MINUS ||
+ oper_chan_type == NL80211_CHAN_HT40PLUS)
oper_cw40 = true;
oper_sgi40 = (sta->ht_cap.cap & IEEE80211_HT_CAP_SGI_40) ?
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2258,7 +2258,8 @@ struct rate_control_ops {
struct ieee80211_sta *sta, void *priv_sta);
void (*rate_update)(void *priv, struct ieee80211_supported_band *sband,
struct ieee80211_sta *sta,
- void *priv_sta, u32 changed);
+ void *priv_sta, u32 changed,
+ enum nl80211_channel_type oper_chan_type);
void (*free_sta)(void *priv, struct ieee80211_sta *sta,
void *priv_sta);
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -205,7 +205,8 @@ static u32 ieee80211_enable_ht(struct ie
sta = sta_info_get(local, bssid);
if (sta)
rate_control_rate_update(local, sband, sta,
- IEEE80211_RC_HT_CHANGED);
+ IEEE80211_RC_HT_CHANGED,
+ local->oper_channel_type);
rcu_read_unlock();
}
--- a/net/mac80211/rate.h
+++ b/net/mac80211/rate.h
@@ -69,7 +69,8 @@ static inline void rate_control_rate_ini
static inline void rate_control_rate_update(struct ieee80211_local *local,
struct ieee80211_supported_band *sband,
- struct sta_info *sta, u32 changed)
+ struct sta_info *sta, u32 changed,
+ enum nl80211_channel_type oper_chan_type)
{
struct rate_control_ref *ref = local->rate_ctrl;
struct ieee80211_sta *ista = &sta->sta;
@@ -77,7 +78,7 @@ static inline void rate_control_rate_upd
if (ref && ref->ops->rate_update)
ref->ops->rate_update(ref->priv, sband, ista,
- priv_sta, changed);
+ priv_sta, changed, oper_chan_type);
}
static inline void *rate_control_alloc_sta(struct rate_control_ref *ref,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [005/156] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (3 preceding siblings ...)
2010-03-30 22:40 ` [004/156] mac80211: Fix HT rate control configuration Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [006/156] ALSA: hda - Sound MSI fallout on a Asus mobo NVIDIA MCP55 Greg KH
` (150 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Louis Rilling,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Louis Rilling <Louis.Rilling@kerlabs.com>
commit fe234f0e5cbb880792d2d1ac0743cf8c07e9dde3 upstream.
Commit 09943a1819a240ff4a72f924d0038818fcdd0a90
Author: Matt Carlson <mcarlson@broadcom.com>
Date: Fri Aug 28 14:01:57 2009 +0000
tg3: Convert ISR parameter to tnapi
forgot to update tg3_poll_controller(), leading to intermittent crashes with
netpoll.
Fix this.
Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/tg3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -5223,7 +5223,7 @@ static void tg3_poll_controller(struct n
struct tg3 *tp = netdev_priv(dev);
for (i = 0; i < tp->irq_cnt; i++)
- tg3_interrupt(tp->napi[i].irq_vec, dev);
+ tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]);
}
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [006/156] ALSA: hda - Sound MSI fallout on a Asus mobo NVIDIA MCP55
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (4 preceding siblings ...)
2010-03-30 22:40 ` [005/156] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt() Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [007/156] ALSA: hda - Fix input source elements of secondary ADCs on Realtek Greg KH
` (149 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ralf Gerbig, Takashi Iwai,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ralf Gerbig <rge@quengel.org>
commit ecd216260f87dd8c14b2580a16f055554644bbea upstream.
without the following patch audio ssttuutteerrs on
ASUS M2N32-SLI PREMIUM ACPI BIOS Revision 1304
the sound device is:
00:0e.1 Audio device: nVidia Corporation MCP55 High Definition Audio (rev a2)
worked with 2.6.32
Signed-off-by: Ralf Gerbig <rge@quengel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/hda_intel.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2354,6 +2354,7 @@ static void __devinit check_probe_mask(s
static struct snd_pci_quirk msi_black_list[] __devinitdata = {
SND_PCI_QUIRK(0x1043, 0x81f2, "ASUS", 0), /* Athlon64 X2 + nvidia */
SND_PCI_QUIRK(0x1043, 0x81f6, "ASUS", 0), /* nvidia */
+ SND_PCI_QUIRK(0x1043, 0x822d, "ASUS", 0), /* Athlon64 X2 + nvidia MCP55 */
{}
};
^ permalink raw reply [flat|nested] 432+ messages in thread
* [007/156] ALSA: hda - Fix input source elements of secondary ADCs on Realtek
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (5 preceding siblings ...)
2010-03-30 22:40 ` [006/156] ALSA: hda - Sound MSI fallout on a Asus mobo NVIDIA MCP55 Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [008/156] timekeeping: Prevent oops when GENERIC_TIME=n Greg KH
` (148 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Takashi Iwai,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 5311114d4867113c00f78829d4ce14be458ec925 upstream.
Since alc_auto_create_input_ctls() doesn't set the elements for the
secondary ADCs, "Input Source" elemtns for these also get empty, resulting
in buggy outputs of alsactl like:
control.14 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
iface MIXER
name 'Input Source'
index 1
value 0
}
This patch fixes alc_mux_enum_*() (and others) to fall back to the
first entry if the secondary input mux is empty.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/patch_realtek.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -407,6 +407,8 @@ static int alc_mux_enum_info(struct snd_
unsigned int mux_idx = snd_ctl_get_ioffidx(kcontrol, &uinfo->id);
if (mux_idx >= spec->num_mux_defs)
mux_idx = 0;
+ if (!spec->input_mux[mux_idx].num_items && mux_idx > 0)
+ mux_idx = 0;
return snd_hda_input_mux_info(&spec->input_mux[mux_idx], uinfo);
}
@@ -435,6 +437,8 @@ static int alc_mux_enum_put(struct snd_k
mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx;
imux = &spec->input_mux[mux_idx];
+ if (!imux->num_items && mux_idx > 0)
+ imux = &spec->input_mux[0];
type = get_wcaps_type(get_wcaps(codec, nid));
if (type == AC_WID_AUD_MIX) {
@@ -9941,6 +9945,8 @@ static void alc882_auto_init_input_src(s
continue;
mux_idx = c >= spec->num_mux_defs ? 0 : c;
imux = &spec->input_mux[mux_idx];
+ if (!imux->num_items && mux_idx > 0)
+ imux = &spec->input_mux[0];
for (idx = 0; idx < conns; idx++) {
/* if the current connection is the selected one,
* unmute it as default - otherwise mute it
^ permalink raw reply [flat|nested] 432+ messages in thread
* [008/156] timekeeping: Prevent oops when GENERIC_TIME=n
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (6 preceding siblings ...)
2010-03-30 22:40 ` [007/156] ALSA: hda - Fix input source elements of secondary ADCs on Realtek Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [009/156] Input: alps - add support for the touchpad on Toshiba Tecra A11-11L Greg KH
` (147 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, John Stultz,
Martin Schwidefsky, Thomas Gleixner, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: john stultz <johnstul@us.ibm.com>
commit ad6759fbf35d104dbf573cd6f4c6784ad6823f7e upstream.
Aaro Koskinen reported an issue in kernel.org bugzilla #15366, where
on non-GENERIC_TIME systems, accessing
/sys/devices/system/clocksource/clocksource0/current_clocksource
results in an oops.
It seems the timekeeper/clocksource rework missed initializing the
curr_clocksource value in the !GENERIC_TIME case.
Thanks to Aaro for reporting and diagnosing the issue as well as
testing the fix!
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
LKML-Reference: <1267475683.4216.61.camel@localhost.localdomain>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/time/clocksource.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -580,6 +580,10 @@ static inline void clocksource_select(vo
*/
static int __init clocksource_done_booting(void)
{
+ mutex_lock(&clocksource_mutex);
+ curr_clocksource = clocksource_default_clock();
+ mutex_unlock(&clocksource_mutex);
+
finished_booting = 1;
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [009/156] Input: alps - add support for the touchpad on Toshiba Tecra A11-11L
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (7 preceding siblings ...)
2010-03-30 22:40 ` [008/156] timekeeping: Prevent oops when GENERIC_TIME=n Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [010/156] Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table Greg KH
` (146 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas BÀchler,
Dmitry Torokhov, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Bächler <thomas@archlinux.org>
commit eb8bff85c5bd5caef7c374ff32b86545029efb56 upstream.
Signed-off-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/input/mouse/alps.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -63,6 +63,8 @@ static const struct alps_model_info alps
{ { 0x62, 0x02, 0x14 }, 0xcf, 0xcf,
ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
{ { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FOUR_BUTTONS }, /* Dell Vostro 1400 */
+ { { 0x52, 0x01, 0x14 }, 0xff, 0xff,
+ ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
};
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [010/156] Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (8 preceding siblings ...)
2010-03-30 22:40 ` [009/156] Input: alps - add support for the touchpad on Toshiba Tecra A11-11L Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [011/156] i2c-powermac: Be less verbose in the absence of real errors Greg KH
` (145 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Christoph Fritz,
Dmitry Torokhov, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christoph Fritz <chf.fritz@googlemail.com>
commit 31968ecf584330b51a25b7bf881c2b632a02a3fb upstream.
ALDI/MEDION netbook E1222 needs to be in the reset quirk list for
its touchpad's proper function.
Reported-by: Michael Fischer <mifi@gmx.de>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/input/serio/i8042-x86ia64io.h | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -442,6 +442,13 @@ static const struct dmi_system_id __init
},
},
{
+ /* Medion Akoya E1222 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "E122X"),
+ },
+ },
+ {
/* Mivvy M310 */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"),
^ permalink raw reply [flat|nested] 432+ messages in thread
* [011/156] i2c-powermac: Be less verbose in the absence of real errors.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (9 preceding siblings ...)
2010-03-30 22:40 ` [010/156] Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [012/156] i2c-i801: Dont use the block buffer for I2C block writes Greg KH
` (144 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Delvare,
Benjamin Herrenschmidt, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jean Delvare <khali@linux-fr.org>
commit 8e4b980c28c91cfe9d0ce0431bc0af56e146b49e upstream.
Be less verbose in the absence of real errors. We don't have to report
failed probes to the users, it's only confusing them.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Andrey Gusev <ronne@list.ru>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/i2c/busses/i2c-powermac.c | 25 ++++++++++++++++++-------
1 file changed, 18 insertions(+), 7 deletions(-)
--- a/drivers/i2c/busses/i2c-powermac.c
+++ b/drivers/i2c/busses/i2c-powermac.c
@@ -122,9 +122,14 @@ static s32 i2c_powermac_smbus_xfer( stru
rc = pmac_i2c_xfer(bus, addrdir, subsize, subaddr, buf, len);
if (rc) {
- dev_err(&adap->dev,
- "I2C transfer at 0x%02x failed, size %d, err %d\n",
- addrdir >> 1, size, rc);
+ if (rc == -ENXIO)
+ dev_dbg(&adap->dev,
+ "I2C transfer at 0x%02x failed, size %d, "
+ "err %d\n", addrdir >> 1, size, rc);
+ else
+ dev_err(&adap->dev,
+ "I2C transfer at 0x%02x failed, size %d, "
+ "err %d\n", addrdir >> 1, size, rc);
goto bail;
}
@@ -175,10 +180,16 @@ static int i2c_powermac_master_xfer( str
goto bail;
}
rc = pmac_i2c_xfer(bus, addrdir, 0, 0, msgs->buf, msgs->len);
- if (rc < 0)
- dev_err(&adap->dev, "I2C %s 0x%02x failed, err %d\n",
- addrdir & 1 ? "read from" : "write to", addrdir >> 1,
- rc);
+ if (rc < 0) {
+ if (rc == -ENXIO)
+ dev_dbg(&adap->dev, "I2C %s 0x%02x failed, err %d\n",
+ addrdir & 1 ? "read from" : "write to",
+ addrdir >> 1, rc);
+ else
+ dev_err(&adap->dev, "I2C %s 0x%02x failed, err %d\n",
+ addrdir & 1 ? "read from" : "write to",
+ addrdir >> 1, rc);
+ }
bail:
pmac_i2c_close(bus);
return rc < 0 ? rc : 1;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [012/156] i2c-i801: Dont use the block buffer for I2C block writes
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (10 preceding siblings ...)
2010-03-30 22:40 ` [011/156] i2c-powermac: Be less verbose in the absence of real errors Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [013/156] ath5k: fix I/Q calibration (for real) Greg KH
` (143 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Delvare, Oleg Ryjkov,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jean Delvare <khali@linux-fr.org>
commit c074c39d62306efa5ba7c69c1a1531bc7333d252 upstream.
Experience has shown that the block buffer can only be used for SMBus
(not I2C) block transactions, even though the datasheet doesn't
mention this limitation.
Reported-by: Felix Rubinstein <felixru@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Oleg Ryjkov <oryjkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/i2c/busses/i2c-i801.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -415,9 +415,11 @@ static int i801_block_transaction(union
data->block[0] = 32; /* max for SMBus block reads */
}
+ /* Experience has shown that the block buffer can only be used for
+ SMBus (not I2C) block transactions, even though the datasheet
+ doesn't mention this limitation. */
if ((i801_features & FEATURE_BLOCK_BUFFER)
- && !(command == I2C_SMBUS_I2C_BLOCK_DATA
- && read_write == I2C_SMBUS_READ)
+ && command != I2C_SMBUS_I2C_BLOCK_DATA
&& i801_set_block_buffer_mode() == 0)
result = i801_block_transaction_by_block(data, read_write,
hwpec);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [013/156] ath5k: fix I/Q calibration (for real)
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (11 preceding siblings ...)
2010-03-30 22:40 ` [012/156] i2c-i801: Dont use the block buffer for I2C block writes Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [014/156] ath5k: dont use external sleep clock in AP mode Greg KH
` (142 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bruno Randolf,
Nick Kossifidis, John W. Linville, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bruno Randolf <br1@einfach.org>
commit 86415d43efd4f7093979cfa8a80232114266f1a4 upstream.
I/Q calibration was completely broken, resulting in a high number of CRC errors
on received packets. before i could see around 10% to 20% CRC errors, with this
patch they are between 0% and 3%.
1.) the removal of the mask in commit "ath5k: Fix I/Q calibration
(f1cf2dbd0f798b71b1590e7aca6647f2caef1649)" resulted in no mask beeing used
when writing the I/Q values into the register. additional errors in the
calculation of the values (see 2.) resulted too high numbers, exceeding the
masks, so wrong values like 0xfffffffe were written. to be safe we should
always use the bitmask when writing parts of a register.
2.) using a (s32) cast for q_coff is a wrong conversion to signed, since we
convert to a signed value later by substracting 128. this resulted in too low
numbers for Q many times, which were limited to -16 by the boundary check later
on.
3.) checked everything against the HAL sources and took over comments and minor
optimizations from there.
4.) we can't use ENABLE_BITS when we want to write a number (the number can
contain zeros). also always write the correction values first and set ENABLE
bit last, like the HAL does.
Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Nick Kossifidis <mickflemm@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/phy.c | 41 +++++++++++++++++------------------
drivers/net/wireless/ath/ath5k/reg.h | 1
2 files changed, 22 insertions(+), 20 deletions(-)
--- a/drivers/net/wireless/ath/ath5k/phy.c
+++ b/drivers/net/wireless/ath/ath5k/phy.c
@@ -1386,38 +1386,39 @@ static int ath5k_hw_rf511x_calibrate(str
goto done;
/* Calibration has finished, get the results and re-run */
+
+ /* work around empty results which can apparently happen on 5212 */
for (i = 0; i <= 10; i++) {
iq_corr = ath5k_hw_reg_read(ah, AR5K_PHY_IQRES_CAL_CORR);
i_pwr = ath5k_hw_reg_read(ah, AR5K_PHY_IQRES_CAL_PWR_I);
q_pwr = ath5k_hw_reg_read(ah, AR5K_PHY_IQRES_CAL_PWR_Q);
+ ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_CALIBRATE,
+ "iq_corr:%x i_pwr:%x q_pwr:%x", iq_corr, i_pwr, q_pwr);
+ if (i_pwr && q_pwr)
+ break;
}
i_coffd = ((i_pwr >> 1) + (q_pwr >> 1)) >> 7;
q_coffd = q_pwr >> 7;
- /* No correction */
- if (i_coffd == 0 || q_coffd == 0)
+ /* protect against divide by 0 and loss of sign bits */
+ if (i_coffd == 0 || q_coffd < 2)
goto done;
- i_coff = ((-iq_corr) / i_coffd);
+ i_coff = (-iq_corr) / i_coffd;
+ i_coff = clamp(i_coff, -32, 31); /* signed 6 bit */
+
+ q_coff = (i_pwr / q_coffd) - 128;
+ q_coff = clamp(q_coff, -16, 15); /* signed 5 bit */
- /* Boundary check */
- if (i_coff > 31)
- i_coff = 31;
- if (i_coff < -32)
- i_coff = -32;
-
- q_coff = (((s32)i_pwr / q_coffd) - 128);
-
- /* Boundary check */
- if (q_coff > 15)
- q_coff = 15;
- if (q_coff < -16)
- q_coff = -16;
-
- /* Commit new I/Q value */
- AR5K_REG_ENABLE_BITS(ah, AR5K_PHY_IQ, AR5K_PHY_IQ_CORR_ENABLE |
- ((u32)q_coff) | ((u32)i_coff << AR5K_PHY_IQ_CORR_Q_I_COFF_S));
+ ATH5K_DBG_UNLIMIT(ah->ah_sc, ATH5K_DEBUG_CALIBRATE,
+ "new I:%d Q:%d (i_coffd:%x q_coffd:%x)",
+ i_coff, q_coff, i_coffd, q_coffd);
+
+ /* Commit new I/Q values (set enable bit last to match HAL sources) */
+ AR5K_REG_WRITE_BITS(ah, AR5K_PHY_IQ, AR5K_PHY_IQ_CORR_Q_I_COFF, i_coff);
+ AR5K_REG_WRITE_BITS(ah, AR5K_PHY_IQ, AR5K_PHY_IQ_CORR_Q_Q_COFF, q_coff);
+ AR5K_REG_ENABLE_BITS(ah, AR5K_PHY_IQ, AR5K_PHY_IQ_CORR_ENABLE);
/* Re-enable calibration -if we don't we'll commit
* the same values again and again */
--- a/drivers/net/wireless/ath/ath5k/reg.h
+++ b/drivers/net/wireless/ath/ath5k/reg.h
@@ -2187,6 +2187,7 @@
*/
#define AR5K_PHY_IQ 0x9920 /* Register Address */
#define AR5K_PHY_IQ_CORR_Q_Q_COFF 0x0000001f /* Mask for q correction info */
+#define AR5K_PHY_IQ_CORR_Q_Q_COFF_S 0
#define AR5K_PHY_IQ_CORR_Q_I_COFF 0x000007e0 /* Mask for i correction info */
#define AR5K_PHY_IQ_CORR_Q_I_COFF_S 5
#define AR5K_PHY_IQ_CORR_ENABLE 0x00000800 /* Enable i/q correction */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [014/156] ath5k: dont use external sleep clock in AP mode
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (12 preceding siblings ...)
2010-03-30 22:40 ` [013/156] ath5k: fix I/Q calibration (for real) Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [015/156] ath5k: fix setup for CAB queue Greg KH
` (141 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bob Copeland,
Nick Kossifidis, John W. Linville, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bob Copeland <me@bobcopeland.com>
commit 5d6ce628f986d1a3c523cbb0a5a52095c48cc332 upstream.
When using the external sleep clock in AP mode, the
TSF increments too quickly, causing beacon interval
to be much lower than it is supposed to be, resulting
in lots of beacon-not-ready interrupts.
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=14802.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@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/reset.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -1371,8 +1371,9 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
* Set clocks to 32KHz operation and use an
* external 32KHz crystal when sleeping if one
* exists */
- if (ah->ah_version == AR5K_AR5212)
- ath5k_hw_set_sleep_clock(ah, true);
+ if (ah->ah_version == AR5K_AR5212 &&
+ ah->ah_op_mode != NL80211_IFTYPE_AP)
+ ath5k_hw_set_sleep_clock(ah, true);
/*
* Disable beacons and reset the register
^ permalink raw reply [flat|nested] 432+ messages in thread
* [015/156] ath5k: fix setup for CAB queue
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (13 preceding siblings ...)
2010-03-30 22:40 ` [014/156] ath5k: dont use external sleep clock in AP mode Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [016/156] ring-buffer: Move disabled check into preempt disable section Greg KH
` (140 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bob Copeland,
Nick Kossifidis, John W. Linville, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bob Copeland <me@bobcopeland.com>
commit a951ae2176b982574ffa197455db6c89359fd5eb upstream.
The beacon sent gating doesn't seem to work with any combination
of flags. Thus, buffered frames tend to stay buffered forever,
using up tx descriptors.
Instead, use the DBA gating and hold transmission of the buffered
frames until 80% of the beacon interval has elapsed using the ready
time. This fixes the following error in AP mode:
ath5k phy0: no further txbuf available, dropping packet
Add a comment to acknowledge that this isn't the best solution.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@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/ath5k.h | 2 +-
drivers/net/wireless/ath/ath5k/base.c | 22 +++++++++++++++++++---
drivers/net/wireless/ath/ath5k/qcu.c | 5 +++--
3 files changed, 23 insertions(+), 6 deletions(-)
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -535,7 +535,7 @@ struct ath5k_txq_info {
u32 tqi_cbr_period; /* Constant bit rate period */
u32 tqi_cbr_overflow_limit;
u32 tqi_burst_time;
- u32 tqi_ready_time; /* Not used */
+ u32 tqi_ready_time; /* Time queue waits after an event */
};
/*
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1537,7 +1537,8 @@ ath5k_beaconq_config(struct ath5k_softc
ret = ath5k_hw_get_tx_queueprops(ah, sc->bhalq, &qi);
if (ret)
- return ret;
+ goto err;
+
if (sc->opmode == NL80211_IFTYPE_AP ||
sc->opmode == NL80211_IFTYPE_MESH_POINT) {
/*
@@ -1564,10 +1565,25 @@ ath5k_beaconq_config(struct ath5k_softc
if (ret) {
ATH5K_ERR(sc, "%s: unable to update parameters for beacon "
"hardware queue!\n", __func__);
- return ret;
+ goto err;
}
+ ret = ath5k_hw_reset_tx_queue(ah, sc->bhalq); /* push to h/w */
+ if (ret)
+ goto err;
+
+ /* reconfigure cabq with ready time to 80% of beacon_interval */
+ ret = ath5k_hw_get_tx_queueprops(ah, AR5K_TX_QUEUE_ID_CAB, &qi);
+ if (ret)
+ goto err;
+
+ qi.tqi_ready_time = (sc->bintval * 80) / 100;
+ ret = ath5k_hw_set_tx_queueprops(ah, AR5K_TX_QUEUE_ID_CAB, &qi);
+ if (ret)
+ goto err;
- return ath5k_hw_reset_tx_queue(ah, sc->bhalq); /* push to h/w */;
+ ret = ath5k_hw_reset_tx_queue(ah, AR5K_TX_QUEUE_ID_CAB);
+err:
+ return ret;
}
static void
--- a/drivers/net/wireless/ath/ath5k/qcu.c
+++ b/drivers/net/wireless/ath/ath5k/qcu.c
@@ -408,12 +408,13 @@ int ath5k_hw_reset_tx_queue(struct ath5k
break;
case AR5K_TX_QUEUE_CAB:
+ /* XXX: use BCN_SENT_GT, if we can figure out how */
AR5K_REG_ENABLE_BITS(ah, AR5K_QUEUE_MISC(queue),
- AR5K_QCU_MISC_FRSHED_BCN_SENT_GT |
+ AR5K_QCU_MISC_FRSHED_DBA_GT |
AR5K_QCU_MISC_CBREXP_DIS |
AR5K_QCU_MISC_CBREXP_BCN_DIS);
- ath5k_hw_reg_write(ah, ((AR5K_TUNE_BEACON_INTERVAL -
+ ath5k_hw_reg_write(ah, ((tq->tqi_ready_time -
(AR5K_TUNE_SW_BEACON_RESP -
AR5K_TUNE_DMA_BEACON_RESP) -
AR5K_TUNE_ADDITIONAL_SWBA_BACKOFF) * 1024) |
^ permalink raw reply [flat|nested] 432+ messages in thread
* [016/156] ring-buffer: Move disabled check into preempt disable section
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (14 preceding siblings ...)
2010-03-30 22:40 ` [015/156] ath5k: fix setup for CAB queue Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [017/156] x86_64, cpa: Dont work hard in preserving kernel 2M mappings when using 4K already Greg KH
` (139 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Lai Jiangshan,
Steven Rostedt, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Lai Jiangshan <laijs@cn.fujitsu.com>
commit 52fbe9cde7fdb5c6fac196d7ebd2d92d05ef3cd4 upstream.
The ring buffer resizing and resetting relies on a schedule RCU
action. The buffers are disabled, a synchronize_sched() is called
and then the resize or reset takes place.
But this only works if the disabling of the buffers are within the
preempt disabled section, otherwise a window exists that the buffers
can be written to while a reset or resize takes place.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4B949E43.2010906@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/ring_buffer.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2232,12 +2232,12 @@ ring_buffer_lock_reserve(struct ring_buf
if (ring_buffer_flags != RB_BUFFERS_ON)
return NULL;
- if (atomic_read(&buffer->record_disabled))
- return NULL;
-
/* If we are tracing schedule, we don't want to recurse */
resched = ftrace_preempt_disable();
+ if (atomic_read(&buffer->record_disabled))
+ goto out_nocheck;
+
if (trace_recursive_lock())
goto out_nocheck;
@@ -2469,11 +2469,11 @@ int ring_buffer_write(struct ring_buffer
if (ring_buffer_flags != RB_BUFFERS_ON)
return -EBUSY;
- if (atomic_read(&buffer->record_disabled))
- return -EBUSY;
-
resched = ftrace_preempt_disable();
+ if (atomic_read(&buffer->record_disabled))
+ goto out;
+
cpu = raw_smp_processor_id();
if (!cpumask_test_cpu(cpu, buffer->cpumask))
^ permalink raw reply [flat|nested] 432+ messages in thread
* [017/156] x86_64, cpa: Dont work hard in preserving kernel 2M mappings when using 4K already
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (15 preceding siblings ...)
2010-03-30 22:40 ` [016/156] ring-buffer: Move disabled check into preempt disable section Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [018/156] x86/stacktrace: Dont dereference bad frame pointers Greg KH
` (138 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Suresh Siddha,
H. Peter Anvin, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Suresh Siddha <suresh.b.siddha@intel.com>
commit 281ff33b7c1b1ba2a5f9b03425e5f692a94913fa upstream.
We currently enforce the !RW mapping for the kernel mapping that maps
holes between different text, rodata and data sections. However, kernel
identity mappings will have different RWX permissions to the pages mapping to
text and to the pages padding (which are freed) the text, rodata sections.
Hence kernel identity mappings will be broken to smaller pages. For 64-bit,
kernel text and kernel identity mappings are different, so we can enable
protection checks that come with CONFIG_DEBUG_RODATA, as well as retain 2MB
large page mappings for kernel text.
Konrad reported a boot failure with the Linux Xen paravirt guest because of
this. In this paravirt guest case, the kernel text mapping and the kernel
identity mapping share the same page-table pages. Thus forcing the !RW mapping
for some of the kernel mappings also cause the kernel identity mappings to be
read-only resulting in the boot failure. Linux Xen paravirt guest also
uses 4k mappings and don't use 2M mapping.
Fix this issue and retain large page performance advantage for native kernels
by not working hard and not enforcing !RW for the kernel text mapping,
if the current mapping is already using small page mapping.
Reported-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
LKML-Reference: <1266522700.2909.34.camel@sbs-t61.sc.intel.com>
Tested-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/mm/pageattr.c | 25 +++++++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
--- a/arch/x86/mm/pageattr.c
+++ b/arch/x86/mm/pageattr.c
@@ -291,8 +291,29 @@ static inline pgprot_t static_protection
*/
if (kernel_set_to_readonly &&
within(address, (unsigned long)_text,
- (unsigned long)__end_rodata_hpage_align))
- pgprot_val(forbidden) |= _PAGE_RW;
+ (unsigned long)__end_rodata_hpage_align)) {
+ unsigned int level;
+
+ /*
+ * Don't enforce the !RW mapping for the kernel text mapping,
+ * if the current mapping is already using small page mapping.
+ * No need to work hard to preserve large page mappings in this
+ * case.
+ *
+ * This also fixes the Linux Xen paravirt guest boot failure
+ * (because of unexpected read-only mappings for kernel identity
+ * mappings). In this paravirt guest case, the kernel text
+ * mapping and the kernel identity mapping share the same
+ * page-table pages. Thus we can't really use different
+ * protections for the kernel text and identity mappings. Also,
+ * these shared mappings are made of small page mappings.
+ * Thus this don't enforce !RW mapping for small page kernel
+ * text mapping logic will help Linux Xen parvirt guest boot
+ * aswell.
+ */
+ if (lookup_address(address, &level) && (level != PG_LEVEL_4K))
+ pgprot_val(forbidden) |= _PAGE_RW;
+ }
#endif
prot = __pgprot(pgprot_val(prot) & ~pgprot_val(forbidden));
^ permalink raw reply [flat|nested] 432+ messages in thread
* [018/156] x86/stacktrace: Dont dereference bad frame pointers
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (16 preceding siblings ...)
2010-03-30 22:40 ` [017/156] x86_64, cpa: Dont work hard in preserving kernel 2M mappings when using 4K already Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [019/156] hw-breakpoints: Remove stub unthrottle callback Greg KH
` (137 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Frederic Weisbecker,
Ingo Molnar, Thomas Gleixner, H. Peter Anvin, Peter Zijlstra,
Paul Mackerras, Steven Rostedt, Arnaldo Carvalho de Melo,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Frederic Weisbecker <fweisbec@gmail.com>
commit 29044ad1509ecc229f1d5a31aeed7a8dc61a71c4 upstream.
Callers of a stacktrace might pass bad frame pointers. Those
are usually checked for safety in stack walking helpers before
any dereferencing, but this is not the case when we need to go
through one more frame pointer that backlinks the irq stack to
the previous one, as we don't have any reliable address boudaries
to compare this frame pointer against.
This raises crashes when we record callchains for ftrace events
with perf because we don't use the right helpers to capture
registers there. We get wrong frame pointers as we call
task_pt_regs() even on kernel threads, which is a wrong thing
as it gives us the initial state of any kernel threads freshly
created. This is even not what we want for user tasks. What we want
is a hot snapshot of registers when the ftrace event triggers, not
the state before a task entered the kernel.
This requires more thoughts to do it correctly though.
So first put a guardian to ensure the given frame pointer
can be dereferenced to avoid crashes. We'll think about how to fix
the callers in a subsequent patch.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/dumpstack_64.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -125,9 +125,15 @@ fixup_bp_irq_link(unsigned long bp, unsi
{
#ifdef CONFIG_FRAME_POINTER
struct stack_frame *frame = (struct stack_frame *)bp;
+ unsigned long next;
- if (!in_irq_stack(stack, irq_stack, irq_stack_end))
- return (unsigned long)frame->next_frame;
+ if (!in_irq_stack(stack, irq_stack, irq_stack_end)) {
+ if (!probe_kernel_address(&frame->next_frame, next))
+ return next;
+ else
+ WARN_ONCE(1, "Perf: bad frame pointer = %p in "
+ "callchain\n", &frame->next_frame);
+ }
#endif
return bp;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [019/156] hw-breakpoints: Remove stub unthrottle callback
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (17 preceding siblings ...)
2010-03-30 22:40 ` [018/156] x86/stacktrace: Dont dereference bad frame pointers Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [020/156] function-graph: Init curr_ret_stack with ret_stack Greg KH
` (136 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Frederic Weisbecker,
Peter Zijlstra, K.Prasad, Paul Mackerras, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Frederic Weisbecker <fweisbec@gmail.com>
commit 1e259e0a9982078896f3404240096cbea01daca4 upstream.
We support event unthrottling in breakpoint events. It means
that if we have more than sysctl_perf_event_sample_rate/HZ,
perf will throttle, ignoring subsequent events until the next
tick.
So if ptrace exceeds this max rate, it will omit events, which
breaks the ptrace determinism that is supposed to report every
triggered breakpoints. This is likely to happen if we set
sysctl_perf_event_sample_rate to 1.
This patch removes support for unthrottling in breakpoint
events to break throttling and restore ptrace determinism.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: K.Prasad <prasad@linux.vnet.ibm.com>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/hw_breakpoint.c | 5 -----
kernel/hw_breakpoint.c | 1 -
2 files changed, 6 deletions(-)
--- a/arch/x86/kernel/hw_breakpoint.c
+++ b/arch/x86/kernel/hw_breakpoint.c
@@ -531,8 +531,3 @@ void hw_breakpoint_pmu_read(struct perf_
{
/* TODO */
}
-
-void hw_breakpoint_pmu_unthrottle(struct perf_event *bp)
-{
- /* TODO */
-}
--- a/kernel/hw_breakpoint.c
+++ b/kernel/hw_breakpoint.c
@@ -489,5 +489,4 @@ struct pmu perf_ops_bp = {
.enable = arch_install_hw_breakpoint,
.disable = arch_uninstall_hw_breakpoint,
.read = hw_breakpoint_pmu_read,
- .unthrottle = hw_breakpoint_pmu_unthrottle
};
^ permalink raw reply [flat|nested] 432+ messages in thread
* [020/156] function-graph: Init curr_ret_stack with ret_stack
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (18 preceding siblings ...)
2010-03-30 22:40 ` [019/156] hw-breakpoints: Remove stub unthrottle callback Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [021/156] tracing: Fix warning in s_next of trace file ops Greg KH
` (135 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Steven Rostedt,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Steven Rostedt <srostedt@redhat.com>
commit ea14eb714041d40fcc5180b5a586034503650149 upstream.
If the graph tracer is active, and a task is forked but the allocating of
the processes graph stack fails, it can cause crash later on.
This is due to the temporary stack being NULL, but the curr_ret_stack
variable is copied from the parent. If it is not -1, then in
ftrace_graph_probe_sched_switch() the following:
for (index = next->curr_ret_stack; index >= 0; index--)
next->ret_stack[index].calltime += timestamp;
Will cause a kernel OOPS.
Found with Li Zefan's ftrace_stress_test.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/ftrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3364,6 +3364,7 @@ void ftrace_graph_init_task(struct task_
{
/* Make sure we do not use the parent ret_stack */
t->ret_stack = NULL;
+ t->curr_ret_stack = -1;
if (ftrace_graph_active) {
struct ftrace_ret_stack *ret_stack;
@@ -3373,7 +3374,6 @@ void ftrace_graph_init_task(struct task_
GFP_KERNEL);
if (!ret_stack)
return;
- t->curr_ret_stack = -1;
atomic_set(&t->tracing_graph_pause, 0);
atomic_set(&t->trace_overrun, 0);
t->ftrace_timestamp = 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [021/156] tracing: Fix warning in s_next of trace file ops
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (19 preceding siblings ...)
2010-03-30 22:40 ` [020/156] function-graph: Init curr_ret_stack with ret_stack Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [022/156] tracing: Use same local variable when resetting the ring buffer Greg KH
` (134 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Lai Jiangshan,
Steven Rostedt, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Lai Jiangshan <laijs@cn.fujitsu.com>
commit ac91d85456372a90af5b85eb6620fd2efb1e431b upstream.
This warning in s_next() can be triggered by lseek():
[<c018b3f7>] ? s_next+0x77/0x80
[<c013e3c1>] warn_slowpath_common+0x81/0xa0
[<c018b3f7>] ? s_next+0x77/0x80
[<c013e3fa>] warn_slowpath_null+0x1a/0x20
[<c018b3f7>] s_next+0x77/0x80
[<c01efa77>] traverse+0x117/0x200
[<c01eff13>] seq_lseek+0xa3/0x120
[<c01efe70>] ? seq_lseek+0x0/0x120
[<c01d7081>] vfs_llseek+0x41/0x50
[<c01d8116>] sys_llseek+0x66/0xa0
[<c0102bd0>] sysenter_do_call+0x12/0x26
The iterator "leftover" variable is zeroed in the opening of the trace
file. But lseek can call s_start() which will call s_next() without
reseting the "leftover" variable back to zero, which might trigger
the WARN_ON_ONCE(iter->leftover) that is in s_next().
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4B8CE06A.9090207@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/trace.c | 1 +
1 file changed, 1 insertion(+)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1628,6 +1628,7 @@ static void *s_start(struct seq_file *m,
ftrace_enable_cpu();
+ iter->leftover = 0;
for (p = iter; p && l < *pos; p = s_next(m, p, &l))
;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [022/156] tracing: Use same local variable when resetting the ring buffer
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (20 preceding siblings ...)
2010-03-30 22:40 ` [021/156] tracing: Fix warning in s_next of trace file ops Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [023/156] tracing: Disable buffer switching when starting or stopping trace Greg KH
` (133 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Steven Rostedt,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Steven Rostedt <srostedt@redhat.com>
commit 283740c619d211e34572cc93c8cdba92ccbdb9cc upstream.
In the ftrace code that resets the ring buffer it references the
buffer with a local variable, but then uses the tr->buffer as the
parameter to reset. If the wakeup tracer is running, which can
switch the tr->buffer with the max saved buffer, this can break
the requirement of disabling the buffer before the reset.
buffer = tr->buffer;
ring_buffer_record_disable(buffer);
synchronize_sched();
__tracing_reset(tr->buffer, cpu);
If the tr->buffer is swapped, then the reset is not happening to the
buffer that was disabled. This will cause the ring buffer to fail.
Found with Li Zefan's ftrace_stress_test.
Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/trace.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -747,10 +747,10 @@ out:
mutex_unlock(&trace_types_lock);
}
-static void __tracing_reset(struct trace_array *tr, int cpu)
+static void __tracing_reset(struct ring_buffer *buffer, int cpu)
{
ftrace_disable_cpu();
- ring_buffer_reset_cpu(tr->buffer, cpu);
+ ring_buffer_reset_cpu(buffer, cpu);
ftrace_enable_cpu();
}
@@ -762,7 +762,7 @@ void tracing_reset(struct trace_array *t
/* Make sure all commits have finished */
synchronize_sched();
- __tracing_reset(tr, cpu);
+ __tracing_reset(buffer, cpu);
ring_buffer_record_enable(buffer);
}
@@ -780,7 +780,7 @@ void tracing_reset_online_cpus(struct tr
tr->time_start = ftrace_now(tr->cpu);
for_each_online_cpu(cpu)
- __tracing_reset(tr, cpu);
+ __tracing_reset(buffer, cpu);
ring_buffer_record_enable(buffer);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [023/156] tracing: Disable buffer switching when starting or stopping trace
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (21 preceding siblings ...)
2010-03-30 22:40 ` [022/156] tracing: Use same local variable when resetting the ring buffer Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [024/156] tracing: Do not record user stack trace from NMI context Greg KH
` (132 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Steven Rostedt,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Steven Rostedt <srostedt@redhat.com>
commit a2f8071428ed9a0f06865f417c962421c9a6b488 upstream.
When the trace iterator is read, tracing_start() and tracing_stop()
is called to stop tracing while the iterator is processing the trace
output.
These functions disable both the standard buffer and the max latency
buffer. But if the wakeup tracer is running, it can switch these
buffers between the two disables:
buffer = global_trace.buffer;
if (buffer)
ring_buffer_record_disable(buffer);
<<<--------- swap happens here
buffer = max_tr.buffer;
if (buffer)
ring_buffer_record_disable(buffer);
What happens is that we disabled the same buffer twice. On tracing_start()
we can enable the same buffer twice. All ring_buffer_record_disable()
must be matched with a ring_buffer_record_enable() or the buffer
can be disable permanently, or enable prematurely, and cause a bug
where a reset happens while a trace is commiting.
This patch protects these two by taking the ftrace_max_lock to prevent
a switch from occurring.
Found with Li Zefan's ftrace_stress_test.
Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/trace.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -857,6 +857,8 @@ void tracing_start(void)
goto out;
}
+ /* Prevent the buffers from switching */
+ arch_spin_lock(&ftrace_max_lock);
buffer = global_trace.buffer;
if (buffer)
@@ -866,6 +868,8 @@ void tracing_start(void)
if (buffer)
ring_buffer_record_enable(buffer);
+ arch_spin_unlock(&ftrace_max_lock);
+
ftrace_start();
out:
spin_unlock_irqrestore(&tracing_start_lock, flags);
@@ -887,6 +891,9 @@ void tracing_stop(void)
if (trace_stop_count++)
goto out;
+ /* Prevent the buffers from switching */
+ arch_spin_lock(&ftrace_max_lock);
+
buffer = global_trace.buffer;
if (buffer)
ring_buffer_record_disable(buffer);
@@ -895,6 +902,8 @@ void tracing_stop(void)
if (buffer)
ring_buffer_record_disable(buffer);
+ arch_spin_unlock(&ftrace_max_lock);
+
out:
spin_unlock_irqrestore(&tracing_start_lock, flags);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [024/156] tracing: Do not record user stack trace from NMI context
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (22 preceding siblings ...)
2010-03-30 22:40 ` [023/156] tracing: Disable buffer switching when starting or stopping trace Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:40 ` [025/156] coredump: suppress uid comparison test if core output files are pipes Greg KH
` (131 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Steven Rostedt,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Steven Rostedt <srostedt@redhat.com>
commit b6345879ccbd9b92864fbd7eb8ac48acdb4d6b15 upstream.
A bug was found with Li Zefan's ftrace_stress_test that caused applications
to segfault during the test.
Placing a tracing_off() in the segfault code, and examining several
traces, I found that the following was always the case. The lock tracer
was enabled (lockdep being required) and userstack was enabled. Testing
this out, I just enabled the two, but that was not good enough. I needed
to run something else that could trigger it. Running a load like hackbench
did not work, but executing a new program would. The following would
trigger the segfault within seconds:
# echo 1 > /debug/tracing/options/userstacktrace
# echo 1 > /debug/tracing/events/lock/enable
# while :; do ls > /dev/null ; done
Enabling the function graph tracer and looking at what was happening
I finally noticed that all cashes happened just after an NMI.
1) | copy_user_handle_tail() {
1) | bad_area_nosemaphore() {
1) | __bad_area_nosemaphore() {
1) | no_context() {
1) | fixup_exception() {
1) 0.319 us | search_exception_tables();
1) 0.873 us | }
[...]
1) 0.314 us | __rcu_read_unlock();
1) 0.325 us | native_apic_mem_write();
1) 0.943 us | }
1) 0.304 us | rcu_nmi_exit();
[...]
1) 0.479 us | find_vma();
1) | bad_area() {
1) | __bad_area() {
After capturing several traces of failures, all of them happened
after an NMI. Curious about this, I added a trace_printk() to the NMI
handler to read the regs->ip to see where the NMI happened. In which I
found out it was here:
ffffffff8135b660 <page_fault>:
ffffffff8135b660: 48 83 ec 78 sub $0x78,%rsp
ffffffff8135b664: e8 97 01 00 00 callq ffffffff8135b800 <error_entry>
What was happening is that the NMI would happen at the place that a page
fault occurred. It would call rcu_read_lock() which was traced by
the lock events, and the user_stack_trace would run. This would trigger
a page fault inside the NMI. I do not see where the CR2 register is
saved or restored in NMI handling. This means that it would corrupt
the page fault handling that the NMI interrupted.
The reason the while loop of ls helped trigger the bug, was that
each execution of ls would cause lots of pages to be faulted in, and
increase the chances of the race happening.
The simple solution is to not allow user stack traces in NMI context.
After this patch, I ran the above "ls" test for a couple of hours
without any issues. Without this patch, the bug would trigger in less
than a minute.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/trace.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1191,6 +1191,13 @@ ftrace_trace_userstack(struct ring_buffe
if (!(trace_flags & TRACE_ITER_USERSTACKTRACE))
return;
+ /*
+ * NMIs can not handle page faults, even with fix ups.
+ * The save user stack can (and often does) fault.
+ */
+ if (unlikely(in_nmi()))
+ return;
+
event = trace_buffer_lock_reserve(buffer, TRACE_USER_STACK,
sizeof(*entry), flags, pc);
if (!event)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [025/156] coredump: suppress uid comparison test if core output files are pipes
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (23 preceding siblings ...)
2010-03-30 22:40 ` [024/156] tracing: Do not record user stack trace from NMI context Greg KH
@ 2010-03-30 22:40 ` Greg KH
2010-03-30 22:41 ` [026/156] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
` (130 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:40 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Neil Horman, Andi Kleen,
Oleg Nesterov, Al Viro, Ingo Molnar, maximilian attems,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Neil Horman <nhorman@tuxdriver.com>
commit 76595f79d76fbe6267a51b3a866a028d150f06d4 upstream.
Modify uid check in do_coredump so as to not apply it in the case of
pipes.
This just got noticed in testing. The end of do_coredump validates the
uid of the inode for the created file against the uid of the crashing
process to ensure that no one can pre-create a core file with different
ownership and grab the information contained in the core when they
shouldn' tbe able to. This causes failures when using pipes for a core
dumps if the crashing process is not root, which is the uid of the pipe
when it is created.
The fix is simple. Since the check for matching uid's isn't relevant for
pipes (a process can't create a pipe that the uermodehelper code will open
anyway), we can just just skip it in the event ispipe is non-zero
Reverts a pipe-affecting change which was accidentally made in
: commit c46f739dd39db3b07ab5deb4e3ec81e1c04a91af
: Author: Ingo Molnar <mingo@elte.hu>
: AuthorDate: Wed Nov 28 13:59:18 2007 +0100
: Commit: Linus Torvalds <torvalds@woody.linux-foundation.org>
: CommitDate: Wed Nov 28 10:58:01 2007 -0800
:
: vfs: coredumping fix
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/exec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1923,8 +1923,9 @@ void do_coredump(long signr, int exit_co
/*
* Dont allow local users get cute and trick others to coredump
* into their pre-created files:
+ * Note, this is not relevant for pipes
*/
- if (inode->i_uid != current_fsuid())
+ if (!ispipe && (inode->i_uid != current_fsuid()))
goto close_fail;
if (!cprm.file->f_op)
goto close_fail;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [026/156] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (24 preceding siblings ...)
2010-03-30 22:40 ` [025/156] coredump: suppress uid comparison test if core output files are pipes Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [027/156] KVM: x86: Add KVM_CAP_X86_ROBUST_SINGLESTEP Greg KH
` (129 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Francesco Lavra,
Mauro Carvalho Chehab, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Francesco Lavra <francescolavra@interfree.it>
commit 19f48cb105b7fa18d0dcab435919a3a29b7a7c4c upstream.
this patch fixes a memory leak which occurs when an em28xx card with DVB
extension is unplugged or its DVB extension driver is unloaded. In
dvb_fini(), dev->dvb must be freed before being set to NULL, as is done
in dvb_init() in case of error.
Note that this bug is also present in the latest stable kernel release.
Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/media/video/em28xx/em28xx-dvb.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -606,6 +606,7 @@ static int dvb_fini(struct em28xx *dev)
if (dev->dvb) {
unregister_dvb(dev->dvb);
+ kfree(dev->dvb);
dev->dvb = NULL;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [027/156] KVM: x86: Add KVM_CAP_X86_ROBUST_SINGLESTEP
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (25 preceding siblings ...)
2010-03-30 22:41 ` [026/156] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [028/156] pci: add support for 82576NS serdes to existing SR-IOV quirk Greg KH
` (128 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable, Greg KH
Cc: stable-review, torvalds, akpm, alan, Avi Kivity, Jan Kiszka,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Kiszka <jan.kiszka@siemens.com>
Commit d2be1651b736002e0c76d7095d6c0ba77b4a897c upstream.
This marks the guest single-step API improvement of 94fe45da and
91586a3b with a capability flag to allow reliable detection by user
space.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kvm/x86.c | 1 +
include/linux/kvm.h | 1 +
2 files changed, 2 insertions(+)
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1351,6 +1351,7 @@ int kvm_dev_ioctl_check_extension(long e
case KVM_CAP_XEN_HVM:
case KVM_CAP_ADJUST_CLOCK:
case KVM_CAP_VCPU_EVENTS:
+ case KVM_CAP_X86_ROBUST_SINGLESTEP:
r = 1;
break;
case KVM_CAP_COALESCED_MMIO:
--- a/include/linux/kvm.h
+++ b/include/linux/kvm.h
@@ -497,6 +497,7 @@ struct kvm_ioeventfd {
#endif
#define KVM_CAP_S390_PSW 42
#define KVM_CAP_PPC_SEGSTATE 43
+#define KVM_CAP_X86_ROBUST_SINGLESTEP 51
#ifdef KVM_CAP_IRQ_ROUTING
^ permalink raw reply [flat|nested] 432+ messages in thread
* [028/156] pci: add support for 82576NS serdes to existing SR-IOV quirk
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (26 preceding siblings ...)
2010-03-30 22:41 ` [027/156] KVM: x86: Add KVM_CAP_X86_ROBUST_SINGLESTEP Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [029/156] sparc64: Make prom entry spinlock NMI safe Greg KH
` (127 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alexander Duyck,
Jeff Kirsher, David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alexander Duyck <alexander.h.duyck@intel.com>
commit 7a0deb6bcda98c2a764cb87f1441eef920fd3663 upstream.
This patch adds support for the 82576NS Serdes adapter to the existing pci
quirk for 82576 parts.
Signed-off-by: Alexander Duyck <alexander.h.duyck@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/pci/quirks.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2534,6 +2534,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e8, quirk_i82576_sriov);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x150a, quirk_i82576_sriov);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x150d, quirk_i82576_sriov);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1518, quirk_i82576_sriov);
#endif /* CONFIG_PCI_IOV */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [029/156] sparc64: Make prom entry spinlock NMI safe.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (27 preceding siblings ...)
2010-03-30 22:41 ` [028/156] pci: add support for 82576NS serdes to existing SR-IOV quirk Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [030/156] sh: Fix zImage boot using fixed PMB Greg KH
` (126 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commit 8a4fd1e4922413cfdfa6c51a59efb720d904a5eb ]
If we do something like try to print to the OF console from an NMI
while we're already in OpenFirmware, we'll deadlock on the spinlock.
Use a raw spinlock and disable NMIs when we take it.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sparc/prom/p1275.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
--- a/arch/sparc/prom/p1275.c
+++ b/arch/sparc/prom/p1275.c
@@ -32,10 +32,9 @@ extern void prom_cif_interface(void);
extern void prom_cif_callback(void);
/*
- * This provides SMP safety on the p1275buf. prom_callback() drops this lock
- * to allow recursuve acquisition.
+ * This provides SMP safety on the p1275buf.
*/
-DEFINE_SPINLOCK(prom_entry_lock);
+DEFINE_RAW_SPINLOCK(prom_entry_lock);
long p1275_cmd(const char *service, long fmt, ...)
{
@@ -47,7 +46,9 @@ long p1275_cmd(const char *service, long
p = p1275buf.prom_buffer;
- spin_lock_irqsave(&prom_entry_lock, flags);
+ raw_local_save_flags(flags);
+ raw_local_irq_restore(PIL_NMI);
+ raw_spin_lock(&prom_entry_lock);
p1275buf.prom_args[0] = (unsigned long)p; /* service */
strcpy (p, service);
@@ -139,7 +140,8 @@ long p1275_cmd(const char *service, long
va_end(list);
x = p1275buf.prom_args [nargs + 3];
- spin_unlock_irqrestore(&prom_entry_lock, flags);
+ raw_spin_unlock(&prom_entry_lock);
+ raw_local_irq_restore(flags);
return x;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [030/156] sh: Fix zImage boot using fixed PMB.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (28 preceding siblings ...)
2010-03-30 22:41 ` [029/156] sparc64: Make prom entry spinlock NMI safe Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [031/156] ath9k: fix lockdep warning when unloading module Greg KH
` (125 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Nobuhiro Iwamatsu,
Yoshihiro Shimoda, Paul Mundt, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
commit 319c2cc761505ee54a9536c5d0b9c2ee3fb33866 upstream.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sh/boot/compressed/misc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/sh/boot/compressed/misc.c
+++ b/arch/sh/boot/compressed/misc.c
@@ -132,7 +132,7 @@ void decompress_kernel(void)
output_addr = (CONFIG_MEMORY_START + 0x2000);
#else
output_addr = __pa((unsigned long)&_text+PAGE_SIZE);
-#ifdef CONFIG_29BIT
+#if defined(CONFIG_29BIT) || defined(CONFIG_PMB_LEGACY)
output_addr |= P2SEG;
#endif
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [031/156] ath9k: fix lockdep warning when unloading module
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (29 preceding siblings ...)
2010-03-30 22:41 ` [030/156] sh: Fix zImage boot using fixed PMB Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [032/156] ath9k: add support for 802.11n bonded out AR2427 Greg KH
` (124 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ming Lei, John W. Linville,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ming Lei <tom.leiming@gmail.com>
commit a9f042cbe5284f34ccff15f3084477e11b39b17b upstream.
Since txq->axq_lock may be hold in softirq context, it must be
acquired with spin_lock_bh() instead of spin_lock() if softieq is
enabled.
The patch fixes the lockdep warning below when unloading ath9k modules.
=================================
[ INFO: inconsistent lock state ]
2.6.33-wl #12
---------------------------------
inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
rmmod/3642 [HC0[0]:SC0[0]:HE1:SE1] takes:
(&(&txq->axq_lock)->rlock){+.?...}, at: [<ffffffffa03568c3>] ath_tx_node_cleanup+0x62/0x180 [ath9k]
{IN-SOFTIRQ-W} state was registered at:
[<ffffffff8107577d>] __lock_acquire+0x2f6/0xd35
[<ffffffff81076289>] lock_acquire+0xcd/0xf1
[<ffffffff813a7486>] _raw_spin_lock_bh+0x3b/0x6e
[<ffffffffa0356b49>] spin_lock_bh+0xe/0x10 [ath9k]
[<ffffffffa0358ec7>] ath_tx_tasklet+0xcd/0x391 [ath9k]
[<ffffffffa0354f5f>] ath9k_tasklet+0x70/0xc8 [ath9k]
[<ffffffff8104e601>] tasklet_action+0x8c/0xf4
[<ffffffff8104f459>] __do_softirq+0xf8/0x1cd
[<ffffffff8100ab1c>] call_softirq+0x1c/0x30
[<ffffffff8100c2cf>] do_softirq+0x4b/0xa3
[<ffffffff8104f045>] irq_exit+0x4a/0x8c
[<ffffffff813acccc>] do_IRQ+0xac/0xc3
[<ffffffff813a7d53>] ret_from_intr+0x0/0x16
[<ffffffff81302d52>] cpuidle_idle_call+0x9e/0xf8
[<ffffffff81008be7>] cpu_idle+0x62/0x9d
[<ffffffff81391c1a>] rest_init+0x7e/0x80
[<ffffffff818bbd38>] start_kernel+0x3e8/0x3f3
[<ffffffff818bb2bc>] x86_64_start_reservations+0xa7/0xab
[<ffffffff818bb3b8>] x86_64_start_kernel+0xf8/0x107
irq event stamp: 42037
hardirqs last enabled at (42037): [<ffffffff813a7b21>] _raw_spin_unlock_irqrestore+0x47/0x56
hardirqs last disabled at (42036): [<ffffffff813a72f4>] _raw_spin_lock_irqsave+0x2b/0x88
softirqs last enabled at (42000): [<ffffffffa0353ea6>] spin_unlock_bh+0xe/0x10 [ath9k]
softirqs last disabled at (41998): [<ffffffff813a7463>] _raw_spin_lock_bh+0x18/0x6e
other info that might help us debug this:
4 locks held by rmmod/3642:
#0: (rtnl_mutex){+.+.+.}, at: [<ffffffff8132c10d>] rtnl_lock+0x17/0x19
#1: (&wdev->mtx){+.+.+.}, at: [<ffffffffa01e53f2>] cfg80211_netdev_notifier_call+0x28d/0x46d [cfg80211]
#2: (&ifmgd->mtx){+.+.+.}, at: [<ffffffffa0260834>] ieee80211_mgd_deauth+0x3f/0x17e [mac80211]
#3: (&local->sta_mtx){+.+.+.}, at: [<ffffffffa025a381>] sta_info_destroy_addr+0x2b/0x5e [mac80211]
stack backtrace:
Pid: 3642, comm: rmmod Not tainted 2.6.33-wl #12
Call Trace:
[<ffffffff81074469>] valid_state+0x178/0x18b
[<ffffffff81014f94>] ? save_stack_trace+0x2f/0x4c
[<ffffffff81074e08>] ? check_usage_backwards+0x0/0x88
[<ffffffff8107458f>] mark_lock+0x113/0x230
[<ffffffff810757f1>] __lock_acquire+0x36a/0xd35
[<ffffffff8101018d>] ? native_sched_clock+0x2d/0x5f
[<ffffffffa03568c3>] ? ath_tx_node_cleanup+0x62/0x180 [ath9k]
[<ffffffff81076289>] lock_acquire+0xcd/0xf1
[<ffffffffa03568c3>] ? ath_tx_node_cleanup+0x62/0x180 [ath9k]
[<ffffffff810732eb>] ? trace_hardirqs_off+0xd/0xf
[<ffffffff813a7193>] _raw_spin_lock+0x36/0x69
[<ffffffffa03568c3>] ? ath_tx_node_cleanup+0x62/0x180 [ath9k]
[<ffffffffa03568c3>] ath_tx_node_cleanup+0x62/0x180 [ath9k]
[<ffffffff810749ed>] ? trace_hardirqs_on+0xd/0xf
[<ffffffffa0353950>] ath9k_sta_remove+0x22/0x26 [ath9k]
[<ffffffffa025a08f>] __sta_info_destroy+0x1ad/0x38c [mac80211]
[<ffffffffa025a394>] sta_info_destroy_addr+0x3e/0x5e [mac80211]
[<ffffffffa02605d6>] ieee80211_set_disassoc+0x175/0x180 [mac80211]
[<ffffffffa026084d>] ieee80211_mgd_deauth+0x58/0x17e [mac80211]
[<ffffffff813a60c1>] ? __mutex_lock_common+0x37f/0x3a4
[<ffffffffa01e53f2>] ? cfg80211_netdev_notifier_call+0x28d/0x46d [cfg80211]
[<ffffffffa026786e>] ieee80211_deauth+0x1e/0x20 [mac80211]
[<ffffffffa01f47f9>] __cfg80211_mlme_deauth+0x130/0x13f [cfg80211]
[<ffffffffa01e53f2>] ? cfg80211_netdev_notifier_call+0x28d/0x46d [cfg80211]
[<ffffffff810732eb>] ? trace_hardirqs_off+0xd/0xf
[<ffffffffa01f7eee>] __cfg80211_disconnect+0x111/0x189 [cfg80211]
[<ffffffffa01e5433>] cfg80211_netdev_notifier_call+0x2ce/0x46d [cfg80211]
[<ffffffff813aa9ea>] notifier_call_chain+0x37/0x63
[<ffffffff81068c98>] raw_notifier_call_chain+0x14/0x16
[<ffffffff81322e97>] call_netdevice_notifiers+0x1b/0x1d
[<ffffffff8132386d>] dev_close+0x6a/0xa6
[<ffffffff8132395f>] rollback_registered_many+0xb6/0x2f4
[<ffffffff81323bb8>] unregister_netdevice_many+0x1b/0x66
[<ffffffffa026494f>] ieee80211_remove_interfaces+0xc5/0xd0 [mac80211]
[<ffffffffa02580a2>] ieee80211_unregister_hw+0x47/0xe8 [mac80211]
[<ffffffffa035290e>] ath9k_deinit_device+0x7a/0x9b [ath9k]
[<ffffffffa035bc26>] ath_pci_remove+0x38/0x76 [ath9k]
[<ffffffff8120940a>] pci_device_remove+0x2d/0x51
[<ffffffff8129d797>] __device_release_driver+0x7b/0xd1
[<ffffffff8129d885>] driver_detach+0x98/0xbe
[<ffffffff8129ca7a>] bus_remove_driver+0x94/0xb7
[<ffffffff8129ddd6>] driver_unregister+0x6c/0x74
[<ffffffff812096d2>] pci_unregister_driver+0x46/0xad
[<ffffffffa035bae1>] ath_pci_exit+0x15/0x17 [ath9k]
[<ffffffffa035e1a2>] ath9k_exit+0xe/0x2f [ath9k]
[<ffffffff8108050a>] sys_delete_module+0x1c7/0x236
[<ffffffff813a7df5>] ? retint_swapgs+0x13/0x1b
[<ffffffff810749b5>] ? trace_hardirqs_on_caller+0x119/0x144
[<ffffffff8109b9f6>] ? audit_syscall_entry+0x11e/0x14a
[<ffffffff81009bb2>] system_call_fastpath+0x16/0x1b
wlan1: deauthenticating from 00:23:cd:e1:f9:b2 by local choice (reason=3)
PM: Removing info for No Bus:wlan1
cfg80211: Calling CRDA to update world regulatory domain
PM: Removing info for No Bus:rfkill2
PM: Removing info for No Bus:phy1
ath9k 0000:16:00.0: PCI INT A disabled
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/xmit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2264,7 +2264,7 @@ void ath_tx_node_cleanup(struct ath_soft
if (ATH_TXQ_SETUP(sc, i)) {
txq = &sc->tx.txq[i];
- spin_lock(&txq->axq_lock);
+ spin_lock_bh(&txq->axq_lock);
list_for_each_entry_safe(ac,
ac_tmp, &txq->axq_acq, list) {
@@ -2285,7 +2285,7 @@ void ath_tx_node_cleanup(struct ath_soft
}
}
- spin_unlock(&txq->axq_lock);
+ spin_unlock_bh(&txq->axq_lock);
}
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [032/156] ath9k: add support for 802.11n bonded out AR2427
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (30 preceding siblings ...)
2010-03-30 22:41 ` [031/156] ath9k: fix lockdep warning when unloading module Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [033/156] mqueue: fix mq_open() file descriptor leak on user-space processes Greg KH
` (123 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Luis R. Rodriguez,
John W. Linville, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Luis R. Rodriguez <lrodriguez@atheros.com>
This is a backport of of upstream commit:
5ffaf8a361b4c9025963959a744f21d8173c7669
Some single chip family devices are sold in the market with
802.11n bonded out, these have no hardware capability for
02.11n but ath9k can still support them. These are called
AR2427.
Reported-by: Rolf Leggewie <bugzilla.kernel.org@rolf.leggewie.biz>
Tested-by: Bernhard Reiter <ockham@raz.or.at>
Signed-off-by: Luis R. Rodriguez <lrodriguez@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/hw.c | 7 ++++++-
drivers/net/wireless/ath/ath9k/hw.h | 1 +
drivers/net/wireless/ath/ath9k/main.c | 4 +++-
drivers/net/wireless/ath/ath9k/pci.c | 1 +
4 files changed, 11 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -380,7 +380,6 @@ static void ath9k_hw_init_config(struct
ah->config.pcie_clock_req = 0;
ah->config.pcie_waen = 0;
ah->config.analog_shiftreg = 1;
- ah->config.ht_enable = 1;
ah->config.ofdm_trig_low = 200;
ah->config.ofdm_trig_high = 500;
ah->config.cck_trig_high = 200;
@@ -392,6 +391,11 @@ static void ath9k_hw_init_config(struct
ah->config.spurchans[i][1] = AR_NO_SPUR;
}
+ if (ah->hw_version.devid != AR2427_DEVID_PCIE)
+ ah->config.ht_enable = 1;
+ else
+ ah->config.ht_enable = 0;
+
ah->config.intr_mitigation = true;
/*
@@ -590,6 +594,7 @@ static bool ath9k_hw_devid_supported(u16
case AR5416_DEVID_AR9287_PCI:
case AR5416_DEVID_AR9287_PCIE:
case AR9271_USB:
+ case AR2427_DEVID_PCIE:
return true;
default:
break;
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -40,6 +40,7 @@
#define AR9280_DEVID_PCI 0x0029
#define AR9280_DEVID_PCIE 0x002a
#define AR9285_DEVID_PCIE 0x002b
+#define AR2427_DEVID_PCIE 0x002c
#define AR5416_AR9100_DEVID 0x000b
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1854,11 +1854,13 @@ void ath_set_hw_capab(struct ath_softc *
hw->flags = IEEE80211_HW_RX_INCLUDES_FCS |
IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
IEEE80211_HW_SIGNAL_DBM |
- IEEE80211_HW_AMPDU_AGGREGATION |
IEEE80211_HW_SUPPORTS_PS |
IEEE80211_HW_PS_NULLFUNC_STACK |
IEEE80211_HW_SPECTRUM_MGMT;
+ if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
+ hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
+
if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || modparam_nohwcrypt)
hw->flags |= IEEE80211_HW_MFP_CAPABLE;
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -25,6 +25,7 @@ static struct pci_device_id ath_pci_id_t
{ PCI_VDEVICE(ATHEROS, 0x0029) }, /* PCI */
{ PCI_VDEVICE(ATHEROS, 0x002A) }, /* PCI-E */
{ PCI_VDEVICE(ATHEROS, 0x002B) }, /* PCI-E */
+ { PCI_VDEVICE(ATHEROS, 0x002C) }, /* PCI-E 802.11n bonded out */
{ PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI */
{ PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */
{ 0 }
^ permalink raw reply [flat|nested] 432+ messages in thread
* [033/156] mqueue: fix mq_open() file descriptor leak on user-space processes
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (31 preceding siblings ...)
2010-03-30 22:41 ` [032/156] ath9k: add support for 802.11n bonded out AR2427 Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [034/156] virtio: fix out of range array access Greg KH
` (122 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan,
André Goddard Rosa, Al Viro, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: André Goddard Rosa <andre.goddard@gmail.com>
commit 4294a8eedb17bbc45e1e7447c2a4d05332943248 upstream.
We leak fd on lookup_one_len() failure
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
ipc/mqueue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -705,7 +705,7 @@ SYSCALL_DEFINE4(mq_open, const char __us
dentry = lookup_one_len(name, ipc_ns->mq_mnt->mnt_root, strlen(name));
if (IS_ERR(dentry)) {
error = PTR_ERR(dentry);
- goto out_err;
+ goto out_putfd;
}
mntget(ipc_ns->mq_mnt);
@@ -742,7 +742,6 @@ out:
mntput(ipc_ns->mq_mnt);
out_putfd:
put_unused_fd(fd);
-out_err:
fd = error;
out_upsem:
mutex_unlock(&ipc_ns->mq_mnt->mnt_root->d_inode->i_mutex);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [034/156] virtio: fix out of range array access
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (32 preceding siblings ...)
2010-03-30 22:41 ` [033/156] mqueue: fix mq_open() file descriptor leak on user-space processes Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [035/156] iwlwifi: use dma_alloc_coherent Greg KH
` (121 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Michael S. Tsirkin,
Anthony Liguori, Shirley Ma, Amit Shah, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael S. Tsirkin <mst@redhat.com>
commit 3119815912a220bdac943dfbdfee640414c0c611 upstream.
I have observed the following error on virtio-net module unload:
------------[ cut here ]------------
WARNING: at kernel/irq/manage.c:858 __free_irq+0xa0/0x14c()
Hardware name: Bochs
Trying to free already-free IRQ 0
Modules linked in: virtio_net(-) virtio_blk virtio_pci virtio_ring
virtio af_packet e1000 shpchp aacraid uhci_hcd ohci_hcd ehci_hcd [last
unloaded: scsi_wait_scan]
Pid: 1957, comm: rmmod Not tainted 2.6.33-rc8-vhost #24
Call Trace:
[<ffffffff8103e195>] warn_slowpath_common+0x7c/0x94
[<ffffffff8103e204>] warn_slowpath_fmt+0x41/0x43
[<ffffffff810a7a36>] ? __free_pages+0x5a/0x70
[<ffffffff8107cc00>] __free_irq+0xa0/0x14c
[<ffffffff8107cceb>] free_irq+0x3f/0x65
[<ffffffffa0081424>] vp_del_vqs+0x81/0xb1 [virtio_pci]
[<ffffffffa0091d29>] virtnet_remove+0xda/0x10b [virtio_net]
[<ffffffffa0075200>] virtio_dev_remove+0x22/0x4a [virtio]
[<ffffffff812709ee>] __device_release_driver+0x66/0xac
[<ffffffff81270ab7>] driver_detach+0x83/0xa9
[<ffffffff8126fc66>] bus_remove_driver+0x91/0xb4
[<ffffffff81270fcf>] driver_unregister+0x6c/0x74
[<ffffffffa0075418>] unregister_virtio_driver+0xe/0x10 [virtio]
[<ffffffffa0091c4d>] fini+0x15/0x17 [virtio_net]
[<ffffffff8106997b>] sys_delete_module+0x1c3/0x230
[<ffffffff81007465>] ? old_ich_force_enable_hpet+0x117/0x164
[<ffffffff813bb720>] ? do_page_fault+0x29c/0x2cc
[<ffffffff81028e58>] sysenter_dispatch+0x7/0x27
---[ end trace 15e88e4c576cc62b ]---
The bug is in virtio-pci: we use msix_vector as array index to get irq
entry, but some vqs do not have a dedicated vector so this causes an out
of bounds access. By chance, we seem to often get 0 value, which
results in this error.
Fix by verifying that vector is legal before using it as index.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Shirley Ma <xma@us.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/virtio/virtio_pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -473,7 +473,8 @@ static void vp_del_vqs(struct virtio_dev
list_for_each_entry_safe(vq, n, &vdev->vqs, list) {
info = vq->priv;
- if (vp_dev->per_vq_vectors)
+ if (vp_dev->per_vq_vectors &&
+ info->msix_vector != VIRTIO_MSI_NO_VECTOR)
free_irq(vp_dev->msix_entries[info->msix_vector].vector,
vq);
vp_del_vq(vq);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [035/156] iwlwifi: use dma_alloc_coherent
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (33 preceding siblings ...)
2010-03-30 22:41 ` [034/156] virtio: fix out of range array access Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [036/156] can: fix bfin_can build error after alloc_candev() change Greg KH
` (120 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Stanislaw Gruszka,
Reinette Chatre, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stanislaw Gruszka <sgruszka@redhat.com>
commit f36d04abe684f9e2b07c6ebe9f77ae20eb5c1e84 upstream.
Change pci_alloc_consistent() to dma_alloc_coherent() so we can use
GFP_KERNEL flag.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/iwlwifi/iwl-3945.c | 8 +++-----
drivers/net/wireless/iwlwifi/iwl-core.c | 12 ++++++------
drivers/net/wireless/iwlwifi/iwl-helpers.h | 7 ++++---
drivers/net/wireless/iwlwifi/iwl-rx.c | 21 +++++++++++----------
drivers/net/wireless/iwlwifi/iwl-tx.c | 23 ++++++++++++-----------
drivers/net/wireless/iwlwifi/iwl3945-base.c | 16 ++++++++--------
6 files changed, 44 insertions(+), 43 deletions(-)
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -2474,11 +2474,9 @@ int iwl3945_hw_set_hw_params(struct iwl_
memset((void *)&priv->hw_params, 0,
sizeof(struct iwl_hw_params));
- priv->shared_virt =
- pci_alloc_consistent(priv->pci_dev,
- sizeof(struct iwl3945_shared),
- &priv->shared_phys);
-
+ priv->shared_virt = dma_alloc_coherent(&priv->pci_dev->dev,
+ sizeof(struct iwl3945_shared),
+ &priv->shared_phys, GFP_KERNEL);
if (!priv->shared_virt) {
IWL_ERR(priv, "failed to allocate pci memory\n");
mutex_unlock(&priv->mutex);
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1658,9 +1658,9 @@ EXPORT_SYMBOL(iwl_set_tx_power);
void iwl_free_isr_ict(struct iwl_priv *priv)
{
if (priv->ict_tbl_vir) {
- pci_free_consistent(priv->pci_dev, (sizeof(u32) * ICT_COUNT) +
- PAGE_SIZE, priv->ict_tbl_vir,
- priv->ict_tbl_dma);
+ dma_free_coherent(&priv->pci_dev->dev,
+ (sizeof(u32) * ICT_COUNT) + PAGE_SIZE,
+ priv->ict_tbl_vir, priv->ict_tbl_dma);
priv->ict_tbl_vir = NULL;
}
}
@@ -1676,9 +1676,9 @@ int iwl_alloc_isr_ict(struct iwl_priv *p
if (priv->cfg->use_isr_legacy)
return 0;
/* allocate shrared data table */
- priv->ict_tbl_vir = pci_alloc_consistent(priv->pci_dev, (sizeof(u32) *
- ICT_COUNT) + PAGE_SIZE,
- &priv->ict_tbl_dma);
+ priv->ict_tbl_vir = dma_alloc_coherent(&priv->pci_dev->dev,
+ (sizeof(u32) * ICT_COUNT) + PAGE_SIZE,
+ &priv->ict_tbl_dma, GFP_KERNEL);
if (!priv->ict_tbl_vir)
return -ENOMEM;
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -80,8 +80,8 @@ static inline void iwl_free_fw_desc(stru
struct fw_desc *desc)
{
if (desc->v_addr)
- pci_free_consistent(pci_dev, desc->len,
- desc->v_addr, desc->p_addr);
+ dma_free_coherent(&pci_dev->dev, desc->len,
+ desc->v_addr, desc->p_addr);
desc->v_addr = NULL;
desc->len = 0;
}
@@ -89,7 +89,8 @@ static inline void iwl_free_fw_desc(stru
static inline int iwl_alloc_fw_desc(struct pci_dev *pci_dev,
struct fw_desc *desc)
{
- desc->v_addr = pci_alloc_consistent(pci_dev, desc->len, &desc->p_addr);
+ desc->v_addr = dma_alloc_coherent(&pci_dev->dev, desc->len,
+ &desc->p_addr, GFP_KERNEL);
return (desc->v_addr != NULL) ? 0 : -ENOMEM;
}
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -350,10 +350,10 @@ void iwl_rx_queue_free(struct iwl_priv *
}
}
- pci_free_consistent(priv->pci_dev, 4 * RX_QUEUE_SIZE, rxq->bd,
- rxq->dma_addr);
- pci_free_consistent(priv->pci_dev, sizeof(struct iwl_rb_status),
- rxq->rb_stts, rxq->rb_stts_dma);
+ dma_free_coherent(&priv->pci_dev->dev, 4 * RX_QUEUE_SIZE, rxq->bd,
+ rxq->dma_addr);
+ dma_free_coherent(&priv->pci_dev->dev, sizeof(struct iwl_rb_status),
+ rxq->rb_stts, rxq->rb_stts_dma);
rxq->bd = NULL;
rxq->rb_stts = NULL;
}
@@ -362,7 +362,7 @@ EXPORT_SYMBOL(iwl_rx_queue_free);
int iwl_rx_queue_alloc(struct iwl_priv *priv)
{
struct iwl_rx_queue *rxq = &priv->rxq;
- struct pci_dev *dev = priv->pci_dev;
+ struct device *dev = &priv->pci_dev->dev;
int i;
spin_lock_init(&rxq->lock);
@@ -370,12 +370,13 @@ int iwl_rx_queue_alloc(struct iwl_priv *
INIT_LIST_HEAD(&rxq->rx_used);
/* Alloc the circular buffer of Read Buffer Descriptors (RBDs) */
- rxq->bd = pci_alloc_consistent(dev, 4 * RX_QUEUE_SIZE, &rxq->dma_addr);
+ rxq->bd = dma_alloc_coherent(dev, 4 * RX_QUEUE_SIZE, &rxq->dma_addr,
+ GFP_KERNEL);
if (!rxq->bd)
goto err_bd;
- rxq->rb_stts = pci_alloc_consistent(dev, sizeof(struct iwl_rb_status),
- &rxq->rb_stts_dma);
+ rxq->rb_stts = dma_alloc_coherent(dev, sizeof(struct iwl_rb_status),
+ &rxq->rb_stts_dma, GFP_KERNEL);
if (!rxq->rb_stts)
goto err_rb;
@@ -392,8 +393,8 @@ int iwl_rx_queue_alloc(struct iwl_priv *
return 0;
err_rb:
- pci_free_consistent(priv->pci_dev, 4 * RX_QUEUE_SIZE, rxq->bd,
- rxq->dma_addr);
+ dma_free_coherent(&priv->pci_dev->dev, 4 * RX_QUEUE_SIZE, rxq->bd,
+ rxq->dma_addr);
err_bd:
return -ENOMEM;
}
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -60,7 +60,8 @@ static const u16 default_tid_to_tx_fifo[
static inline int iwl_alloc_dma_ptr(struct iwl_priv *priv,
struct iwl_dma_ptr *ptr, size_t size)
{
- ptr->addr = pci_alloc_consistent(priv->pci_dev, size, &ptr->dma);
+ ptr->addr = dma_alloc_coherent(&priv->pci_dev->dev, size, &ptr->dma,
+ GFP_KERNEL);
if (!ptr->addr)
return -ENOMEM;
ptr->size = size;
@@ -73,7 +74,7 @@ static inline void iwl_free_dma_ptr(stru
if (unlikely(!ptr->addr))
return;
- pci_free_consistent(priv->pci_dev, ptr->size, ptr->addr, ptr->dma);
+ dma_free_coherent(&priv->pci_dev->dev, ptr->size, ptr->addr, ptr->dma);
memset(ptr, 0, sizeof(*ptr));
}
@@ -146,7 +147,7 @@ void iwl_tx_queue_free(struct iwl_priv *
{
struct iwl_tx_queue *txq = &priv->txq[txq_id];
struct iwl_queue *q = &txq->q;
- struct pci_dev *dev = priv->pci_dev;
+ struct device *dev = &priv->pci_dev->dev;
int i;
if (q->n_bd == 0)
@@ -163,8 +164,8 @@ void iwl_tx_queue_free(struct iwl_priv *
/* De-alloc circular buffer of TFDs */
if (txq->q.n_bd)
- pci_free_consistent(dev, priv->hw_params.tfd_size *
- txq->q.n_bd, txq->tfds, txq->q.dma_addr);
+ dma_free_coherent(dev, priv->hw_params.tfd_size *
+ txq->q.n_bd, txq->tfds, txq->q.dma_addr);
/* De-alloc array of per-TFD driver data */
kfree(txq->txb);
@@ -193,7 +194,7 @@ void iwl_cmd_queue_free(struct iwl_priv
{
struct iwl_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM];
struct iwl_queue *q = &txq->q;
- struct pci_dev *dev = priv->pci_dev;
+ struct device *dev = &priv->pci_dev->dev;
int i;
if (q->n_bd == 0)
@@ -205,8 +206,8 @@ void iwl_cmd_queue_free(struct iwl_priv
/* De-alloc circular buffer of TFDs */
if (txq->q.n_bd)
- pci_free_consistent(dev, priv->hw_params.tfd_size *
- txq->q.n_bd, txq->tfds, txq->q.dma_addr);
+ dma_free_coherent(dev, priv->hw_params.tfd_size * txq->q.n_bd,
+ txq->tfds, txq->q.dma_addr);
/* deallocate arrays */
kfree(txq->cmd);
@@ -297,7 +298,7 @@ static int iwl_queue_init(struct iwl_pri
static int iwl_tx_queue_alloc(struct iwl_priv *priv,
struct iwl_tx_queue *txq, u32 id)
{
- struct pci_dev *dev = priv->pci_dev;
+ struct device *dev = &priv->pci_dev->dev;
size_t tfd_sz = priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX;
/* Driver private data, only for Tx (not command) queues,
@@ -316,8 +317,8 @@ static int iwl_tx_queue_alloc(struct iwl
/* Circular buffer of transmit frame descriptors (TFDs),
* shared with device */
- txq->tfds = pci_alloc_consistent(dev, tfd_sz, &txq->q.dma_addr);
-
+ txq->tfds = dma_alloc_coherent(dev, tfd_sz, &txq->q.dma_addr,
+ GFP_KERNEL);
if (!txq->tfds) {
IWL_ERR(priv, "pci_alloc_consistent(%zd) failed\n", tfd_sz);
goto error;
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -352,10 +352,10 @@ static int iwl3945_send_beacon_cmd(struc
static void iwl3945_unset_hw_params(struct iwl_priv *priv)
{
if (priv->shared_virt)
- pci_free_consistent(priv->pci_dev,
- sizeof(struct iwl3945_shared),
- priv->shared_virt,
- priv->shared_phys);
+ dma_free_coherent(&priv->pci_dev->dev,
+ sizeof(struct iwl3945_shared),
+ priv->shared_virt,
+ priv->shared_phys);
}
static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
@@ -1253,10 +1253,10 @@ static void iwl3945_rx_queue_free(struct
}
}
- pci_free_consistent(priv->pci_dev, 4 * RX_QUEUE_SIZE, rxq->bd,
- rxq->dma_addr);
- pci_free_consistent(priv->pci_dev, sizeof(struct iwl_rb_status),
- rxq->rb_stts, rxq->rb_stts_dma);
+ dma_free_coherent(&priv->pci_dev->dev, 4 * RX_QUEUE_SIZE, rxq->bd,
+ rxq->dma_addr);
+ dma_free_coherent(&priv->pci_dev->dev, sizeof(struct iwl_rb_status),
+ rxq->rb_stts, rxq->rb_stts_dma);
rxq->bd = NULL;
rxq->rb_stts = NULL;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [036/156] can: fix bfin_can build error after alloc_candev() change
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (34 preceding siblings ...)
2010-03-30 22:41 ` [035/156] iwlwifi: use dma_alloc_coherent Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [037/156] perf annotate: Defer allocating sym_priv->hist array Greg KH
` (119 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Barry Song, Mike Frysinger,
Wolfgang Grandegger, David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Barry Song <barry.song@analog.com>
commit e9dcd1613f0ac0b3573b7d813a2c5672cd8302eb upstream.
Looks like commit a6e4bc530403 didn't include updates to drivers so the
Blackfin CAN driver fails to build now.
Signed-off-by: Barry Song <barry.song@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/can/bfin_can.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/can/bfin_can.c
+++ b/drivers/net/can/bfin_can.c
@@ -26,6 +26,7 @@
#define DRV_NAME "bfin_can"
#define BFIN_CAN_TIMEOUT 100
+#define TX_ECHO_SKB_MAX 1
/*
* transmit and receive channels
@@ -590,7 +591,7 @@ struct net_device *alloc_bfin_candev(voi
struct net_device *dev;
struct bfin_can_priv *priv;
- dev = alloc_candev(sizeof(*priv));
+ dev = alloc_candev(sizeof(*priv), TX_ECHO_SKB_MAX);
if (!dev)
return NULL;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [037/156] perf annotate: Defer allocating sym_priv->hist array
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (35 preceding siblings ...)
2010-03-30 22:41 ` [036/156] can: fix bfin_can build error after alloc_candev() change Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [038/156] sched: Fix SCHED_MC regression caused by change in sched cpu_power Greg KH
` (118 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David Miller,
Frédéric Weisbecker, Mike Galbraith,
Peter Zijlstra, Paul Mackerras, Ingo Molnar,
Arnaldo Carvalho de Melo, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 4980 bytes --]
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Arnaldo Carvalho de Melo <acme@infradead.org>
commit 628ada0cb03666dd463f7c25947eaccdf440c309 upstream
Because symbol->end is not fixed up at symbol_filter time, only
after all symbols for a DSO are loaded, and that, for asm
symbols, may be bogus, causing segfaults when hits happen in
these symbols.
Backported-from: 628ada0
Reported-by: David Miller <davem@davemloft.net>
Reported-by: Anton Blanchard <anton@samba.org>
Acked-by: David Miller <davem@davemloft.net>
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
LKML-Reference: <20100225155740.GB8553@ghostprotocols.net>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
tools/perf/builtin-annotate.c | 65 +++++++++++++++++++++---------------------
tools/perf/util/symbol.c | 2 -
tools/perf/util/symbol.h | 2 +
3 files changed, 36 insertions(+), 33 deletions(-)
--- a/tools/perf/builtin-annotate.c
+++ b/tools/perf/builtin-annotate.c
@@ -53,32 +53,20 @@ struct sym_priv {
static const char *sym_hist_filter;
-static int symbol_filter(struct map *map __used, struct symbol *sym)
+static int sym__alloc_hist(struct symbol *self)
{
- if (sym_hist_filter == NULL ||
- strcmp(sym->name, sym_hist_filter) == 0) {
- struct sym_priv *priv = symbol__priv(sym);
- const int size = (sizeof(*priv->hist) +
- (sym->end - sym->start) * sizeof(u64));
-
- priv->hist = malloc(size);
- if (priv->hist)
- memset(priv->hist, 0, size);
- return 0;
- }
- /*
- * FIXME: We should really filter it out, as we don't want to go thru symbols
- * we're not interested, and if a DSO ends up with no symbols, delete it too,
- * but right now the kernel loading routines in symbol.c bail out if no symbols
- * are found, fix it later.
- */
- return 0;
+ struct sym_priv *priv = symbol__priv(self);
+ const int size = (sizeof(*priv->hist) +
+ (self->end - self->start) * sizeof(u64));
+
+ priv->hist = zalloc(size);
+ return priv->hist == NULL ? -1 : 0;
}
/*
* collect histogram counts
*/
-static void hist_hit(struct hist_entry *he, u64 ip)
+static int annotate__hist_hit(struct hist_entry *he, u64 ip)
{
unsigned int sym_size, offset;
struct symbol *sym = he->sym;
@@ -88,11 +76,11 @@ static void hist_hit(struct hist_entry *
he->count++;
if (!sym || !he->map)
- return;
+ return 0;
priv = symbol__priv(sym);
- if (!priv->hist)
- return;
+ if (priv->hist == NULL && sym__alloc_hist(sym) < 0)
+ return -ENOMEM;
sym_size = sym->end - sym->start;
offset = ip - sym->start;
@@ -102,7 +90,7 @@ static void hist_hit(struct hist_entry *
he->map->unmap_ip(he->map, ip));
if (offset >= sym_size)
- return;
+ return 0;
h = priv->hist;
h->sum++;
@@ -114,18 +102,31 @@ static void hist_hit(struct hist_entry *
he->sym->name,
(void *)(unsigned long)ip, ip - he->sym->start,
h->ip[offset]);
+ return 0;
}
static int perf_session__add_hist_entry(struct perf_session *self,
struct addr_location *al, u64 count)
{
- bool hit;
- struct hist_entry *he = __perf_session__add_hist_entry(self, al, NULL,
- count, &hit);
- if (he == NULL)
- return -ENOMEM;
- hist_hit(he, al->addr);
- return 0;
+ bool hit;
+ struct hist_entry *he;
+
+ if (sym_hist_filter != NULL &&
+ (al->sym == NULL || strcmp(sym_hist_filter, al->sym->name) != 0)) {
+ /* We're only interested in a symbol named sym_hist_filter */
+ if (al->sym != NULL) {
+ rb_erase(&al->sym->rb_node,
+ &al->map->dso->symbols[al->map->type]);
+ symbol__delete(al->sym);
+ }
+ return 0;
+ }
+
+ he = __perf_session__add_hist_entry(self, al, NULL, count, &hit);
+ if (he == NULL)
+ return -ENOMEM;
+
+ return annotate__hist_hit(he, al->addr);
}
static int process_sample_event(event_t *event, struct perf_session *session)
@@ -135,7 +136,7 @@ static int process_sample_event(event_t
dump_printf("(IP, %d): %d: %p\n", event->header.misc,
event->ip.pid, (void *)(long)event->ip.ip);
- if (event__preprocess_sample(event, session, &al, symbol_filter) < 0) {
+ if (event__preprocess_sample(event, session, &al, NULL) < 0) {
fprintf(stderr, "problem processing %d event, skipping it.\n",
event->header.type);
return -1;
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -149,7 +149,7 @@ static struct symbol *symbol__new(u64 st
return self;
}
-static void symbol__delete(struct symbol *self)
+void symbol__delete(struct symbol *self)
{
free(((void *)self) - symbol_conf.priv_size);
}
--- a/tools/perf/util/symbol.h
+++ b/tools/perf/util/symbol.h
@@ -49,6 +49,8 @@ struct symbol {
char name[0];
};
+void symbol__delete(struct symbol *self);
+
struct strlist;
struct symbol_conf {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [038/156] sched: Fix SCHED_MC regression caused by change in sched cpu_power
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (36 preceding siblings ...)
2010-03-30 22:41 ` [037/156] perf annotate: Defer allocating sym_priv->hist array Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [039/156] ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212 Greg KH
` (117 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable, Greg KH
Cc: stable-review, torvalds, akpm, alan, Ma Ling, Zhang, Yanmin,
Suresh Siddha, Ingo Molnar, Peter Zijlstra
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Suresh Siddha <suresh.b.siddha@intel.com>
commit dd5feea14a7de4edbd9f36db1a2db785de91b88d upstream
On platforms like dual socket quad-core platform, the scheduler load
balancer is not detecting the load imbalances in certain scenarios. This
is leading to scenarios like where one socket is completely busy (with
all the 4 cores running with 4 tasks) and leaving another socket
completely idle. This causes performance issues as those 4 tasks share
the memory controller, last-level cache bandwidth etc. Also we won't be
taking advantage of turbo-mode as much as we would like, etc.
Some of the comparisons in the scheduler load balancing code are
comparing the "weighted cpu load that is scaled wrt sched_group's
cpu_power" with the "weighted average load per task that is not scaled
wrt sched_group's cpu_power". While this has probably been broken for a
longer time (for multi socket numa nodes etc), the problem got aggrevated
via this recent change:
|
| commit f93e65c186ab3c05ce2068733ca10e34fd00125e
| Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
| Date: Tue Sep 1 10:34:32 2009 +0200
|
| sched: Restore __cpu_power to a straight sum of power
|
Also with this change, the sched group cpu power alone no longer reflects
the group capacity that is needed to implement MC, MT performance
(default) and power-savings (user-selectable) policies.
We need to use the computed group capacity (sgs.group_capacity, that is
computed using the SD_PREFER_SIBLING logic in update_sd_lb_stats()) to
find out if the group with the max load is above its capacity and how
much load to move etc.
Reported-by: Ma Ling <ling.ma@intel.com>
Initial-Analysis-by: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
[ -v2: build fix ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1266970432.11588.22.camel@sbs-t61.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/sched.c | 76 ++++++++++++++++++++++++++++++++-------------------------
1 file changed, 43 insertions(+), 33 deletions(-)
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3423,6 +3423,7 @@ struct sd_lb_stats {
unsigned long max_load;
unsigned long busiest_load_per_task;
unsigned long busiest_nr_running;
+ unsigned long busiest_group_capacity;
int group_imb; /* Is there imbalance in this sd */
#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
@@ -3742,8 +3743,7 @@ static inline void update_sg_lb_stats(st
unsigned long load, max_cpu_load, min_cpu_load;
int i;
unsigned int balance_cpu = -1, first_idle_cpu = 0;
- unsigned long sum_avg_load_per_task;
- unsigned long avg_load_per_task;
+ unsigned long avg_load_per_task = 0;
if (local_group) {
balance_cpu = group_first_cpu(group);
@@ -3752,7 +3752,6 @@ static inline void update_sg_lb_stats(st
}
/* Tally up the load of all CPUs in the group */
- sum_avg_load_per_task = avg_load_per_task = 0;
max_cpu_load = 0;
min_cpu_load = ~0UL;
@@ -3782,7 +3781,6 @@ static inline void update_sg_lb_stats(st
sgs->sum_nr_running += rq->nr_running;
sgs->sum_weighted_load += weighted_cpuload(i);
- sum_avg_load_per_task += cpu_avg_load_per_task(i);
}
/*
@@ -3800,7 +3798,6 @@ static inline void update_sg_lb_stats(st
/* Adjust by relative CPU power of the group */
sgs->avg_load = (sgs->group_load * SCHED_LOAD_SCALE) / group->cpu_power;
-
/*
* Consider the group unbalanced when the imbalance is larger
* than the average weight of two tasks.
@@ -3810,8 +3807,8 @@ static inline void update_sg_lb_stats(st
* normalized nr_running number somewhere that negates
* the hierarchy?
*/
- avg_load_per_task = (sum_avg_load_per_task * SCHED_LOAD_SCALE) /
- group->cpu_power;
+ if (sgs->sum_nr_running)
+ avg_load_per_task = sgs->sum_weighted_load / sgs->sum_nr_running;
if ((max_cpu_load - min_cpu_load) > 2*avg_load_per_task)
sgs->group_imb = 1;
@@ -3880,6 +3877,7 @@ static inline void update_sd_lb_stats(st
sds->max_load = sgs.avg_load;
sds->busiest = group;
sds->busiest_nr_running = sgs.sum_nr_running;
+ sds->busiest_group_capacity = sgs.group_capacity;
sds->busiest_load_per_task = sgs.sum_weighted_load;
sds->group_imb = sgs.group_imb;
}
@@ -3902,6 +3900,7 @@ static inline void fix_small_imbalance(s
{
unsigned long tmp, pwr_now = 0, pwr_move = 0;
unsigned int imbn = 2;
+ unsigned long scaled_busy_load_per_task;
if (sds->this_nr_running) {
sds->this_load_per_task /= sds->this_nr_running;
@@ -3912,8 +3911,12 @@ static inline void fix_small_imbalance(s
sds->this_load_per_task =
cpu_avg_load_per_task(this_cpu);
- if (sds->max_load - sds->this_load + sds->busiest_load_per_task >=
- sds->busiest_load_per_task * imbn) {
+ scaled_busy_load_per_task = sds->busiest_load_per_task
+ * SCHED_LOAD_SCALE;
+ scaled_busy_load_per_task /= sds->busiest->cpu_power;
+
+ if (sds->max_load - sds->this_load + scaled_busy_load_per_task >=
+ (scaled_busy_load_per_task * imbn)) {
*imbalance = sds->busiest_load_per_task;
return;
}
@@ -3964,7 +3967,14 @@ static inline void fix_small_imbalance(s
static inline void calculate_imbalance(struct sd_lb_stats *sds, int this_cpu,
unsigned long *imbalance)
{
- unsigned long max_pull;
+ unsigned long max_pull, load_above_capacity = ~0UL;
+
+ sds->busiest_load_per_task /= sds->busiest_nr_running;
+ if (sds->group_imb) {
+ sds->busiest_load_per_task =
+ min(sds->busiest_load_per_task, sds->avg_load);
+ }
+
/*
* In the presence of smp nice balancing, certain scenarios can have
* max load less than avg load(as we skip the groups at or below
@@ -3975,9 +3985,29 @@ static inline void calculate_imbalance(s
return fix_small_imbalance(sds, this_cpu, imbalance);
}
- /* Don't want to pull so many tasks that a group would go idle */
- max_pull = min(sds->max_load - sds->avg_load,
- sds->max_load - sds->busiest_load_per_task);
+ if (!sds->group_imb) {
+ /*
+ * Don't want to pull so many tasks that a group would go idle.
+ */
+ load_above_capacity = (sds->busiest_nr_running -
+ sds->busiest_group_capacity);
+
+ load_above_capacity *= (SCHED_LOAD_SCALE * SCHED_LOAD_SCALE);
+
+ load_above_capacity /= sds->busiest->cpu_power;
+ }
+
+ /*
+ * We're trying to get all the cpus to the average_load, so we don't
+ * want to push ourselves above the average load, nor do we wish to
+ * reduce the max loaded cpu below the average load. At the same time,
+ * we also don't want to reduce the group load below the group capacity
+ * (so that we can implement power-savings policies etc). Thus we look
+ * for the minimum possible imbalance.
+ * Be careful of negative numbers as they'll appear as very large values
+ * with unsigned longs.
+ */
+ max_pull = min(sds->max_load - sds->avg_load, load_above_capacity);
/* How much load to actually move to equalise the imbalance */
*imbalance = min(max_pull * sds->busiest->cpu_power,
@@ -4045,7 +4075,6 @@ find_busiest_group(struct sched_domain *
* 4) This group is more busy than the avg busieness at this
* sched_domain.
* 5) The imbalance is within the specified limit.
- * 6) Any rebalance would lead to ping-pong
*/
if (balance && !(*balance))
goto ret;
@@ -4064,25 +4093,6 @@ find_busiest_group(struct sched_domain *
if (100 * sds.max_load <= sd->imbalance_pct * sds.this_load)
goto out_balanced;
- sds.busiest_load_per_task /= sds.busiest_nr_running;
- if (sds.group_imb)
- sds.busiest_load_per_task =
- min(sds.busiest_load_per_task, sds.avg_load);
-
- /*
- * We're trying to get all the cpus to the average_load, so we don't
- * want to push ourselves above the average load, nor do we wish to
- * reduce the max loaded cpu below the average load, as either of these
- * actions would just result in more rebalancing later, and ping-pong
- * tasks around. Thus we look for the minimum possible imbalance.
- * Negative imbalances (*we* are more loaded than anyone else) will
- * be counted as no imbalance for these purposes -- we can't fix that
- * by pulling tasks to us. Be careful of negative numbers as they'll
- * appear as very large values with unsigned longs.
- */
- if (sds.max_load <= sds.busiest_load_per_task)
- goto out_balanced;
-
/* Looks like there is an imbalance. Compute it */
calculate_imbalance(&sds, this_cpu, imbalance);
return sds.busiest;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [039/156] ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (37 preceding siblings ...)
2010-03-30 22:41 ` [038/156] sched: Fix SCHED_MC regression caused by change in sched cpu_power Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [040/156] ALSA: hda - Disable MSI for Nvidia controller Greg KH
` (116 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit 572c0e3c73341755f3e7dfaaef6b26df12bd709c upstream.
BugLink: https://bugs.launchpad.net/bugs/538895
The OR has verified that both position_fix=1 and model=6stack-dig are
necessary to have capture function properly. (The existing 3stack-6ch
model quirk seems to be incorrect.)
Reported-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Tested-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/hda_intel.c | 1 +
sound/pci/hda/patch_realtek.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2267,6 +2267,7 @@ static struct snd_pci_quirk position_fix
SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB),
+ SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB),
{}
};
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -9101,7 +9101,7 @@ static struct snd_pci_quirk alc882_cfg_t
SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_INTEL),
SND_PCI_QUIRK(0x8086, 0x0021, "Intel IbexPeak", ALC889A_INTEL),
SND_PCI_QUIRK(0x8086, 0x3b56, "Intel IbexPeak", ALC889A_INTEL),
- SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch),
+ SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC882_6ST_DIG),
{}
};
^ permalink raw reply [flat|nested] 432+ messages in thread
* [040/156] ALSA: hda - Disable MSI for Nvidia controller
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (38 preceding siblings ...)
2010-03-30 22:41 ` [039/156] ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212 Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [041/156] ALSA: hda - Fix secondary ADC of ALC260 basic model Greg KH
` (115 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Takashi Iwai,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 80c43ed724797627d8f86855248c497a6161a214 upstream.
Judging from the member of enable_msi white-list, Nvidia controller
seems to cause troubles with MSI enabled, e.g. boot hang up or other
serious issue may come up. It's safer to disable MSI as default for
Nvidia controllers again for now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/hda_intel.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2374,6 +2374,13 @@ static void __devinit check_msi(struct a
"hda_intel: msi for device %04x:%04x set to %d\n",
q->subvendor, q->subdevice, q->value);
chip->msi = q->value;
+ return;
+ }
+
+ /* NVidia chipsets seem to cause troubles with MSI */
+ if (chip->driver_type == AZX_DRIVER_NVIDIA) {
+ printk(KERN_INFO "hda_intel: Disable MSI for Nvidia chipset\n");
+ chip->msi = 0;
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [041/156] ALSA: hda - Fix secondary ADC of ALC260 basic model
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (39 preceding siblings ...)
2010-03-30 22:41 ` [040/156] ALSA: hda - Disable MSI for Nvidia controller Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [042/156] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki) Greg KH
` (114 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Takashi Iwai,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 9c4cc0bdede1c39bde60a0d5d9251aac71fbe719 upstream.
Fix adc_nids[] for ALC260 basic model to match with num_adc_nids.
Otherwise you get an invalid NID in the secondary "Input Source" mixer
element.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/patch_realtek.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6384,7 +6384,7 @@ static struct alc_config_preset alc260_p
.num_dacs = ARRAY_SIZE(alc260_dac_nids),
.dac_nids = alc260_dac_nids,
.num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids),
- .adc_nids = alc260_adc_nids,
+ .adc_nids = alc260_dual_adc_nids,
.num_channel_mode = ARRAY_SIZE(alc260_modes),
.channel_mode = alc260_modes,
.input_mux = &alc260_capture_source,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [042/156] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (40 preceding siblings ...)
2010-03-30 22:41 ` [041/156] ALSA: hda - Fix secondary ADC of ALC260 basic model Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [043/156] ALSA: cmipci: work around invalid PCM pointer Greg KH
` (113 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit 025f206c9e0f96cc41567b01c07fb852d8900da1 upstream.
BugLink: https://launchpad.net/bugs/420578
The OR has verified that his hardware distorts because of the 0 dB
offset not corresponding to the highest PCM level. Fix this by capping
said PCM level to 0 dB similarly to what we do for CX20549 (Venice).
Reported-by: Mike Pontillo <pontillo@gmail.com>
Tested-by: Mike Pontillo <pontillo@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/patch_conexant.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1570,6 +1570,21 @@ static int patch_cxt5047(struct hda_code
#endif
}
spec->vmaster_nid = 0x13;
+
+ switch (codec->subsystem_id >> 16) {
+ case 0x103c:
+ /* HP laptops have really bad sound over 0 dB on NID 0x10.
+ * Fix max PCM level to 0 dB (originally it has 0x1e steps
+ * with 0 dB offset 0x17)
+ */
+ snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT,
+ (0x17 << AC_AMPCAP_OFFSET_SHIFT) |
+ (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
+ (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
+ (1 << AC_AMPCAP_MUTE_SHIFT));
+ break;
+ }
+
return 0;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [043/156] ALSA: cmipci: work around invalid PCM pointer
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (41 preceding siblings ...)
2010-03-30 22:41 ` [042/156] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki) Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [044/156] gigaset: correct clearing of at_state strings on RING Greg KH
` (112 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch,
Takashi Iwai, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit 1c583063a5c769fe2ec604752e383972c69e6d9b upstream.
When the CMI8738 FRAME2 register is read, the chip sometimes (probably
when wrapping around) returns an invalid value that would be outside the
programmed DMA buffer. This leads to an inconsistent PCM pointer that is
likely to result in an underrun.
To work around this, read the register multiple times until we get a
valid value; the error state seems to be very short-lived.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Matija Nalis <mnalis-alsadev@voyager.hr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/cmipci.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -941,13 +941,21 @@ static snd_pcm_uframes_t snd_cmipci_pcm_
struct snd_pcm_substream *substream)
{
size_t ptr;
- unsigned int reg;
+ unsigned int reg, rem, tries;
+
if (!rec->running)
return 0;
#if 1 // this seems better..
reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2;
- ptr = rec->dma_size - (snd_cmipci_read_w(cm, reg) + 1);
- ptr >>= rec->shift;
+ for (tries = 0; tries < 3; tries++) {
+ rem = snd_cmipci_read_w(cm, reg);
+ if (rem < rec->dma_size)
+ goto ok;
+ }
+ printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem);
+ return SNDRV_PCM_POS_XRUN;
+ok:
+ ptr = (rec->dma_size - (rem + 1)) >> rec->shift;
#else
reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1;
ptr = snd_cmipci_read(cm, reg) - rec->offset;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [044/156] gigaset: correct clearing of at_state strings on RING
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (42 preceding siblings ...)
2010-03-30 22:41 ` [043/156] ALSA: cmipci: work around invalid PCM pointer Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [045/156] gigaset: prune use of tty_buffer_request_room Greg KH
` (111 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tilman Schmidt, Karsten Keil,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
commit 3a0a3a6b92edf181f849ebd8417122392ba73a96 upstream.
In RING handling, clear the table of received parameter strings in
a loop like everywhere else, instead of by enumeration which had
already gotten out of sync.
Impact: minor bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/isdn/gigaset/ev-layer.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -1259,14 +1259,10 @@ static void do_action(int action, struct
* note that bcs may be NULL if no B channel is free
*/
at_state2->ConState = 700;
- kfree(at_state2->str_var[STR_NMBR]);
- at_state2->str_var[STR_NMBR] = NULL;
- kfree(at_state2->str_var[STR_ZCPN]);
- at_state2->str_var[STR_ZCPN] = NULL;
- kfree(at_state2->str_var[STR_ZBC]);
- at_state2->str_var[STR_ZBC] = NULL;
- kfree(at_state2->str_var[STR_ZHLC]);
- at_state2->str_var[STR_ZHLC] = NULL;
+ for (i = 0; i < STR_NUM; ++i) {
+ kfree(at_state2->str_var[i]);
+ at_state2->str_var[i] = NULL;
+ }
at_state2->int_var[VAR_ZCTP] = -1;
spin_lock_irqsave(&cs->lock, flags);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [045/156] gigaset: prune use of tty_buffer_request_room
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (43 preceding siblings ...)
2010-03-30 22:41 ` [044/156] gigaset: correct clearing of at_state strings on RING Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [046/156] gigaset: avoid registering CAPI driver more than once Greg KH
` (110 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tilman Schmidt, Karsten Keil,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
commit 873a69a358a6b393fd8d9d92e193ec8895cac4d7 upstream.
Calling tty_buffer_request_room() before tty_insert_flip_string()
is unnecessary, costs CPU and for big buffers can mess up the
multi-page allocation avoidance.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/isdn/gigaset/interface.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/isdn/gigaset/interface.c
+++ b/drivers/isdn/gigaset/interface.c
@@ -632,7 +632,6 @@ void gigaset_if_receive(struct cardstate
if (tty == NULL)
gig_dbg(DEBUG_ANY, "receive on closed device");
else {
- tty_buffer_request_room(tty, len);
tty_insert_flip_string(tty, buffer, len);
tty_flip_buffer_push(tty);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [046/156] gigaset: avoid registering CAPI driver more than once
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (44 preceding siblings ...)
2010-03-30 22:41 ` [045/156] gigaset: prune use of tty_buffer_request_room Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [047/156] gigaset: fix build failure Greg KH
` (109 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tilman Schmidt, Karsten Keil,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
commit bc35b4e347c047fb1c665bb761ddb22482539f7f upstream.
Registering/unregistering the Gigaset CAPI driver when a device is
connected/disconnected causes an Oops when disconnecting two Gigaset
devices in a row, because the same capi_driver structure gets
unregistered twice. Fix by making driver registration/unregistration
a separate operation (empty in the ISDN4Linux case) called when the
main module is loaded/unloaded.
Impact: bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/isdn/gigaset/capi.c | 44 +++++++++++++++++++++++------------------
drivers/isdn/gigaset/common.c | 6 +++--
drivers/isdn/gigaset/gigaset.h | 6 +++--
drivers/isdn/gigaset/i4l.c | 28 ++++++++++++++++++--------
4 files changed, 53 insertions(+), 31 deletions(-)
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -2215,36 +2215,24 @@ static int gigaset_ctr_read_proc(char *p
}
-static struct capi_driver capi_driver_gigaset = {
- .name = "gigaset",
- .revision = "1.0",
-};
-
/**
- * gigaset_isdn_register() - register to LL
+ * gigaset_isdn_regdev() - register device to LL
* @cs: device descriptor structure.
* @isdnid: device name.
*
- * Called by main module to register the device with the LL.
- *
* Return value: 1 for success, 0 for failure
*/
-int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
+int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
{
struct gigaset_capi_ctr *iif;
int rc;
- pr_info("Kernel CAPI interface\n");
-
iif = kmalloc(sizeof(*iif), GFP_KERNEL);
if (!iif) {
pr_err("%s: out of memory\n", __func__);
return 0;
}
- /* register driver with CAPI (ToDo: what for?) */
- register_capi_driver(&capi_driver_gigaset);
-
/* prepare controller structure */
iif->ctr.owner = THIS_MODULE;
iif->ctr.driverdata = cs;
@@ -2265,7 +2253,6 @@ int gigaset_isdn_register(struct cardsta
rc = attach_capi_ctr(&iif->ctr);
if (rc) {
pr_err("attach_capi_ctr failed (%d)\n", rc);
- unregister_capi_driver(&capi_driver_gigaset);
kfree(iif);
return 0;
}
@@ -2276,17 +2263,36 @@ int gigaset_isdn_register(struct cardsta
}
/**
- * gigaset_isdn_unregister() - unregister from LL
+ * gigaset_isdn_unregdev() - unregister device from LL
* @cs: device descriptor structure.
- *
- * Called by main module to unregister the device from the LL.
*/
-void gigaset_isdn_unregister(struct cardstate *cs)
+void gigaset_isdn_unregdev(struct cardstate *cs)
{
struct gigaset_capi_ctr *iif = cs->iif;
detach_capi_ctr(&iif->ctr);
kfree(iif);
cs->iif = NULL;
+}
+
+static struct capi_driver capi_driver_gigaset = {
+ .name = "gigaset",
+ .revision = "1.0",
+};
+
+/**
+ * gigaset_isdn_regdrv() - register driver to LL
+ */
+void gigaset_isdn_regdrv(void)
+{
+ pr_info("Kernel CAPI interface\n");
+ register_capi_driver(&capi_driver_gigaset);
+}
+
+/**
+ * gigaset_isdn_unregdrv() - unregister driver from LL
+ */
+void gigaset_isdn_unregdrv(void)
+{
unregister_capi_driver(&capi_driver_gigaset);
}
--- a/drivers/isdn/gigaset/common.c
+++ b/drivers/isdn/gigaset/common.c
@@ -505,7 +505,7 @@ void gigaset_freecs(struct cardstate *cs
case 2: /* error in initcshw */
/* Deregister from LL */
make_invalid(cs, VALID_ID);
- gigaset_isdn_unregister(cs);
+ gigaset_isdn_unregdev(cs);
/* fall through */
case 1: /* error when registering to LL */
@@ -767,7 +767,7 @@ struct cardstate *gigaset_initcs(struct
cs->cmdbytes = 0;
gig_dbg(DEBUG_INIT, "setting up iif");
- if (!gigaset_isdn_register(cs, modulename)) {
+ if (!gigaset_isdn_regdev(cs, modulename)) {
pr_err("error registering ISDN device\n");
goto error;
}
@@ -1214,11 +1214,13 @@ static int __init gigaset_init_module(vo
gigaset_debuglevel = DEBUG_DEFAULT;
pr_info(DRIVER_DESC DRIVER_DESC_DEBUG "\n");
+ gigaset_isdn_regdrv();
return 0;
}
static void __exit gigaset_exit_module(void)
{
+ gigaset_isdn_unregdrv();
}
module_init(gigaset_init_module);
--- a/drivers/isdn/gigaset/gigaset.h
+++ b/drivers/isdn/gigaset/gigaset.h
@@ -674,8 +674,10 @@ int gigaset_isowbuf_getbytes(struct isow
*/
/* Called from common.c for setting up/shutting down with the ISDN subsystem */
-int gigaset_isdn_register(struct cardstate *cs, const char *isdnid);
-void gigaset_isdn_unregister(struct cardstate *cs);
+void gigaset_isdn_regdrv(void);
+void gigaset_isdn_unregdrv(void);
+int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid);
+void gigaset_isdn_unregdev(struct cardstate *cs);
/* Called from hardware module to indicate completion of an skb */
void gigaset_skb_sent(struct bc_state *bcs, struct sk_buff *skb);
--- a/drivers/isdn/gigaset/i4l.c
+++ b/drivers/isdn/gigaset/i4l.c
@@ -632,15 +632,13 @@ void gigaset_isdn_stop(struct cardstate
}
/**
- * gigaset_isdn_register() - register to LL
+ * gigaset_isdn_regdev() - register to LL
* @cs: device descriptor structure.
* @isdnid: device name.
*
- * Called by main module to register the device with the LL.
- *
* Return value: 1 for success, 0 for failure
*/
-int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
+int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
{
isdn_if *iif;
@@ -690,15 +688,29 @@ int gigaset_isdn_register(struct cardsta
}
/**
- * gigaset_isdn_unregister() - unregister from LL
+ * gigaset_isdn_unregdev() - unregister device from LL
* @cs: device descriptor structure.
- *
- * Called by main module to unregister the device from the LL.
*/
-void gigaset_isdn_unregister(struct cardstate *cs)
+void gigaset_isdn_unregdev(struct cardstate *cs)
{
gig_dbg(DEBUG_CMD, "sending UNLOAD");
gigaset_i4l_cmd(cs, ISDN_STAT_UNLOAD);
kfree(cs->iif);
cs->iif = NULL;
}
+
+/**
+ * gigaset_isdn_regdrv() - register driver to LL
+ */
+void gigaset_isdn_regdrv(void)
+{
+ /* nothing to do */
+}
+
+/**
+ * gigaset_isdn_unregdrv() - unregister driver from LL
+ */
+void gigaset_isdn_unregdrv(void)
+{
+ /* nothing to do */
+}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [047/156] gigaset: fix build failure
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (45 preceding siblings ...)
2010-03-30 22:41 ` [046/156] gigaset: avoid registering CAPI driver more than once Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [048/156] gigaset: correct range checking off by one error Greg KH
` (108 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tilman Schmidt,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
commit 22001a13d09d82772e831dcdac0553994a4bac5d upstream.
Update the dummy LL interface to the LL interface change
introduced by commit daab433c03c15fd642c71c94eb51bdd3f32602c8.
This fixes the build failure occurring after that commit when
enabling ISDN_DRV_GIGASET but neither ISDN_I4L nor ISDN_CAPI.
Impact: bugfix
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/dummyll.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--- a/drivers/isdn/gigaset/dummyll.c
+++ b/drivers/isdn/gigaset/dummyll.c
@@ -57,12 +57,20 @@ void gigaset_isdn_stop(struct cardstate
{
}
-int gigaset_isdn_register(struct cardstate *cs, const char *isdnid)
+int gigaset_isdn_regdev(struct cardstate *cs, const char *isdnid)
{
- pr_info("no ISDN subsystem interface\n");
return 1;
}
-void gigaset_isdn_unregister(struct cardstate *cs)
+void gigaset_isdn_unregdev(struct cardstate *cs)
+{
+}
+
+void gigaset_isdn_regdrv(void)
+{
+ pr_info("no ISDN subsystem interface\n");
+}
+
+void gigaset_isdn_unregdrv(void)
{
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [048/156] gigaset: correct range checking off by one error
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (46 preceding siblings ...)
2010-03-30 22:41 ` [047/156] gigaset: fix build failure Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [049/156] perf: Provide generic perf_sample_data initialization Greg KH
` (107 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tilman Schmidt,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
commit 6ad34145cf809384359fe513481d6e16638a57a3 upstream.
Correct a potential array overrun due to an off by one error in the
range check on the CAPI CONNECT_REQ CIPValue parameter.
Found and reported by Dan Carpenter using smatch.
Impact: bugfix
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 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/isdn/gigaset/capi.c
+++ b/drivers/isdn/gigaset/capi.c
@@ -1313,7 +1313,7 @@ static void do_connect_req(struct gigase
}
/* check parameter: CIP Value */
- if (cmsg->CIPValue > ARRAY_SIZE(cip2bchlc) ||
+ if (cmsg->CIPValue >= ARRAY_SIZE(cip2bchlc) ||
(cmsg->CIPValue > 0 && cip2bchlc[cmsg->CIPValue].bc == NULL)) {
dev_notice(cs->dev, "%s: unknown CIP value %d\n",
"CONNECT_REQ", cmsg->CIPValue);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [049/156] perf: Provide generic perf_sample_data initialization
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (47 preceding siblings ...)
2010-03-30 22:41 ` [048/156] gigaset: correct range checking off by one error Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [050/156] perf: Make the install relative to DESTDIR if specified Greg KH
` (106 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable, Greg KH
Cc: stable-review, torvalds, akpm, alan, Jean Pihet,
Frederic Weisbecker, David S. Miller, Jamie Iles, Paul Mackerras,
Stephane Eranian, Ingo Molnar, Peter Zijlstra, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Peter Zijlstra <peterz@infradead.org>
This makes it easier to extend perf_sample_data and fixes a bug on arm
and sparc, which failed to set ->raw to NULL, which can cause crashes
when combined with PERF_SAMPLE_RAW.
It also optimizes PowerPC and tracepoint, because the struct
initialization is forced to zero out the whole structure.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Jean Pihet <jpihet@mvista.com>
Reviewed-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Jamie Iles <jamie.iles@picochip.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Stephane Eranian <eranian@google.com>
LKML-Reference: <20100304140100.315416040@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/powerpc/kernel/perf_event.c | 8 ++++----
arch/sparc/kernel/perf_event.c | 2 +-
arch/x86/kernel/cpu/perf_event.c | 9 +++------
include/linux/perf_event.h | 7 +++++++
kernel/perf_event.c | 21 ++++++++-------------
5 files changed, 23 insertions(+), 24 deletions(-)
--- a/arch/powerpc/kernel/perf_event.c
+++ b/arch/powerpc/kernel/perf_event.c
@@ -1164,10 +1164,10 @@ static void record_and_restart(struct pe
* Finally record data if requested.
*/
if (record) {
- struct perf_sample_data data = {
- .addr = ~0ULL,
- .period = event->hw.last_period,
- };
+ struct perf_sample_data data;
+
+ perf_sample_data_init(&data, ~0ULL);
+ data.period = event->hw.last_period;
if (event->attr.sample_type & PERF_SAMPLE_ADDR)
perf_get_data_addr(regs, &data.addr);
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1189,7 +1189,7 @@ static int __kprobes perf_event_nmi_hand
regs = args->regs;
- data.addr = 0;
+ perf_sample_data_init(&data, 0);
cpuc = &__get_cpu_var(cpu_hw_events);
--- a/arch/x86/kernel/cpu/perf_event.c
+++ b/arch/x86/kernel/cpu/perf_event.c
@@ -1636,10 +1636,9 @@ static void intel_pmu_drain_bts_buffer(s
ds->bts_index = ds->bts_buffer_base;
+ perf_sample_data_init(&data, 0);
data.period = event->hw.last_period;
- data.addr = 0;
- data.raw = NULL;
regs.ip = 0;
/*
@@ -1756,8 +1755,7 @@ static int p6_pmu_handle_irq(struct pt_r
int idx, handled = 0;
u64 val;
- data.addr = 0;
- data.raw = NULL;
+ perf_sample_data_init(&data, 0);
cpuc = &__get_cpu_var(cpu_hw_events);
@@ -1802,8 +1800,7 @@ static int intel_pmu_handle_irq(struct p
int bit, loops;
u64 ack, status;
- data.addr = 0;
- data.raw = NULL;
+ perf_sample_data_init(&data, 0);
cpuc = &__get_cpu_var(cpu_hw_events);
--- a/include/linux/perf_event.h
+++ b/include/linux/perf_event.h
@@ -793,6 +793,13 @@ struct perf_sample_data {
struct perf_raw_record *raw;
};
+static inline
+void perf_sample_data_init(struct perf_sample_data *data, u64 addr)
+{
+ data->addr = addr;
+ data->raw = NULL;
+}
+
extern void perf_output_sample(struct perf_output_handle *handle,
struct perf_event_header *header,
struct perf_sample_data *data,
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4027,8 +4027,7 @@ void __perf_sw_event(u32 event_id, u64 n
if (rctx < 0)
return;
- data.addr = addr;
- data.raw = NULL;
+ perf_sample_data_init(&data, addr);
do_perf_sw_event(PERF_TYPE_SOFTWARE, event_id, nr, nmi, &data, regs);
@@ -4073,11 +4072,10 @@ static enum hrtimer_restart perf_swevent
struct perf_event *event;
u64 period;
- event = container_of(hrtimer, struct perf_event, hw.hrtimer);
+ event = container_of(hrtimer, struct perf_event, hw.hrtimer);
event->pmu->read(event);
- data.addr = 0;
- data.raw = NULL;
+ perf_sample_data_init(&data, 0);
data.period = event->hw.last_period;
regs = get_irq_regs();
/*
@@ -4241,17 +4239,15 @@ static const struct pmu perf_ops_task_cl
void perf_tp_event(int event_id, u64 addr, u64 count, void *record,
int entry_size)
{
+ struct pt_regs *regs = get_irq_regs();
+ struct perf_sample_data data;
struct perf_raw_record raw = {
.size = entry_size,
.data = record,
};
- struct perf_sample_data data = {
- .addr = addr,
- .raw = &raw,
- };
-
- struct pt_regs *regs = get_irq_regs();
+ perf_sample_data_init(&data, addr);
+ data.raw = &raw;
if (!regs)
regs = task_pt_regs(current);
@@ -4367,8 +4363,7 @@ void perf_bp_event(struct perf_event *bp
struct perf_sample_data sample;
struct pt_regs *regs = data;
- sample.raw = NULL;
- sample.addr = bp->attr.bp_addr;
+ perf_sample_data_init(&sample, bp->attr.bp_addr);
if (!perf_exclude_event(bp, regs))
perf_swevent_add(bp, 1, 1, &sample, regs);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [050/156] perf: Make the install relative to DESTDIR if specified
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (48 preceding siblings ...)
2010-03-30 22:41 ` [049/156] perf: Provide generic perf_sample_data initialization Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [051/156] perf_event: Fix oops triggered by cpu offline/online Greg KH
` (105 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, John Kacur, Peter Zijlstra,
Paul Mackerras, Arnaldo Carvalho de Melo, Frederic Weisbecker,
Tom Zanussi, Kyle McMartin, Ingo Molnar, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: John Kacur <jkacur@redhat.com>
commit 7ae5f21361fea11f58c398701da635f778635d13 upstream.
Without this change, the install path is relative to
prefix/DESTDIR where prefix is automatically set to $HOME.
This can produce unexpected results. For example:
make -C tools/perf DESTDIR=/home/jkacur/tmp install-man
creates the directory: /home/jkacur/home/jkacur/tmp/share/...
instead of the expected: /home/jkacur/tmp/share/...
Signed-off-by: John Kacur <jkacur@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Kyle McMartin <kyle@redhat.com>
LKML-Reference: <1268312220-12880-1-git-send-email-jkacur@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
tools/perf/Documentation/Makefile | 4 +++-
tools/perf/Makefile | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -24,7 +24,10 @@ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT
DOC_MAN5=$(patsubst %.txt,%.5,$(MAN5_TXT))
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
+# Make the path relative to DESTDIR, not prefix
+ifndef DESTDIR
prefix?=$(HOME)
+endif
bindir?=$(prefix)/bin
htmldir?=$(prefix)/share/doc/perf-doc
pdfdir?=$(prefix)/share/doc/perf-doc
@@ -32,7 +35,6 @@ mandir?=$(prefix)/share/man
man1dir=$(mandir)/man1
man5dir=$(mandir)/man5
man7dir=$(mandir)/man7
-# DESTDIR=
ASCIIDOC=asciidoc
ASCIIDOC_EXTRA = --unsafe
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -216,7 +216,10 @@ STRIP ?= strip
# runtime figures out where they are based on the path to the executable.
# This can help installing the suite in a relocatable way.
+# Make the path relative to DESTDIR, not to prefix
+ifndef DESTDIR
prefix = $(HOME)
+endif
bindir_relative = bin
bindir = $(prefix)/$(bindir_relative)
mandir = share/man
@@ -233,7 +236,6 @@ sysconfdir = $(prefix)/etc
ETC_PERFCONFIG = etc/perfconfig
endif
lib = lib
-# DESTDIR=
export prefix bindir sharedir sysconfdir
^ permalink raw reply [flat|nested] 432+ messages in thread
* [051/156] perf_event: Fix oops triggered by cpu offline/online
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (49 preceding siblings ...)
2010-03-30 22:41 ` [050/156] perf: Make the install relative to DESTDIR if specified Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [052/156] perf probe: Fix probe_point buffer overrun Greg KH
` (104 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Paul Mackerras,
Peter Zijlstra, Ingo Molnar, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Paul Mackerras <paulus@samba.org>
commit 220b140b52ab6cc133f674a7ffec8fa792054f25 upstream.
Anton Blanchard found that he could reliably make the kernel hit a
BUG_ON in the slab allocator by taking a cpu offline and then online
while a system-wide perf record session was running.
The reason is that when the cpu comes up, we completely reinitialize
the ctx field of the struct perf_cpu_context for the cpu. If there is
a system-wide perf record session running, then there will be a struct
perf_event that has a reference to the context, so its refcount will
be 2. (The perf_event has been removed from the context's group_entry
and event_entry lists by perf_event_exit_cpu(), but that doesn't
remove the perf_event's reference to the context and doesn't decrement
the context's refcount.)
When the cpu comes up, perf_event_init_cpu() gets called, and it calls
__perf_event_init_context() on the cpu's context. That resets the
refcount to 1. Then when the perf record session finishes and the
perf_event is closed, the refcount gets decremented to 0 and the
context gets kfreed after an RCU grace period. Since the context
wasn't kmalloced -- it's part of a per-cpu variable -- bad things
happen.
In fact we don't need to completely reinitialize the context when the
cpu comes up. It's sufficient to initialize the context once at boot,
but we need to do it for all possible cpus.
This moves the context initialization to happen at boot time. With
this, we don't trash the refcount and the context never gets kfreed,
and we don't hit the BUG_ON.
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Tested-by: Anton Blanchard <anton@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/perf_event.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -5246,12 +5246,22 @@ int perf_event_init_task(struct task_str
return ret;
}
+static void __init perf_event_init_all_cpus(void)
+{
+ int cpu;
+ struct perf_cpu_context *cpuctx;
+
+ for_each_possible_cpu(cpu) {
+ cpuctx = &per_cpu(perf_cpu_context, cpu);
+ __perf_event_init_context(&cpuctx->ctx, NULL);
+ }
+}
+
static void __cpuinit perf_event_init_cpu(int cpu)
{
struct perf_cpu_context *cpuctx;
cpuctx = &per_cpu(perf_cpu_context, cpu);
- __perf_event_init_context(&cpuctx->ctx, NULL);
spin_lock(&perf_resource_lock);
cpuctx->max_pertask = perf_max_events - perf_reserved_percpu;
@@ -5322,6 +5332,7 @@ static struct notifier_block __cpuinitda
void __init perf_event_init(void)
{
+ perf_event_init_all_cpus();
perf_cpu_notify(&perf_cpu_nb, (unsigned long)CPU_UP_PREPARE,
(void *)(long)smp_processor_id());
perf_cpu_notify(&perf_cpu_nb, (unsigned long)CPU_ONLINE,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [052/156] perf probe: Fix probe_point buffer overrun
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (50 preceding siblings ...)
2010-03-30 22:41 ` [051/156] perf_event: Fix oops triggered by cpu offline/online Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [053/156] tmpfs: fix oops on mounts with mpol=default Greg KH
` (103 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Masami Hiramatsu, systemtap,
DLE, Ingo Molnar, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Masami Hiramatsu <mhiramat@redhat.com>
commit 594087a04eea544356f9c52e83c1a9bc380ce80f upstream.
Fix probe_point array-size overrun problem. In some cases (e.g.
inline function), one user-specified probe-point can be
translated to many probe address, and it overruns pre-defined
array-size. This also removes redundant MAX_PROBES macro
definition.
Signed-off-by: Masami Hiramatsu <mhiramat@redhat.com>
Cc: systemtap <systemtap@sources.redhat.com>
Cc: DLE <dle-develop@lists.sourceforge.net>
LKML-Reference: <20100312232217.2017.45017.stgit@localhost6.localdomain6>
[ Note that only root can create new probes. Eventually we should remove
the MAX_PROBES limit, but that is a larger patch not eligible to
perf/urgent treatment. ]
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
tools/perf/builtin-probe.c | 1 -
tools/perf/util/probe-finder.c | 3 +++
2 files changed, 3 insertions(+), 1 deletion(-)
--- a/tools/perf/builtin-probe.c
+++ b/tools/perf/builtin-probe.c
@@ -48,7 +48,6 @@
#include "util/probe-event.h"
#define MAX_PATH_LEN 256
-#define MAX_PROBES 128
/* Session management structure */
static struct {
--- a/tools/perf/util/probe-finder.c
+++ b/tools/perf/util/probe-finder.c
@@ -544,6 +544,9 @@ static void show_probepoint(Dwarf_Die sp
}
free_current_frame_base(pf);
+ if (pp->found == MAX_PROBES)
+ die("Too many( > %d) probe point found.\n", MAX_PROBES);
+
pp->probes[pp->found] = strdup(tmp);
pp->found++;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [053/156] tmpfs: fix oops on mounts with mpol=default
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (51 preceding siblings ...)
2010-03-30 22:41 ` [052/156] perf probe: Fix probe_point buffer overrun Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [054/156] tmpfs: mpol=bind:0 dont cause mount error Greg KH
` (102 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ravikiran Thirumalai,
KOSAKI Motohiro, Christoph Lameter, Mel Gorman, Lee Schermerhorn,
Hugh Dickins, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ravikiran G Thirumalai <kiran@scalex86.org>
commit 413b43deab8377819aba1dbad2abf0c15d59b491 upstream.
Fix an 'oops' when a tmpfs mount point is mounted with the mpol=default
mempolicy.
Upon remounting a tmpfs mount point with 'mpol=default' option, the mount
code crashed with a null pointer dereference. The initial problem report
was on 2.6.27, but the problem exists in mainline 2.6.34-rc as well. On
examining the code, we see that mpol_new returns NULL if default mempolicy
was requested. This 'NULL' mempolicy is accessed to store the node mask
resulting in oops.
The following patch fixes it.
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2187,10 +2187,15 @@ int mpol_parse_str(char *str, struct mem
goto out;
mode = MPOL_PREFERRED;
break;
-
+ case MPOL_DEFAULT:
+ /*
+ * Insist on a empty nodelist
+ */
+ if (!nodelist)
+ err = 0;
+ goto out;
/*
* case MPOL_BIND: mpol_new() enforces non-empty nodemask.
- * case MPOL_DEFAULT: mpol_new() enforces empty nodemask, ignores flags.
*/
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [054/156] tmpfs: mpol=bind:0 dont cause mount error.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (52 preceding siblings ...)
2010-03-30 22:41 ` [053/156] tmpfs: fix oops on mounts with mpol=default Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [055/156] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
` (101 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit d69b2e63e9172afb4d07c305601b79a55509ac4c upstream.
Currently, following mount operation cause mount error.
% mount -t tmpfs -ompol=bind:0 none /tmp
Because commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) corrupted MPOL_BIND parse code.
This patch restore the needed one.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2194,9 +2194,13 @@ int mpol_parse_str(char *str, struct mem
if (!nodelist)
err = 0;
goto out;
- /*
- * case MPOL_BIND: mpol_new() enforces non-empty nodemask.
- */
+ case MPOL_BIND:
+ /*
+ * Insist on a nodelist
+ */
+ if (!nodelist)
+ goto out;
+ err = 0;
}
mode_flags = 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [055/156] tmpfs: handle MPOL_LOCAL mount option properly
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (53 preceding siblings ...)
2010-03-30 22:41 ` [054/156] tmpfs: mpol=bind:0 dont cause mount error Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [056/156] tmpfs: cleanup mpol_parse_str() Greg KH
` (100 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 12821f5fb942e795f8009ece14bde868893bd811 upstream.
commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) added mpol=local mount option. but its feature is broken
since it was born. because such code always return 1 (i.e. mount
failure).
This patch fixes it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 1 +
1 file changed, 1 insertion(+)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2186,6 +2186,7 @@ int mpol_parse_str(char *str, struct mem
if (nodelist)
goto out;
mode = MPOL_PREFERRED;
+ err = 0;
break;
case MPOL_DEFAULT:
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [056/156] tmpfs: cleanup mpol_parse_str()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (54 preceding siblings ...)
2010-03-30 22:41 ` [055/156] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [057/156] doc: add the documentation for mpol=local Greg KH
` (99 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 926f2ae04f183098cf9a30521776fb2759c8afeb upstream.
mpol_parse_str() made lots 'err' variable related bug. Because it is ugly
and reviewing unfriendly.
This patch simplifies it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2167,8 +2167,8 @@ int mpol_parse_str(char *str, struct mem
char *rest = nodelist;
while (isdigit(*rest))
rest++;
- if (!*rest)
- err = 0;
+ if (*rest)
+ goto out;
}
break;
case MPOL_INTERLEAVE:
@@ -2177,7 +2177,6 @@ int mpol_parse_str(char *str, struct mem
*/
if (!nodelist)
nodes = node_states[N_HIGH_MEMORY];
- err = 0;
break;
case MPOL_LOCAL:
/*
@@ -2186,7 +2185,6 @@ int mpol_parse_str(char *str, struct mem
if (nodelist)
goto out;
mode = MPOL_PREFERRED;
- err = 0;
break;
case MPOL_DEFAULT:
/*
@@ -2201,7 +2199,6 @@ int mpol_parse_str(char *str, struct mem
*/
if (!nodelist)
goto out;
- err = 0;
}
mode_flags = 0;
@@ -2215,13 +2212,14 @@ int mpol_parse_str(char *str, struct mem
else if (!strcmp(flags, "relative"))
mode_flags |= MPOL_F_RELATIVE_NODES;
else
- err = 1;
+ goto out;
}
new = mpol_new(mode, mode_flags, &nodes);
if (IS_ERR(new))
- err = 1;
- else {
+ goto out;
+
+ {
int ret;
NODEMASK_SCRATCH(scratch);
if (scratch) {
@@ -2232,13 +2230,15 @@ int mpol_parse_str(char *str, struct mem
ret = -ENOMEM;
NODEMASK_SCRATCH_FREE(scratch);
if (ret) {
- err = 1;
mpol_put(new);
- } else if (no_context) {
- /* save for contextualization */
- new->w.user_nodemask = nodes;
+ goto out;
}
}
+ err = 0;
+ if (no_context) {
+ /* save for contextualization */
+ new->w.user_nodemask = nodes;
+ }
out:
/* Restore string for error message */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [057/156] doc: add the documentation for mpol=local
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (55 preceding siblings ...)
2010-03-30 22:41 ` [056/156] tmpfs: cleanup mpol_parse_str() Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [058/156] SCSI: scsi_transport_fc: Fix synchronization issue while deleting vport Greg KH
` (98 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 5574169613b40b85d6f4c67208fa4846b897a0a1 upstream.
commit 3f226aa1c (mempolicy: support mpol=local tmpfs mount option) added
new mpol=local mount option. but it didn't add a documentation.
This patch does it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
Documentation/filesystems/tmpfs.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/Documentation/filesystems/tmpfs.txt
+++ b/Documentation/filesystems/tmpfs.txt
@@ -82,11 +82,13 @@ tmpfs has a mount option to set the NUMA
all files in that instance (if CONFIG_NUMA is enabled) - which can be
adjusted on the fly via 'mount -o remount ...'
-mpol=default prefers to allocate memory from the local node
+mpol=default use the process allocation policy
+ (see set_mempolicy(2))
mpol=prefer:Node prefers to allocate memory from the given Node
mpol=bind:NodeList allocates memory only from nodes in NodeList
mpol=interleave prefers to allocate from each node in turn
mpol=interleave:NodeList allocates from each node of NodeList in turn
+mpol=local prefers to allocate memory from the local node
NodeList format is a comma-separated list of decimal numbers and ranges,
a range being two hyphen-separated decimal numbers, the smallest and
@@ -134,3 +136,5 @@ Author:
Christoph Rohland <cr@sap.com>, 1.12.01
Updated:
Hugh Dickins, 4 June 2007
+Updated:
+ KOSAKI Motohiro, 16 Mar 2010
^ permalink raw reply [flat|nested] 432+ messages in thread
* [058/156] SCSI: scsi_transport_fc: Fix synchronization issue while deleting vport
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (56 preceding siblings ...)
2010-03-30 22:41 ` [057/156] doc: add the documentation for mpol=local Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [059/156] NFSv4: Dont ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode() Greg KH
` (97 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Gal Rosen, James Smart,
James Bottomley, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Gal Rosen <galr@storwize.com>
commit 0d9dc7c8b9b7fa0f53647423b41056ee1beed735 upstream.
The issue occur while deleting 60 virtual ports through the sys
interface /sys/class/fc_vports/vport-X/vport_delete. It happen while in
a mistake each request sent twice for the same vport. This interface is
asynchronous, entering the delete request into a work queue, allowing
more than one request to enter to the delete work queue. The result is a
NULL pointer. The first request already delete the vport, while the
second request got a pointer to the vport before the device destroyed.
Re-create vport later cause system freeze.
Solution: Check vport flags before entering the request to the work queue.
[jejb: fixed int<->long problem on spinlock flags variable]
Signed-off-by: Gal Rosen <galr@storwize.com>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/scsi/scsi_transport_fc.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -1216,6 +1216,15 @@ store_fc_vport_delete(struct device *dev
{
struct fc_vport *vport = transport_class_to_vport(dev);
struct Scsi_Host *shost = vport_to_shost(vport);
+ unsigned long flags;
+
+ spin_lock_irqsave(shost->host_lock, flags);
+ if (vport->flags & (FC_VPORT_DEL | FC_VPORT_CREATING)) {
+ spin_unlock_irqrestore(shost->host_lock, flags);
+ return -EBUSY;
+ }
+ vport->flags |= FC_VPORT_DELETING;
+ spin_unlock_irqrestore(shost->host_lock, flags);
fc_queue_work(shost, &vport->vport_delete_work);
return count;
@@ -1805,6 +1814,9 @@ store_fc_host_vport_delete(struct device
list_for_each_entry(vport, &fc_host->vports, peers) {
if ((vport->channel == 0) &&
(vport->port_name == wwpn) && (vport->node_name == wwnn)) {
+ if (vport->flags & (FC_VPORT_DEL | FC_VPORT_CREATING))
+ break;
+ vport->flags |= FC_VPORT_DELETING;
match = 1;
break;
}
@@ -3354,18 +3366,6 @@ fc_vport_terminate(struct fc_vport *vpor
unsigned long flags;
int stat;
- spin_lock_irqsave(shost->host_lock, flags);
- if (vport->flags & FC_VPORT_CREATING) {
- spin_unlock_irqrestore(shost->host_lock, flags);
- return -EBUSY;
- }
- if (vport->flags & (FC_VPORT_DEL)) {
- spin_unlock_irqrestore(shost->host_lock, flags);
- return -EALREADY;
- }
- vport->flags |= FC_VPORT_DELETING;
- spin_unlock_irqrestore(shost->host_lock, flags);
-
if (i->f->vport_delete)
stat = i->f->vport_delete(vport);
else
^ permalink raw reply [flat|nested] 432+ messages in thread
* [059/156] NFSv4: Dont ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (57 preceding siblings ...)
2010-03-30 22:41 ` [058/156] SCSI: scsi_transport_fc: Fix synchronization issue while deleting vport Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [060/156] NFS: Avoid a deadlock in nfs_release_page Greg KH
` (96 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Trond Myklebust,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit b4d2314bb88b07e5a04e6c75b442a1dfcd60e340 upstream.
If the NFS_INO_REVAL_FORCED flag is set, that means that we don't yet have
an up to date attribute cache. Even if we hold a delegation, we must
put a GETATTR on the wire.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nfs/delegation.h | 6 ++++++
fs/nfs/dir.c | 2 +-
fs/nfs/inode.c | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
--- a/fs/nfs/delegation.h
+++ b/fs/nfs/delegation.h
@@ -71,4 +71,10 @@ static inline int nfs_inode_return_deleg
}
#endif
+static inline int nfs_have_delegated_attributes(struct inode *inode)
+{
+ return nfs_have_delegation(inode, FMODE_READ) &&
+ !(NFS_I(inode)->cache_validity & NFS_INO_REVAL_FORCED);
+}
+
#endif
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1789,7 +1789,7 @@ static int nfs_access_get_cached(struct
cache = nfs_access_search_rbtree(inode, cred);
if (cache == NULL)
goto out;
- if (!nfs_have_delegation(inode, FMODE_READ) &&
+ if (!nfs_have_delegated_attributes(inode) &&
!time_in_range_open(jiffies, cache->jiffies, cache->jiffies + nfsi->attrtimeo))
goto out_stale;
res->jiffies = cache->jiffies;
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -759,7 +759,7 @@ int nfs_attribute_timeout(struct inode *
{
struct nfs_inode *nfsi = NFS_I(inode);
- if (nfs_have_delegation(inode, FMODE_READ))
+ if (nfs_have_delegated_attributes(inode))
return 0;
return !time_in_range_open(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [060/156] NFS: Avoid a deadlock in nfs_release_page
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (58 preceding siblings ...)
2010-03-30 22:41 ` [059/156] NFSv4: Dont ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode() Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [061/156] NFS: Prevent another deadlock in nfs_release_page() Greg KH
` (95 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Trond Myklebust,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit bb6fbc4548b9ae7ebbd06ef72f00229df259d217 upstream.
J.R. Okajima reports the following deadlock:
INFO: task kswapd0:305 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kswapd0 D 0000000000000001 0 305 2 0x00000000
ffff88001f21d4f0 0000000000000046 ffff88001fdea680 ffff88001f21c000
ffff88001f21dfd8 ffff88001f21c000 ffff88001f21dfd8 ffff88001f21dfd8
ffff88001fdea040 0000000000014c00 0000000000000001 ffff88001fdea040
Call Trace:
[<ffffffff8146155d>] io_schedule+0x4d/0x70
[<ffffffff810d2be5>] sync_page+0x65/0xa0
[<ffffffff81461b12>] __wait_on_bit_lock+0x52/0xb0
[<ffffffff810d2b80>] ? sync_page+0x0/0xa0
[<ffffffff810d2b64>] __lock_page+0x64/0x70
[<ffffffff81070ce0>] ? wake_bit_function+0x0/0x40
[<ffffffff810df1d4>] truncate_inode_pages_range+0x344/0x4a0
[<ffffffff810df340>] truncate_inode_pages+0x10/0x20
[<ffffffff8112cbfe>] generic_delete_inode+0x15e/0x190
[<ffffffff8112cc8d>] generic_drop_inode+0x5d/0x80
[<ffffffff8112bb88>] iput+0x78/0x80
[<ffffffff811bc908>] nfs_dentry_iput+0x38/0x50
[<ffffffff811285f4>] dentry_iput+0x84/0x110
[<ffffffff811286ae>] d_kill+0x2e/0x60
[<ffffffff8112912a>] dput+0x7a/0x170
[<ffffffff8111e925>] path_put+0x15/0x40
[<ffffffff811c3a44>] __put_nfs_open_context+0xa4/0xb0
[<ffffffff811cb5d0>] ? nfs_free_request+0x0/0x50
[<ffffffff811c3b0b>] put_nfs_open_context+0xb/0x10
[<ffffffff811cb5f9>] nfs_free_request+0x29/0x50
[<ffffffff81234b7e>] kref_put+0x8e/0xe0
[<ffffffff811cb594>] nfs_release_request+0x14/0x20
[<ffffffff811cf769>] nfs_find_and_lock_request+0x89/0xa0
[<ffffffff811d1180>] nfs_wb_page+0x80/0x110
[<ffffffff811c0770>] nfs_release_page+0x70/0x90
[<ffffffff810d18ee>] try_to_release_page+0x5e/0x80
[<ffffffff810e1178>] shrink_page_list+0x638/0x860
[<ffffffff810e19de>] shrink_zone+0x63e/0xc40
We can fix this by making the call to put_nfs_open_context() happen when we
actually remove the write request from the inode (which is done by the
nfsiod thread in this case).
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nfs/pagelist.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -112,12 +112,10 @@ void nfs_unlock_request(struct nfs_page
*/
int nfs_set_page_tag_locked(struct nfs_page *req)
{
- struct nfs_inode *nfsi = NFS_I(req->wb_context->path.dentry->d_inode);
-
if (!nfs_lock_request_dontget(req))
return 0;
if (req->wb_page != NULL)
- radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
+ radix_tree_tag_set(&NFS_I(req->wb_context->path.dentry->d_inode)->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
return 1;
}
@@ -126,10 +124,10 @@ int nfs_set_page_tag_locked(struct nfs_p
*/
void nfs_clear_page_tag_locked(struct nfs_page *req)
{
- struct inode *inode = req->wb_context->path.dentry->d_inode;
- struct nfs_inode *nfsi = NFS_I(inode);
-
if (req->wb_page != NULL) {
+ struct inode *inode = req->wb_context->path.dentry->d_inode;
+ struct nfs_inode *nfsi = NFS_I(inode);
+
spin_lock(&inode->i_lock);
radix_tree_tag_clear(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
nfs_unlock_request(req);
@@ -142,16 +140,22 @@ void nfs_clear_page_tag_locked(struct nf
* nfs_clear_request - Free up all resources allocated to the request
* @req:
*
- * Release page resources associated with a write request after it
- * has completed.
+ * Release page and open context resources associated with a read/write
+ * request after it has completed.
*/
void nfs_clear_request(struct nfs_page *req)
{
struct page *page = req->wb_page;
+ struct nfs_open_context *ctx = req->wb_context;
+
if (page != NULL) {
page_cache_release(page);
req->wb_page = NULL;
}
+ if (ctx != NULL) {
+ put_nfs_open_context(ctx);
+ req->wb_context = NULL;
+ }
}
@@ -165,9 +169,8 @@ static void nfs_free_request(struct kref
{
struct nfs_page *req = container_of(kref, struct nfs_page, wb_kref);
- /* Release struct file or cached credential */
+ /* Release struct file and open context */
nfs_clear_request(req);
- put_nfs_open_context(req->wb_context);
nfs_page_free(req);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [061/156] NFS: Prevent another deadlock in nfs_release_page()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (59 preceding siblings ...)
2010-03-30 22:41 ` [060/156] NFS: Avoid a deadlock in nfs_release_page Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [062/156] Revert "sunrpc: fix peername failed on closed listener" Greg KH
` (94 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Trond Myklebust,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit d812e575822a2b7ab1a7cadae2571505ec6ec2bd upstream.
We should not attempt to free the page if __GFP_FS is not set. Otherwise we
can deadlock as per
http://bugzilla.kernel.org/show_bug.cgi?id=15578
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nfs/file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -486,7 +486,8 @@ static int nfs_release_page(struct page
{
dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);
- if (gfp & __GFP_WAIT)
+ /* Only do I/O if gfp is a superset of GFP_KERNEL */
+ if ((gfp & GFP_KERNEL) == GFP_KERNEL)
nfs_wb_page(page->mapping->host, page);
/* If PagePrivate() is set, then the page is not freeable */
if (PagePrivate(page))
^ permalink raw reply [flat|nested] 432+ messages in thread
* [062/156] Revert "sunrpc: fix peername failed on closed listener"
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (60 preceding siblings ...)
2010-03-30 22:41 ` [061/156] NFS: Prevent another deadlock in nfs_release_page() Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [063/156] Revert "sunrpc: move the close processing after do recvfrom method" Greg KH
` (93 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, J. Bruce Fields,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: J. Bruce Fields <bfields@citi.umich.edu>
commit f5822754ea006563e1bf0a1f43faaad49c0d8bb2 upstream.
This reverts commit b292cf9ce70d221c3f04ff62db5ab13d9a249ca8. The
commit that it attempted to patch up,
b0401d725334a94d57335790b8ac2404144748ee, was fundamentally wrong, and
will also be reverted.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sunrpc/svc_xprt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -699,8 +699,7 @@ int svc_recv(struct svc_rqst *rqstp, lon
spin_unlock_bh(&pool->sp_lock);
len = 0;
- if (test_bit(XPT_LISTENER, &xprt->xpt_flags) &&
- !test_bit(XPT_CLOSE, &xprt->xpt_flags)) {
+ if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) {
struct svc_xprt *newxpt;
newxpt = xprt->xpt_ops->xpo_accept(xprt);
if (newxpt) {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [063/156] Revert "sunrpc: move the close processing after do recvfrom method"
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (61 preceding siblings ...)
2010-03-30 22:41 ` [062/156] Revert "sunrpc: fix peername failed on closed listener" Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [064/156] nfsd: ensure sockets are closed on error Greg KH
` (92 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, J. Bruce Fields,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: J. Bruce Fields <bfields@citi.umich.edu>
commit 1b644b6e6f6160ae35ce4b52c2ca89ed3e356e18 upstream.
This reverts commit b0401d725334a94d57335790b8ac2404144748ee, which
moved svc_delete_xprt() outside of XPT_BUSY, and allowed it to be called
after svc_xpt_recived(), removing its last reference and destroying it
after it had already been queued for future processing.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sunrpc/svc_xprt.c | 12 +++++-------
1 file changed, 5 insertions(+), 7 deletions(-)
--- a/net/sunrpc/svc_xprt.c
+++ b/net/sunrpc/svc_xprt.c
@@ -699,7 +699,10 @@ int svc_recv(struct svc_rqst *rqstp, lon
spin_unlock_bh(&pool->sp_lock);
len = 0;
- if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) {
+ if (test_bit(XPT_CLOSE, &xprt->xpt_flags)) {
+ dprintk("svc_recv: found XPT_CLOSE\n");
+ svc_delete_xprt(xprt);
+ } else if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) {
struct svc_xprt *newxpt;
newxpt = xprt->xpt_ops->xpo_accept(xprt);
if (newxpt) {
@@ -725,7 +728,7 @@ int svc_recv(struct svc_rqst *rqstp, lon
svc_xprt_received(newxpt);
}
svc_xprt_received(xprt);
- } else if (!test_bit(XPT_CLOSE, &xprt->xpt_flags)) {
+ } else {
dprintk("svc: server %p, pool %u, transport %p, inuse=%d\n",
rqstp, pool->sp_id, xprt,
atomic_read(&xprt->xpt_ref.refcount));
@@ -738,11 +741,6 @@ int svc_recv(struct svc_rqst *rqstp, lon
dprintk("svc: got len=%d\n", len);
}
- if (test_bit(XPT_CLOSE, &xprt->xpt_flags)) {
- dprintk("svc_recv: found XPT_CLOSE\n");
- svc_delete_xprt(xprt);
- }
-
/* No data, incomplete (TCP) read, or accept() */
if (len == 0 || len == -EAGAIN) {
rqstp->rq_res.len = 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [064/156] nfsd: ensure sockets are closed on error
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (62 preceding siblings ...)
2010-03-30 22:41 ` [063/156] Revert "sunrpc: move the close processing after do recvfrom method" Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [065/156] tty: Keep the default buffering to sub-page units Greg KH
` (91 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, J. Bruce Fields,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Neil Brown <neilb@suse.de>
commit 301e99ce4a2f42a317129230fd42e6cd874c64b0 upstream.
One the changes in commit d7979ae4a "svc: Move close processing to a
single place" is:
err_delete:
- svc_delete_socket(svsk);
+ set_bit(SK_CLOSE, &svsk->sk_flags);
return -EAGAIN;
This is insufficient. The recvfrom methods must always call
svc_xprt_received on completion so that the socket gets re-queued if
there is any more work to do. This particular path did not make that
call because it actually destroyed the svsk, making requeue pointless.
When the svc_delete_socket was change to just set a bit, we should have
added a call to svc_xprt_received,
This is the problem that b0401d7253 attempted to fix, incorrectly.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sunrpc/svcsock.c | 1 +
1 file changed, 1 insertion(+)
--- a/net/sunrpc/svcsock.c
+++ b/net/sunrpc/svcsock.c
@@ -968,6 +968,7 @@ static int svc_tcp_recv_record(struct sv
return len;
err_delete:
set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags);
+ svc_xprt_received(&svsk->sk_xprt);
err_again:
return -EAGAIN;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [065/156] tty: Keep the default buffering to sub-page units
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (63 preceding siblings ...)
2010-03-30 22:41 ` [064/156] nfsd: ensure sockets are closed on error Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [066/156] tty: Take a 256 byte padding into account when buffering below " Greg KH
` (90 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Cox, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Cox <alan@linux.intel.com>
commit d9661adfb8e53a7647360140af3b92284cbe52d4 upstream.
We allocate during interrupts so while our buffering is normally diced up
small anyway on some hardware at speed we can pressure the VM excessively
for page pairs. We don't really need big buffers to be linear so don't try
so hard.
In order to make this work well we will tidy up excess callers to request_room,
which cannot itself enforce this break up.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/tty_buffer.c | 6 ++++--
include/linux/tty.h | 10 ++++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
--- a/drivers/char/tty_buffer.c
+++ b/drivers/char/tty_buffer.c
@@ -247,7 +247,8 @@ int tty_insert_flip_string(struct tty_st
{
int copied = 0;
do {
- int space = tty_buffer_request_room(tty, size - copied);
+ int goal = min(size - copied, TTY_BUFFER_PAGE);
+ int space = tty_buffer_request_room(tty, goal);
struct tty_buffer *tb = tty->buf.tail;
/* If there is no space then tb may be NULL */
if (unlikely(space == 0))
@@ -283,7 +284,8 @@ int tty_insert_flip_string_flags(struct
{
int copied = 0;
do {
- int space = tty_buffer_request_room(tty, size - copied);
+ int goal = min(size - copied, TTY_BUFFER_PAGE);
+ int space = tty_buffer_request_room(tty, goal);
struct tty_buffer *tb = tty->buf.tail;
/* If there is no space then tb may be NULL */
if (unlikely(space == 0))
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -68,6 +68,16 @@ struct tty_buffer {
unsigned long data[0];
};
+/*
+ * We default to dicing tty buffer allocations to this many characters
+ * in order to avoid multiple page allocations. We assume tty_buffer itself
+ * is under 256 bytes. See tty_buffer_find for the allocation logic this
+ * must match
+ */
+
+#define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2)
+
+
struct tty_bufhead {
struct delayed_work work;
spinlock_t lock;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [066/156] tty: Take a 256 byte padding into account when buffering below sub-page units
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (64 preceding siblings ...)
2010-03-30 22:41 ` [065/156] tty: Keep the default buffering to sub-page units Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [067/156] USB: fix usbfs regression Greg KH
` (89 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mel Gorman,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mel Gorman <mel@csn.ul.ie>
commit 352fa6ad16b89f8ffd1a93b4419b1a8f2259feab upstream.
The TTY layer takes some care to ensure that only sub-page allocations
are made with interrupts disabled. It does this by setting a goal of
"TTY_BUFFER_PAGE" to allocate. Unfortunately, while TTY_BUFFER_PAGE takes the
size of tty_buffer into account, it fails to account that tty_buffer_find()
rounds the buffer size out to the next 256 byte boundary before adding on
the size of the tty_buffer.
This patch adjusts the TTY_BUFFER_PAGE calculation to take into account the
size of the tty_buffer and the padding. Once applied, tty_buffer_alloc()
should not require high-order allocations.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/tty.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -70,12 +70,13 @@ struct tty_buffer {
/*
* We default to dicing tty buffer allocations to this many characters
- * in order to avoid multiple page allocations. We assume tty_buffer itself
- * is under 256 bytes. See tty_buffer_find for the allocation logic this
- * must match
+ * in order to avoid multiple page allocations. We know the size of
+ * tty_buffer itself but it must also be taken into account that the
+ * the buffer is 256 byte aligned. See tty_buffer_find for the allocation
+ * logic this must match
*/
-#define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2)
+#define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF)
struct tty_bufhead {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [067/156] USB: fix usbfs regression
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (65 preceding siblings ...)
2010-03-30 22:41 ` [066/156] tty: Take a 256 byte padding into account when buffering below " Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [068/156] USB: EHCI: fix ITD list order Greg KH
` (88 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit 7152b592593b9d48b33f8997b1dfd6df9143f7ec upstream.
This patch (as1352) fixes a bug in the way isochronous input data is
returned to userspace for usbfs transfers. The entire buffer must be
copied, not just the first actual_length bytes, because the individual
packets will be discontiguous if any of them are short.
Reported-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/devio.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1176,6 +1176,13 @@ static int proc_do_submiturb(struct dev_
free_async(as);
return -ENOMEM;
}
+ /* Isochronous input data may end up being discontiguous
+ * if some of the packets are short. Clear the buffer so
+ * that the gaps don't leak kernel data to userspace.
+ */
+ if (is_in && uurb->type == USBDEVFS_URB_TYPE_ISO)
+ memset(as->urb->transfer_buffer, 0,
+ uurb->buffer_length);
}
as->urb->dev = ps->dev;
as->urb->pipe = (uurb->type << 30) |
@@ -1312,10 +1319,14 @@ static int processcompl(struct async *as
void __user *addr = as->userurb;
unsigned int i;
- if (as->userbuffer && urb->actual_length)
- if (copy_to_user(as->userbuffer, urb->transfer_buffer,
- urb->actual_length))
+ if (as->userbuffer && urb->actual_length) {
+ if (urb->number_of_packets > 0) /* Isochronous */
+ i = urb->transfer_buffer_length;
+ else /* Non-Isoc */
+ i = urb->actual_length;
+ if (copy_to_user(as->userbuffer, urb->transfer_buffer, i))
goto err_out;
+ }
if (put_user(as->status, &userurb->status))
goto err_out;
if (put_user(urb->actual_length, &userurb->actual_length))
^ permalink raw reply [flat|nested] 432+ messages in thread
* [068/156] USB: EHCI: fix ITD list order
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (66 preceding siblings ...)
2010-03-30 22:41 ` [067/156] USB: fix usbfs regression Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [069/156] USB: EHCI: adjust ehci_iso_stream for changes in ehci_qh Greg KH
` (87 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit 92bc3648e6027384479852b770a542722fadee7c upstream.
When isochronous URBs are shorter than one frame and when more than one
ITD in a frame has been completed before the interrupt can be handled,
scan_periodic() completes the URBs in the order in which they are found
in the descriptor list. Therefore, the descriptor list must contain the
ITDs in the correct order, i.e., a new ITD must be linked in after any
previous ITDs of the same endpoint.
This should fix garbled capture data in the USB audio drivers.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Colin Fletcher <colin.m.fletcher@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/ehci-sched.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1563,13 +1563,27 @@ itd_patch(
static inline void
itd_link (struct ehci_hcd *ehci, unsigned frame, struct ehci_itd *itd)
{
- /* always prepend ITD/SITD ... only QH tree is order-sensitive */
- itd->itd_next = ehci->pshadow [frame];
- itd->hw_next = ehci->periodic [frame];
- ehci->pshadow [frame].itd = itd;
+ union ehci_shadow *prev = &ehci->pshadow[frame];
+ __hc32 *hw_p = &ehci->periodic[frame];
+ union ehci_shadow here = *prev;
+ __hc32 type = 0;
+
+ /* skip any iso nodes which might belong to previous microframes */
+ while (here.ptr) {
+ type = Q_NEXT_TYPE(ehci, *hw_p);
+ if (type == cpu_to_hc32(ehci, Q_TYPE_QH))
+ break;
+ prev = periodic_next_shadow(ehci, prev, type);
+ hw_p = shadow_next_periodic(ehci, &here, type);
+ here = *prev;
+ }
+
+ itd->itd_next = here;
+ itd->hw_next = *hw_p;
+ prev->itd = itd;
itd->frame = frame;
wmb ();
- ehci->periodic[frame] = cpu_to_hc32(ehci, itd->itd_dma | Q_TYPE_ITD);
+ *hw_p = cpu_to_hc32(ehci, itd->itd_dma | Q_TYPE_ITD);
}
/* fit urb's itds into the selected schedule slot; activate as needed */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [069/156] USB: EHCI: adjust ehci_iso_stream for changes in ehci_qh
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (67 preceding siblings ...)
2010-03-30 22:41 ` [068/156] USB: EHCI: fix ITD list order Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [070/156] USB: qcserial: add new device ids Greg KH
` (86 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch, Alan Stern,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit 1082f57abfa26590b60c43f503afb24102a37016 upstream.
The EHCI driver stores in usb_host_endpoint.hcpriv a pointer to either
an ehci_qh or an ehci_iso_stream structure, and uses the contents of the
hw_info1 field to distinguish the two cases.
After ehci_qh was split into hw and sw parts, ehci_iso_stream must also
be adjusted so that it again looks like an ehci_qh structure.
This fixes a NULL pointer access in ehci_endpoint_disable() when it
tries to access qh->hw->hw_info1.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Colin Fletcher <colin.m.fletcher@googlemail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/ehci-hcd.c | 2 +-
drivers/usb/host/ehci-sched.c | 4 ++--
drivers/usb/host/ehci.h | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -995,7 +995,7 @@ rescan:
/* endpoints can be iso streams. for now, we don't
* accelerate iso completions ... so spin a while.
*/
- if (qh->hw->hw_info1 == 0) {
+ if (qh->hw == NULL) {
ehci_vdbg (ehci, "iso delay\n");
goto idle_timeout;
}
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1121,8 +1121,8 @@ iso_stream_find (struct ehci_hcd *ehci,
urb->interval);
}
- /* if dev->ep [epnum] is a QH, info1.maxpacket is nonzero */
- } else if (unlikely (stream->hw_info1 != 0)) {
+ /* if dev->ep [epnum] is a QH, hw is set */
+ } else if (unlikely (stream->hw != NULL)) {
ehci_dbg (ehci, "dev %s ep%d%s, not iso??\n",
urb->dev->devpath, epnum,
usb_pipein(urb->pipe) ? "in" : "out");
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -394,9 +394,8 @@ struct ehci_iso_sched {
* acts like a qh would, if EHCI had them for ISO.
*/
struct ehci_iso_stream {
- /* first two fields match QH, but info1 == 0 */
- __hc32 hw_next;
- __hc32 hw_info1;
+ /* first field matches ehci_hq, but is NULL */
+ struct ehci_qh_hw *hw;
u32 refcount;
u8 bEndpointAddress;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [070/156] USB: qcserial: add new device ids
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (68 preceding siblings ...)
2010-03-30 22:41 ` [069/156] USB: EHCI: adjust ehci_iso_stream for changes in ehci_qh Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [071/156] USB: xHCI: re-initialize cmd_completion Greg KH
` (85 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bernhard Rosenkraenzer,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bernhard Rosenkraenzer <br@blankpage.ch>
commit 0725e95ea56698774e893edb7e7276b1d6890954 upstream.
This patch adds various USB device IDs for Gobi 2000 devices, as found in the
drivers available at https://www.codeaurora.org/wiki/GOBI_Releases
Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/qcserial.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -47,6 +47,35 @@ static struct usb_device_id id_table[] =
{USB_DEVICE(0x05c6, 0x9221)}, /* Generic Gobi QDL device */
{USB_DEVICE(0x05c6, 0x9231)}, /* Generic Gobi QDL device */
{USB_DEVICE(0x1f45, 0x0001)}, /* Unknown Gobi QDL device */
+ {USB_DEVICE(0x413c, 0x8185)}, /* Dell Gobi 2000 QDL device (N0218, VU936) */
+ {USB_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */
+ {USB_DEVICE(0x05c6, 0x9224)}, /* Sony Gobi 2000 QDL device (N0279, VU730) */
+ {USB_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
+ {USB_DEVICE(0x05c6, 0x9244)}, /* Samsung Gobi 2000 QDL device (VL176) */
+ {USB_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */
+ {USB_DEVICE(0x03f0, 0x241d)}, /* HP Gobi 2000 QDL device (VP412) */
+ {USB_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */
+ {USB_DEVICE(0x05c6, 0x9214)}, /* Acer Gobi 2000 QDL device (VP413) */
+ {USB_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
+ {USB_DEVICE(0x05c6, 0x9264)}, /* Asus Gobi 2000 QDL device (VR305) */
+ {USB_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */
+ {USB_DEVICE(0x05c6, 0x9234)}, /* Top Global Gobi 2000 QDL device (VR306) */
+ {USB_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */
+ {USB_DEVICE(0x05c6, 0x9274)}, /* iRex Technologies Gobi 2000 QDL device (VR307) */
+ {USB_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */
+ {USB_DEVICE(0x1199, 0x9000)}, /* Sierra Wireless Gobi 2000 QDL device (VT773) */
+ {USB_DEVICE(0x1199, 0x9001)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9002)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9003)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9004)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9005)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9006)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9007)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9008)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9009)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x900a)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x16d8, 0x8001)}, /* CMDTech Gobi 2000 QDL device (VU922) */
+ {USB_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [071/156] USB: xHCI: re-initialize cmd_completion
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (69 preceding siblings ...)
2010-03-30 22:41 ` [070/156] USB: qcserial: add new device ids Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [072/156] USB: serial: ftdi: add CONTEC vendor and product id Greg KH
` (84 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andiry Xu, Sarah Sharp,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andiry Xu <andiry.xu@amd.com>
commit 1d68064a7d80da4a7334cab0356162e36229c1a1 upstream.
When a signal interrupts a Configure Endpoint command, the cmd_completion used
in xhci_configure_endpoint() is not re-initialized and the
wait_for_completion_interruptible_timeout() will return failure. Initialize
cmd_completion in xhci_configure_endpoint().
Signed-off-by: Andiry Xu <andiry.xu@amd.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-hcd.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/usb/host/xhci-hcd.c
+++ b/drivers/usb/host/xhci-hcd.c
@@ -1173,6 +1173,7 @@ static int xhci_configure_endpoint(struc
cmd_completion = &virt_dev->cmd_completion;
cmd_status = &virt_dev->cmd_status;
}
+ init_completion(cmd_completion);
if (!ctx_change)
ret = xhci_queue_configure_endpoint(xhci, in_ctx->dma,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [072/156] USB: serial: ftdi: add CONTEC vendor and product id
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (70 preceding siblings ...)
2010-03-30 22:41 ` [071/156] USB: xHCI: re-initialize cmd_completion Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [073/156] USB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH Greg KH
` (83 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel Sangorrin,
Andreas Mohr, Radek Liboska, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Sangorrin <daniel.sangorrin@gmail.com>
commit dee5658b482e9e2ac7d6205dc876fc11d4008138 upstream.
This is a patch to ftdi_sio_ids.h and ftdi_sio.c that adds identifiers for
CONTEC USB serial converter. I tested it with the device COM-1(USB)H
[akpm@linux-foundation.org: keep the VIDs sorted a bit]
Signed-off-by: Daniel Sangorrin <daniel.sangorrin@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Cc: Radek Liboska <liboska@uochb.cas.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/ftdi_sio.c | 1 +
drivers/usb/serial/ftdi_sio_ids.h | 7 +++++++
2 files changed, 8 insertions(+)
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -658,6 +658,7 @@ static struct usb_device_id id_table_com
{ USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) },
{ USB_DEVICE(EVOLUTION_VID, EVO_HYBRID_PID) },
{ USB_DEVICE(EVOLUTION_VID, EVO_RCM4_PID) },
+ { USB_DEVICE(CONTEC_VID, CONTEC_COM1USBH_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16C_PID) },
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -501,6 +501,13 @@
#define CONTEC_COM1USBH_PID 0x8311 /* COM-1(USB)H */
/*
+ * Contec products (http://www.contec.com)
+ * Submitted by Daniel Sangorrin
+ */
+#define CONTEC_VID 0x06CE /* Vendor ID */
+#define CONTEC_COM1USBH_PID 0x8311 /* COM-1(USB)H */
+
+/*
* Definitions for B&B Electronics products.
*/
#define BANDB_VID 0x0856 /* B&B Electronics Vendor ID */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [073/156] USB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (71 preceding siblings ...)
2010-03-30 22:41 ` [072/156] USB: serial: ftdi: add CONTEC vendor and product id Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [074/156] USB: option: move hardcoded PID to a macro in usb/serial/option Greg KH
` (82 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Nathaniel McCallum,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nathaniel McCallum <nathaniel@natemccallum.com>
commit eaff4cdc978f414cf7b5441a333de3070d80e9c7 upstream.
Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/option.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -288,7 +288,7 @@ static int option_resume(struct usb_ser
#define QUALCOMM_VENDOR_ID 0x05C6
-#define MAXON_VENDOR_ID 0x16d8
+#define CMOTECH_VENDOR_ID 0x16d8
#define TELIT_VENDOR_ID 0x1bc7
#define TELIT_PRODUCT_UC864E 0x1003
@@ -520,7 +520,7 @@ static struct usb_device_id option_ids[]
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
- { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
+ { USB_DEVICE(CMOTECH_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [074/156] USB: option: move hardcoded PID to a macro in usb/serial/option
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (72 preceding siblings ...)
2010-03-30 22:41 ` [073/156] USB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [075/156] USB: option: add support for a new CMOTECH device to usb/serial/option Greg KH
` (81 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Nathaniel McCallum,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nathaniel McCallum <nathaniel@natemccallum.com>
commit bb73ed2a268a29ab1b7d8cc50b5f248578e7e188 upstream.
Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/option.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -289,6 +289,7 @@ static int option_resume(struct usb_ser
#define QUALCOMM_VENDOR_ID 0x05C6
#define CMOTECH_VENDOR_ID 0x16d8
+#define CMOTECH_PRODUCT_6280 0x6280
#define TELIT_VENDOR_ID 0x1bc7
#define TELIT_PRODUCT_UC864E 0x1003
@@ -520,7 +521,7 @@ static struct usb_device_id option_ids[]
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
- { USB_DEVICE(CMOTECH_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
+ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [075/156] USB: option: add support for a new CMOTECH device to usb/serial/option
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (73 preceding siblings ...)
2010-03-30 22:41 ` [074/156] USB: option: move hardcoded PID to a macro in usb/serial/option Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [076/156] usb: r8a66597-hcd: fix removed from an attached hub Greg KH
` (80 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Nathaniel McCallum,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nathaniel McCallum <nathaniel@natemccallum.com>
commit 3b04872aa75006e2a4adaaec21e9c9ede8b8ad9d upstream.
Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/option.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -289,6 +289,7 @@ static int option_resume(struct usb_ser
#define QUALCOMM_VENDOR_ID 0x05C6
#define CMOTECH_VENDOR_ID 0x16d8
+#define CMOTECH_PRODUCT_6008 0x6008
#define CMOTECH_PRODUCT_6280 0x6280
#define TELIT_VENDOR_ID 0x1bc7
@@ -522,6 +523,7 @@ static struct usb_device_id option_ids[]
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
+ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [076/156] usb: r8a66597-hcd: fix removed from an attached hub
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (74 preceding siblings ...)
2010-03-30 22:41 ` [075/156] USB: option: add support for a new CMOTECH device to usb/serial/option Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [077/156] wl1251: fix potential crash Greg KH
` (79 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Yoshihiro Shimoda,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
commit d835933436ac0d1e8f5b35fe809fd4e767e55d6e upstream.
fix the problem that when a USB hub is attached to the r8a66597-hcd and
a device is removed from that hub, it's likely that a kernel panic follows.
Reported-by: Markus Pietrek <Markus.Pietrek@emtrion.de>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/r8a66597-hcd.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -418,7 +418,7 @@ static u8 alloc_usb_address(struct r8a66
/* this function must be called with interrupt disabled */
static void free_usb_address(struct r8a66597 *r8a66597,
- struct r8a66597_device *dev)
+ struct r8a66597_device *dev, int reset)
{
int port;
@@ -430,7 +430,13 @@ static void free_usb_address(struct r8a6
dev->state = USB_STATE_DEFAULT;
r8a66597->address_map &= ~(1 << dev->address);
dev->address = 0;
- dev_set_drvdata(&dev->udev->dev, NULL);
+ /*
+ * Only when resetting USB, it is necessary to erase drvdata. When
+ * a usb device with usb hub is disconnect, "dev->udev" is already
+ * freed on usb_desconnect(). So we cannot access the data.
+ */
+ if (reset)
+ dev_set_drvdata(&dev->udev->dev, NULL);
list_del(&dev->device_list);
kfree(dev);
@@ -1069,7 +1075,7 @@ static void r8a66597_usb_disconnect(stru
struct r8a66597_device *dev = r8a66597->root_hub[port].dev;
disable_r8a66597_pipe_all(r8a66597, dev);
- free_usb_address(r8a66597, dev);
+ free_usb_address(r8a66597, dev, 0);
start_root_hub_sampling(r8a66597, port, 0);
}
@@ -2085,7 +2091,7 @@ static void update_usb_address_map(struc
spin_lock_irqsave(&r8a66597->lock, flags);
dev = get_r8a66597_device(r8a66597, addr);
disable_r8a66597_pipe_all(r8a66597, dev);
- free_usb_address(r8a66597, dev);
+ free_usb_address(r8a66597, dev, 0);
put_child_connect_map(r8a66597, addr);
spin_unlock_irqrestore(&r8a66597->lock, flags);
}
@@ -2228,7 +2234,7 @@ static int r8a66597_hub_control(struct u
rh->port |= (1 << USB_PORT_FEAT_RESET);
disable_r8a66597_pipe_all(r8a66597, dev);
- free_usb_address(r8a66597, dev);
+ free_usb_address(r8a66597, dev, 1);
r8a66597_mdfy(r8a66597, USBRST, USBRST | UACT,
get_dvstctr_reg(port));
^ permalink raw reply [flat|nested] 432+ messages in thread
* [077/156] wl1251: fix potential crash
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (75 preceding siblings ...)
2010-03-30 22:41 ` [076/156] usb: r8a66597-hcd: fix removed from an attached hub Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [078/156] jme: Fix VLAN memory leak Greg KH
` (78 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Grazvydas Ignotas,
Kalle Valo, John W. Linville, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Grazvydas Ignotas <notasas@gmail.com>
commit 3f60ebc9d6291863652d564bacc430629271e6a9 upstream.
In case debugfs does not init for some reason (or is disabled
on older kernels) driver does not allocate stats.fw_stats
structure, but tries to clear it later and trips on a NULL
pointer:
Unable to handle kernel NULL pointer dereference at virtual address
00000000
PC is at __memzero+0x24/0x80
Backtrace:
[<bf0ddb88>] (wl1251_debugfs_reset+0x0/0x30 [wl1251])
[<bf0d6a2c>] (wl1251_op_stop+0x0/0x12c [wl1251])
[<bf0bc228>] (ieee80211_stop_device+0x0/0x74 [mac80211])
[<bf0b0d10>] (ieee80211_stop+0x0/0x4ac [mac80211])
[<c02deeac>] (dev_close+0x0/0xb4)
[<c02deac0>] (dev_change_flags+0x0/0x184)
[<c031f478>] (devinet_ioctl+0x0/0x704)
[<c0320720>] (inet_ioctl+0x0/0x100)
Add a NULL pointer check to fix this.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/wl12xx/wl1251_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/wireless/wl12xx/wl1251_debugfs.c
+++ b/drivers/net/wireless/wl12xx/wl1251_debugfs.c
@@ -443,7 +443,8 @@ out:
void wl1251_debugfs_reset(struct wl1251 *wl)
{
- memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats));
+ if (wl->stats.fw_stats != NULL)
+ memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats));
wl->stats.retry_count = 0;
wl->stats.excessive_retries = 0;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [078/156] jme: Fix VLAN memory leak
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (76 preceding siblings ...)
2010-03-30 22:41 ` [077/156] wl1251: fix potential crash Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [079/156] jme: Protect vlgrp structure by pause RX actions Greg KH
` (77 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Guo-Fu Tseng,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Guo-Fu Tseng <cooldavid@cooldavid.org>
commit 17da69b8bfbe441a33a873ad5dd7d3d85800bf2b upstream.
Fix memory leak while receiving 8021q tagged packet which is not
registered by user.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/jme.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -946,6 +946,8 @@ jme_alloc_and_feed_skb(struct jme_adapte
jme->jme_vlan_rx(skb, jme->vlgrp,
le16_to_cpu(rxdesc->descwb.vlan));
NET_STAT(jme).rx_bytes += 4;
+ } else {
+ dev_kfree_skb(skb);
}
} else {
jme->jme_rx(skb);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [079/156] jme: Protect vlgrp structure by pause RX actions.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (77 preceding siblings ...)
2010-03-30 22:41 ` [078/156] jme: Fix VLAN memory leak Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [080/156] edac, mce: Filter out invalid values Greg KH
` (76 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Guo-Fu Tseng,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Guo-Fu Tseng <cooldavid@cooldavid.org>
commit bf5e5360fd1df1ae429ebbd81838d7d0879797d1 upstream.
Temporary stop the RX IRQ, and disable (sync) tasklet or napi.
And restore it after finished the vlgrp pointer assignment.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/jme.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -2087,12 +2087,45 @@ jme_tx_timeout(struct net_device *netdev
jme_reset_link(jme);
}
+static inline void jme_pause_rx(struct jme_adapter *jme)
+{
+ atomic_dec(&jme->link_changing);
+
+ jme_set_rx_pcc(jme, PCC_OFF);
+ if (test_bit(JME_FLAG_POLL, &jme->flags)) {
+ JME_NAPI_DISABLE(jme);
+ } else {
+ tasklet_disable(&jme->rxclean_task);
+ tasklet_disable(&jme->rxempty_task);
+ }
+}
+
+static inline void jme_resume_rx(struct jme_adapter *jme)
+{
+ struct dynpcc_info *dpi = &(jme->dpi);
+
+ if (test_bit(JME_FLAG_POLL, &jme->flags)) {
+ JME_NAPI_ENABLE(jme);
+ } else {
+ tasklet_hi_enable(&jme->rxclean_task);
+ tasklet_hi_enable(&jme->rxempty_task);
+ }
+ dpi->cur = PCC_P1;
+ dpi->attempt = PCC_P1;
+ dpi->cnt = 0;
+ jme_set_rx_pcc(jme, PCC_P1);
+
+ atomic_inc(&jme->link_changing);
+}
+
static void
jme_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
{
struct jme_adapter *jme = netdev_priv(netdev);
+ jme_pause_rx(jme);
jme->vlgrp = grp;
+ jme_resume_rx(jme);
}
static void
^ permalink raw reply [flat|nested] 432+ messages in thread
* [080/156] edac, mce: Filter out invalid values
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (78 preceding siblings ...)
2010-03-30 22:41 ` [079/156] jme: Protect vlgrp structure by pause RX actions Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [081/156] iwlwifi: Silence tfds_in_queue message Greg KH
` (75 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Borislav Petkov,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Borislav Petkov <borislav.petkov@amd.com>
commit 5b89d2f9ace1970324facc68ca9b8fae19ce8096 upstream.
Print the CPU associated with the error only when the field is valid.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/edac/edac_mce_amd.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- a/drivers/edac/edac_mce_amd.c
+++ b/drivers/edac/edac_mce_amd.c
@@ -316,7 +316,12 @@ void amd_decode_nb_mce(int node_id, stru
if (regs->nbsh & K8_NBSH_ERR_CPU_VAL)
pr_cont(", core: %u\n", (u8)(regs->nbsh & 0xf));
} else {
- pr_cont(", core: %d\n", fls((regs->nbsh & 0xf) - 1));
+ u8 assoc_cpus = regs->nbsh & 0xf;
+
+ if (assoc_cpus > 0)
+ pr_cont(", core: %d", fls(assoc_cpus) - 1);
+
+ pr_cont("\n");
}
pr_emerg("%s.\n", EXT_ERR_MSG(xec));
^ permalink raw reply [flat|nested] 432+ messages in thread
* [081/156] iwlwifi: Silence tfds_in_queue message
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (79 preceding siblings ...)
2010-03-30 22:41 ` [080/156] edac, mce: Filter out invalid values Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [082/156] SUNRPC: Fix a potential memory leak in auth_gss Greg KH
` (74 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Adel Gadllah,
Reinette Chatre, John W. Linville, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Adel Gadllah <adel.gadllah@gmail.com>
commit c8406ea8fa1adde8dc5400127281d497bbcdb84a upstream.
Commit a239a8b47cc0e5e6d7416a89f340beac06d5edaa introduced a
noisy message, that fills up the log very fast.
The error seems not to be fatal (the connection is stable and
performance is ok), so make it IWL_DEBUG_TX rather than IWL_ERR.
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Acked-by: Reinette Chatre <reinette.chatre@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-tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -127,7 +127,7 @@ void iwl_free_tfds_in_queue(struct iwl_p
if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed)
priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
else {
- IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n",
+ IWL_DEBUG_TX(priv, "free more than tfds_in_queue (%u:%d)\n",
priv->stations[sta_id].tid[tid].tfds_in_queue,
freed);
priv->stations[sta_id].tid[tid].tfds_in_queue = 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [082/156] SUNRPC: Fix a potential memory leak in auth_gss
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (80 preceding siblings ...)
2010-03-30 22:41 ` [081/156] iwlwifi: Silence tfds_in_queue message Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [083/156] sunrpc: handle allocation errors from __rpc_lookup_create() Greg KH
` (73 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Trond Myklebust,
J. Bruce Fields, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit cdead7cf12896c0e50a8be2e52de52c364603095 upstream.
The function alloc_enc_pages() currently fails to release the pointer
rqstp->rq_enc_pages in the error path.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sunrpc/auth_gss/auth_gss.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -1273,9 +1273,8 @@ alloc_enc_pages(struct rpc_rqst *rqstp)
rqstp->rq_release_snd_buf = priv_release_snd_buf;
return 0;
out_free:
- for (i--; i >= 0; i--) {
- __free_page(rqstp->rq_enc_pages[i]);
- }
+ rqstp->rq_enc_pages_num = i;
+ priv_release_snd_buf(rqstp);
out:
return -EAGAIN;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [083/156] sunrpc: handle allocation errors from __rpc_lookup_create()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (81 preceding siblings ...)
2010-03-30 22:41 ` [082/156] SUNRPC: Fix a potential memory leak in auth_gss Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [084/156] kfifo: fix KFIFO_INIT in include/linux/kfifo.h Greg KH
` (72 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dan Carpenter,
Trond Myklebust, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dan Carpenter <error27@gmail.com>
commit f1f0abe192a72e75d7c59972e30784d043fd8d73 upstream.
__rpc_lookup_create() can return ERR_PTR(-ENOMEM).
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sunrpc/rpc_pipe.c | 2 ++
1 file changed, 2 insertions(+)
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_creat
struct dentry *dentry;
dentry = __rpc_lookup_create(parent, name);
+ if (IS_ERR(dentry))
+ return dentry;
if (dentry->d_inode == NULL)
return dentry;
dput(dentry);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [084/156] kfifo: fix KFIFO_INIT in include/linux/kfifo.h
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (82 preceding siblings ...)
2010-03-30 22:41 ` [083/156] sunrpc: handle allocation errors from __rpc_lookup_create() Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:41 ` [085/156] if_tunnel.h: add missing ams/byteorder.h include Greg KH
` (71 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David HÀrdeman,
Stefani Seibold, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: =?UTF-8?q?David=20H=C3=A4rdeman?= <david@hardeman.nu>
commit 4c87684d32e8f95715d53039dcd2d998dc63d1eb upstream.
include/linux/kfifo.h first defines and then undefines __kfifo_initializer
which is used by INIT_KFIFO (which is also a macro, so building a module
which uses INIT_KFIFO will fail).
Signed-off-by: David Härdeman <david@hardeman.nu>
Acked-by: Stefani Seibold <stefani@seibold.net>
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>
---
include/linux/kfifo.h | 2 --
1 file changed, 2 deletions(-)
--- a/include/linux/kfifo.h
+++ b/include/linux/kfifo.h
@@ -102,8 +102,6 @@ union { \
unsigned char name##kfifo_buffer[size]; \
struct kfifo name = __kfifo_initializer(size, name##kfifo_buffer)
-#undef __kfifo_initializer
-
extern void kfifo_init(struct kfifo *fifo, void *buffer,
unsigned int size);
extern __must_check int kfifo_alloc(struct kfifo *fifo, unsigned int size,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [085/156] if_tunnel.h: add missing ams/byteorder.h include
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (83 preceding siblings ...)
2010-03-30 22:41 ` [084/156] kfifo: fix KFIFO_INIT in include/linux/kfifo.h Greg KH
@ 2010-03-30 22:41 ` Greg KH
2010-03-30 22:42 ` [086/156] fs/partitions/msdos: add support for large disks Greg KH
` (70 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:41 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Paulius Zaleckas,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Paulius Zaleckas <paulius.zaleckas@gmail.com>
commit 9bf35c8dddd56f7f247a27346f74f5adc18071f4 upstream.
When compiling userspace application which includes
if_tunnel.h and uses GRE_* defines you will get undefined
reference to __cpu_to_be16.
Fix this by adding missing #include <asm/byteorder.h>
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/if_tunnel.h | 1 +
1 file changed, 1 insertion(+)
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -2,6 +2,7 @@
#define _IF_TUNNEL_H_
#include <linux/types.h>
+#include <asm/byteorder.h>
#ifdef __KERNEL__
#include <linux/ip.h>
^ permalink raw reply [flat|nested] 432+ messages in thread
* [086/156] fs/partitions/msdos: add support for large disks
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (84 preceding siblings ...)
2010-03-30 22:41 ` [085/156] if_tunnel.h: add missing ams/byteorder.h include Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [087/156] fs/partition/msdos: fix unusable extended partition for > 512B sector Greg KH
` (69 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel Taylor,
OGAWA Hirofumi, H. Peter Anvin, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Taylor <Daniel.Taylor@wdc.com>
commit 3fbf586cf7f245392142e5407c2a56f1cff979b6 upstream.
In order to use disks larger than 2TiB on Windows XP, it is necessary to
use 4096-byte logical sectors in an MBR.
Although the kernel storage and functions called from msdos.c used
"sector_t" internally, msdos.c still used u32 variables, which results in
the ability to handle XP-compatible large disks.
This patch changes the internal variables to "sector_t".
Daniel said: "In the near future, WD will be releasing products that need
this patch".
[hirofumi@mail.parknet.co.jp: tweaks and fix]
Signed-off-by: Daniel Taylor <daniel.taylor@wdc.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: "H. Peter Anvin" <hpa@zytor.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>
---
fs/partitions/msdos.c | 74 ++++++++++++++++++++++++++------------------------
1 file changed, 39 insertions(+), 35 deletions(-)
--- a/fs/partitions/msdos.c
+++ b/fs/partitions/msdos.c
@@ -31,14 +31,17 @@
*/
#include <asm/unaligned.h>
-#define SYS_IND(p) (get_unaligned(&p->sys_ind))
-#define NR_SECTS(p) ({ __le32 __a = get_unaligned(&p->nr_sects); \
- le32_to_cpu(__a); \
- })
-
-#define START_SECT(p) ({ __le32 __a = get_unaligned(&p->start_sect); \
- le32_to_cpu(__a); \
- })
+#define SYS_IND(p) get_unaligned(&p->sys_ind)
+
+static inline sector_t nr_sects(struct partition *p)
+{
+ return (sector_t)get_unaligned_le32(&p->nr_sects);
+}
+
+static inline sector_t start_sect(struct partition *p)
+{
+ return (sector_t)get_unaligned_le32(&p->start_sect);
+}
static inline int is_extended_partition(struct partition *p)
{
@@ -104,13 +107,13 @@ static int aix_magic_present(unsigned ch
static void
parse_extended(struct parsed_partitions *state, struct block_device *bdev,
- u32 first_sector, u32 first_size)
+ sector_t first_sector, sector_t first_size)
{
struct partition *p;
Sector sect;
unsigned char *data;
- u32 this_sector, this_size;
- int sector_size = bdev_logical_block_size(bdev) / 512;
+ sector_t this_sector, this_size;
+ sector_t sector_size = bdev_logical_block_size(bdev) / 512;
int loopct = 0; /* number of links followed
without finding a data partition */
int i;
@@ -145,14 +148,14 @@ parse_extended(struct parsed_partitions
* First process the data partition(s)
*/
for (i=0; i<4; i++, p++) {
- u32 offs, size, next;
- if (!NR_SECTS(p) || is_extended_partition(p))
+ sector_t offs, size, next;
+ if (!nr_sects(p) || is_extended_partition(p))
continue;
/* Check the 3rd and 4th entries -
these sometimes contain random garbage */
- offs = START_SECT(p)*sector_size;
- size = NR_SECTS(p)*sector_size;
+ offs = start_sect(p)*sector_size;
+ size = nr_sects(p)*sector_size;
next = this_sector + offs;
if (i >= 2) {
if (offs + size > this_size)
@@ -179,13 +182,13 @@ parse_extended(struct parsed_partitions
*/
p -= 4;
for (i=0; i<4; i++, p++)
- if (NR_SECTS(p) && is_extended_partition(p))
+ if (nr_sects(p) && is_extended_partition(p))
break;
if (i == 4)
goto done; /* nothing left to do */
- this_sector = first_sector + START_SECT(p) * sector_size;
- this_size = NR_SECTS(p) * sector_size;
+ this_sector = first_sector + start_sect(p) * sector_size;
+ this_size = nr_sects(p) * sector_size;
put_dev_sector(sect);
}
done:
@@ -197,7 +200,7 @@ done:
static void
parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_SOLARIS_X86_PARTITION
Sector sect;
@@ -244,7 +247,7 @@ parse_solaris_x86(struct parsed_partitio
*/
static void
parse_bsd(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin, char *flavour,
+ sector_t offset, sector_t size, int origin, char *flavour,
int max_partitions)
{
Sector sect;
@@ -263,7 +266,7 @@ parse_bsd(struct parsed_partitions *stat
if (le16_to_cpu(l->d_npartitions) < max_partitions)
max_partitions = le16_to_cpu(l->d_npartitions);
for (p = l->d_partitions; p - l->d_partitions < max_partitions; p++) {
- u32 bsd_start, bsd_size;
+ sector_t bsd_start, bsd_size;
if (state->next == state->limit)
break;
@@ -290,7 +293,7 @@ parse_bsd(struct parsed_partitions *stat
static void
parse_freebsd(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_BSD_DISKLABEL
parse_bsd(state, bdev, offset, size, origin,
@@ -300,7 +303,7 @@ parse_freebsd(struct parsed_partitions *
static void
parse_netbsd(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_BSD_DISKLABEL
parse_bsd(state, bdev, offset, size, origin,
@@ -310,7 +313,7 @@ parse_netbsd(struct parsed_partitions *s
static void
parse_openbsd(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_BSD_DISKLABEL
parse_bsd(state, bdev, offset, size, origin,
@@ -324,7 +327,7 @@ parse_openbsd(struct parsed_partitions *
*/
static void
parse_unixware(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_UNIXWARE_DISKLABEL
Sector sect;
@@ -348,7 +351,8 @@ parse_unixware(struct parsed_partitions
if (p->s_label != UNIXWARE_FS_UNUSED)
put_partition(state, state->next++,
- START_SECT(p), NR_SECTS(p));
+ le32_to_cpu(p->start_sect),
+ le32_to_cpu(p->nr_sects));
p++;
}
put_dev_sector(sect);
@@ -363,7 +367,7 @@ parse_unixware(struct parsed_partitions
*/
static void
parse_minix(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_MINIX_SUBPARTITION
Sector sect;
@@ -390,7 +394,7 @@ parse_minix(struct parsed_partitions *st
/* add each partition in use */
if (SYS_IND(p) == MINIX_PARTITION)
put_partition(state, state->next++,
- START_SECT(p), NR_SECTS(p));
+ start_sect(p), nr_sects(p));
}
printk(" >\n");
}
@@ -401,7 +405,7 @@ parse_minix(struct parsed_partitions *st
static struct {
unsigned char id;
void (*parse)(struct parsed_partitions *, struct block_device *,
- u32, u32, int);
+ sector_t, sector_t, int);
} subtypes[] = {
{FREEBSD_PARTITION, parse_freebsd},
{NETBSD_PARTITION, parse_netbsd},
@@ -415,7 +419,7 @@ static struct {
int msdos_partition(struct parsed_partitions *state, struct block_device *bdev)
{
- int sector_size = bdev_logical_block_size(bdev) / 512;
+ sector_t sector_size = bdev_logical_block_size(bdev) / 512;
Sector sect;
unsigned char *data;
struct partition *p;
@@ -483,8 +487,8 @@ int msdos_partition(struct parsed_partit
state->next = 5;
for (slot = 1 ; slot <= 4 ; slot++, p++) {
- u32 start = START_SECT(p)*sector_size;
- u32 size = NR_SECTS(p)*sector_size;
+ sector_t start = start_sect(p)*sector_size;
+ sector_t size = nr_sects(p)*sector_size;
if (!size)
continue;
if (is_extended_partition(p)) {
@@ -513,7 +517,7 @@ int msdos_partition(struct parsed_partit
unsigned char id = SYS_IND(p);
int n;
- if (!NR_SECTS(p))
+ if (!nr_sects(p))
continue;
for (n = 0; subtypes[n].parse && id != subtypes[n].id; n++)
@@ -521,8 +525,8 @@ int msdos_partition(struct parsed_partit
if (!subtypes[n].parse)
continue;
- subtypes[n].parse(state, bdev, START_SECT(p)*sector_size,
- NR_SECTS(p)*sector_size, slot);
+ subtypes[n].parse(state, bdev, start_sect(p)*sector_size,
+ nr_sects(p)*sector_size, slot);
}
put_dev_sector(sect);
return 1;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [087/156] fs/partition/msdos: fix unusable extended partition for > 512B sector
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (85 preceding siblings ...)
2010-03-30 22:42 ` [086/156] fs/partitions/msdos: add support for large disks Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [088/156] PCI: fix return value from pcix_get_max_mmrbc() Greg KH
` (68 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, OGAWA Hirofumi,
Daniel Taylor, H. Peter Anvin, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
commit 8e0cc811e0f8029a7225372fb0951fab102c012f upstream.
Smaller size than a minimum blocksize can't be used, after all it's
handled like 0 size.
For extended partition itself, this makes sure to use bigger size than one
logical sector size at least.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Daniel Taylor <Daniel.Taylor@wdc.com>
Cc: "H. Peter Anvin" <hpa@zytor.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>
---
fs/partitions/msdos.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
--- a/fs/partitions/msdos.c
+++ b/fs/partitions/msdos.c
@@ -492,9 +492,16 @@ int msdos_partition(struct parsed_partit
if (!size)
continue;
if (is_extended_partition(p)) {
- /* prevent someone doing mkfs or mkswap on an
- extended partition, but leave room for LILO */
- put_partition(state, slot, start, size == 1 ? 1 : 2);
+ /*
+ * prevent someone doing mkfs or mkswap on an
+ * extended partition, but leave room for LILO
+ * FIXME: this uses one logical sector for > 512b
+ * sector, although it may not be enough/proper.
+ */
+ sector_t n = 2;
+ n = min(size, max(sector_size, n));
+ put_partition(state, slot, start, n);
+
printk(" <");
parse_extended(state, bdev, start, size);
printk(" >");
^ permalink raw reply [flat|nested] 432+ messages in thread
* [088/156] PCI: fix return value from pcix_get_max_mmrbc()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (86 preceding siblings ...)
2010-03-30 22:42 ` [087/156] fs/partition/msdos: fix unusable extended partition for > 512B sector Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [089/156] PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions Greg KH
` (67 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jesse Barnes,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit 25daeb550b69e89aff59bc6a84218a12b5203531 upstream.
For the PCI_X_STATUS register, pcix_get_max_mmrbc() is returning an incorrect
value, which is based on:
(stat & PCI_X_STATUS_MAX_READ) >> 12
Valid return values are 512, 1024, 2048, 4096, which correspond to a 'stat'
(masked and right shifted by 21) of 0, 1, 2, 3, respectively.
A right shift by 11 would generate the correct return value when 'stat' (masked
and right shifted by 21) has a value of 1 or 2. But for a value of 0 or 3 it's
not possible to generate the correct return value by only right shifting.
Fix is based on pcix_get_mmrbc()'s similar dealings with the PCI_X_CMD register.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2432,7 +2432,7 @@ int pcix_get_max_mmrbc(struct pci_dev *d
if (err)
return -EINVAL;
- return (stat & PCI_X_STATUS_MAX_READ) >> 12;
+ return 512 << ((stat & PCI_X_STATUS_MAX_READ) >> 21);
}
EXPORT_SYMBOL(pcix_get_max_mmrbc);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [089/156] PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (87 preceding siblings ...)
2010-03-30 22:42 ` [088/156] PCI: fix return value from pcix_get_max_mmrbc() Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [090/156] PCI: cleanup error return for " Greg KH
` (66 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jesse Barnes,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit bdc2bda7c4dd253026cc1fce45fc939304749029 upstream.
An e1000 driver on a system with a PCI-X bus was always being returned
a value of 135 from both pcix_get_mmrbc() and pcix_set_mmrbc(). This
value reflects an error return of PCIBIOS_BAD_REGISTER_NUMBER from
pci_bus_read_config_dword(,, cap + PCI_X_CMD,).
This is because for a dword, the following portion of the PCI_OP_READ()
macro:
if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER;
expands to:
if (pos & 3) return PCIBIOS_BAD_REGISTER_NUMBER;
And is always true for 'cap + PCI_X_CMD', which is 0xe4 + 2 = 0xe6. ('cap' is
the result of calling pci_find_capability(, PCI_CAP_ID_PCIX).)
The same problem exists for pci_bus_write_config_dword(,, cap + PCI_X_CMD,).
In both cases, instead of calling _dword(), _word() should be called.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pci.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2446,13 +2446,13 @@ EXPORT_SYMBOL(pcix_get_max_mmrbc);
int pcix_get_mmrbc(struct pci_dev *dev)
{
int ret, cap;
- u32 cmd;
+ u16 cmd;
cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (!cap)
return -EINVAL;
- ret = pci_read_config_dword(dev, cap + PCI_X_CMD, &cmd);
+ ret = pci_read_config_word(dev, cap + PCI_X_CMD, &cmd);
if (!ret)
ret = 512 << ((cmd & PCI_X_CMD_MAX_READ) >> 2);
@@ -2472,7 +2472,8 @@ EXPORT_SYMBOL(pcix_get_mmrbc);
int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc)
{
int cap, err = -EINVAL;
- u32 stat, cmd, v, o;
+ u32 stat, v, o;
+ u16 cmd;
if (mmrbc < 512 || mmrbc > 4096 || !is_power_of_2(mmrbc))
goto out;
@@ -2490,7 +2491,7 @@ int pcix_set_mmrbc(struct pci_dev *dev,
if (v > (stat & PCI_X_STATUS_MAX_READ) >> 21)
return -E2BIG;
- err = pci_read_config_dword(dev, cap + PCI_X_CMD, &cmd);
+ err = pci_read_config_word(dev, cap + PCI_X_CMD, &cmd);
if (err)
goto out;
@@ -2502,7 +2503,7 @@ int pcix_set_mmrbc(struct pci_dev *dev,
cmd &= ~PCI_X_CMD_MAX_READ;
cmd |= v << 2;
- err = pci_write_config_dword(dev, cap + PCI_X_CMD, cmd);
+ err = pci_write_config_word(dev, cap + PCI_X_CMD, cmd);
}
out:
return err;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [090/156] PCI: cleanup error return for pcix get and set mmrbc functions
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (88 preceding siblings ...)
2010-03-30 22:42 ` [089/156] PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [091/156] PCI quirk: RS780/RS880: work around missing MSI initialization Greg KH
` (65 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jesse Barnes,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit 7c9e2b1c4784c6e574f69dbd904b2822f2e04d6e upstream.
pcix_get_mmrbc() returns the maximum memory read byte count (mmrbc), if
successful, or an appropriate error value, if not.
Distinguishing errors from correct values and understanding the meaning of an
error can be somewhat confusing in that:
correct values: 512, 1024, 2048, 4096
errors: -EINVAL -22
PCIBIOS_FUNC_NOT_SUPPORTED 0x81
PCIBIOS_BAD_VENDOR_ID 0x83
PCIBIOS_DEVICE_NOT_FOUND 0x86
PCIBIOS_BAD_REGISTER_NUMBER 0x87
PCIBIOS_SET_FAILED 0x88
PCIBIOS_BUFFER_TOO_SMALL 0x89
The PCIBIOS_ errors are returned from the PCI functions generated by the
PCI_OP_READ() and PCI_OP_WRITE() macros.
In a similar manner, pcix_set_mmrbc() also returns the PCIBIOS_ error values
returned from pci_read_config_[word|dword]() and pci_write_config_word().
Following pcix_get_max_mmrbc()'s example, the following patch simply returns
-EINVAL for all PCIBIOS_ errors encountered by pcix_get_mmrbc(), and -EINVAL
or -EIO for those encountered by pcix_set_mmrbc().
This simplification was chosen in light of the fact that none of the current
callers of these functions are interested in the specific type of error
encountered. In the future, should this change, one could simply create a
function that maps each PCIBIOS_ error to a corresponding unique errno value,
which could be called by pcix_get_max_mmrbc(), pcix_get_mmrbc(), and
pcix_set_mmrbc().
Additionally, this patch eliminates some unnecessary variables.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pci.c | 36 ++++++++++++++++--------------------
1 file changed, 16 insertions(+), 20 deletions(-)
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2421,15 +2421,14 @@ EXPORT_SYMBOL_GPL(pci_reset_function);
*/
int pcix_get_max_mmrbc(struct pci_dev *dev)
{
- int err, cap;
+ int cap;
u32 stat;
cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (!cap)
return -EINVAL;
- err = pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat);
- if (err)
+ if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat))
return -EINVAL;
return 512 << ((stat & PCI_X_STATUS_MAX_READ) >> 21);
@@ -2445,18 +2444,17 @@ EXPORT_SYMBOL(pcix_get_max_mmrbc);
*/
int pcix_get_mmrbc(struct pci_dev *dev)
{
- int ret, cap;
+ int cap;
u16 cmd;
cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (!cap)
return -EINVAL;
- ret = pci_read_config_word(dev, cap + PCI_X_CMD, &cmd);
- if (!ret)
- ret = 512 << ((cmd & PCI_X_CMD_MAX_READ) >> 2);
+ if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd))
+ return -EINVAL;
- return ret;
+ return 512 << ((cmd & PCI_X_CMD_MAX_READ) >> 2);
}
EXPORT_SYMBOL(pcix_get_mmrbc);
@@ -2471,29 +2469,27 @@ EXPORT_SYMBOL(pcix_get_mmrbc);
*/
int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc)
{
- int cap, err = -EINVAL;
+ int cap;
u32 stat, v, o;
u16 cmd;
if (mmrbc < 512 || mmrbc > 4096 || !is_power_of_2(mmrbc))
- goto out;
+ return -EINVAL;
v = ffs(mmrbc) - 10;
cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (!cap)
- goto out;
+ return -EINVAL;
- err = pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat);
- if (err)
- goto out;
+ if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat))
+ return -EINVAL;
if (v > (stat & PCI_X_STATUS_MAX_READ) >> 21)
return -E2BIG;
- err = pci_read_config_word(dev, cap + PCI_X_CMD, &cmd);
- if (err)
- goto out;
+ if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd))
+ return -EINVAL;
o = (cmd & PCI_X_CMD_MAX_READ) >> 2;
if (o != v) {
@@ -2503,10 +2499,10 @@ int pcix_set_mmrbc(struct pci_dev *dev,
cmd &= ~PCI_X_CMD_MAX_READ;
cmd |= v << 2;
- err = pci_write_config_word(dev, cap + PCI_X_CMD, cmd);
+ if (pci_write_config_word(dev, cap + PCI_X_CMD, cmd))
+ return -EIO;
}
-out:
- return err;
+ return 0;
}
EXPORT_SYMBOL(pcix_set_mmrbc);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [091/156] PCI quirk: RS780/RS880: work around missing MSI initialization
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (89 preceding siblings ...)
2010-03-30 22:42 ` [090/156] PCI: cleanup error return for " Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-31 20:40 ` Rafael J. Wysocki
2010-03-30 22:42 ` [092/156] ath9k: fix BUG_ON triggered by PAE frames Greg KH
` (64 subsequent siblings)
155 siblings, 1 reply; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch,
Jesse Barnes, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit a5ee4eb75413c145334c30e43f1af9875dad6fd7 upstream.
AMD says in section 2.5.4 (GFX MSI Enable) of #43291 (AMD 780G Family
Register Programming Requirements):
The SBIOS must enable internal graphics MSI capability in GCCFG by
setting the following: NBCFG.NB_CNTL.STRAP_MSI_ENABLE='1'
Quite a few BIOS writers misinterpret this sentence and think that
enabling MSI is an optional feature. However, clearing that bit just
prevents delivery of MSI messages but does not remove the MSI PCI
capabilities registers, and so leaves these devices unusable for any
driver that attempts to use MSI.
Setting that bit is not possible after the BIOS has locked down the
configuration registers, so we have to manually disable MSI for the
affected devices.
This fixes the codec communication errors in the HDA driver when
accessing the HDMI audio device, and allows us to get rid of the
overcautious quirk in radeon_irq_kms.c.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Alex Deucher <alexdeucher@gamil.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/radeon/radeon_irq_kms.c | 8 -------
drivers/pci/quirks.c | 33 ++++++++++++++++++++++++++++++++
2 files changed, 34 insertions(+), 7 deletions(-)
--- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
@@ -116,13 +116,7 @@ int radeon_irq_kms_init(struct radeon_de
}
/* enable msi */
rdev->msi_enabled = 0;
- /* MSIs don't seem to work on my rs780;
- * not sure about rs880 or other rs780s.
- * Needs more investigation.
- */
- if ((rdev->family >= CHIP_RV380) &&
- (rdev->family != CHIP_RS780) &&
- (rdev->family != CHIP_RS880)) {
+ if (rdev->family >= CHIP_RV380) {
int ret = pci_enable_msi(rdev->pdev);
if (!ret) {
rdev->msi_enabled = 1;
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2484,6 +2484,39 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375,
quirk_msi_intx_disable_bug);
+/*
+ * MSI does not work with the AMD RS780/RS880 internal graphics and HDMI audio
+ * devices unless the BIOS has initialized the nb_cntl.strap_msi_enable bit.
+ */
+static void __init rs780_int_gfx_disable_msi(struct pci_dev *int_gfx_bridge)
+{
+ u32 nb_cntl;
+
+ if (!int_gfx_bridge->subordinate)
+ return;
+
+ pci_bus_write_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0),
+ 0x60, 0);
+ pci_bus_read_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0),
+ 0x64, &nb_cntl);
+
+ if (!(nb_cntl & BIT(10))) {
+ dev_warn(&int_gfx_bridge->dev,
+ FW_WARN "RS780: MSI for internal graphics disabled\n");
+ int_gfx_bridge->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
+ }
+}
+
+#define PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX 0x9602
+
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,
+ PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
+ rs780_int_gfx_disable_msi);
+/* wrong vendor ID on M4A785TD motherboard: */
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK,
+ PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
+ rs780_int_gfx_disable_msi);
+
#endif /* CONFIG_PCI_MSI */
#ifdef CONFIG_PCI_IOV
^ permalink raw reply [flat|nested] 432+ messages in thread
* [092/156] ath9k: fix BUG_ON triggered by PAE frames
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (90 preceding siblings ...)
2010-03-30 22:42 ` [091/156] PCI quirk: RS780/RS880: work around missing MSI initialization Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [093/156] cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node Greg KH
` (63 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Felix Fietkau,
John W. Linville, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Felix Fietkau <nbd@openwrt.org>
commit 4fdec031b9169b3c17938b9c4168f099f457169c upstream.
When I initially stumbled upon sequence number problems with PAE frames
in ath9k, I submitted a patch to remove all special cases for PAE
frames and let them go through the normal transmit path.
Out of concern about crypto incompatibility issues, this change was
merged instead:
commit 6c8afef551fef87a3bf24f8a74c69a7f2f72fc82
Author: Sujith <Sujith.Manoharan@atheros.com>
Date: Tue Feb 9 10:07:00 2010 +0530
ath9k: Fix sequence numbers for PAE frames
After a lot of testing, I'm able to reliably trigger a driver crash on
rekeying with current versions with this change in place.
It seems that the driver does not support sending out regular MPDUs with
the same TID while an A-MPDU session is active.
This leads to duplicate entries in the TID Tx buffer, which hits the
following BUG_ON in ath_tx_addto_baw():
index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno);
cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
BUG_ON(tid->tx_buf[cindex] != NULL);
I believe until we actually have a reproducible case of an
incompatibility with another AP using no PAE special cases, we should
simply get rid of this mess.
This patch completely fixes my crash issues in STA mode and makes it
stay connected without throughput drops or connectivity issues even
when the AP is configured to a very short group rekey interval.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/xmit.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1353,25 +1353,6 @@ static enum ath9k_pkt_type get_hw_packet
return htype;
}
-static bool is_pae(struct sk_buff *skb)
-{
- struct ieee80211_hdr *hdr;
- __le16 fc;
-
- hdr = (struct ieee80211_hdr *)skb->data;
- fc = hdr->frame_control;
-
- if (ieee80211_is_data(fc)) {
- if (ieee80211_is_nullfunc(fc) ||
- /* Port Access Entity (IEEE 802.1X) */
- (skb->protocol == cpu_to_be16(ETH_P_PAE))) {
- return true;
- }
- }
-
- return false;
-}
-
static int get_hw_crypto_keytype(struct sk_buff *skb)
{
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -1701,7 +1682,7 @@ static void ath_tx_start_dma(struct ath_
goto tx_done;
}
- if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) {
+ if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
/*
* Try aggregation if it's a unicast data frame
* and the destination is HT capable.
^ permalink raw reply [flat|nested] 432+ messages in thread
* [093/156] cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (91 preceding siblings ...)
2010-03-30 22:42 ` [092/156] ath9k: fix BUG_ON triggered by PAE frames Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [094/156] nilfs2: fix hang-up of cleaner after log writer returned with error Greg KH
` (62 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Miao Xie, David Rientjes,
Paul Menage, Li Zefan, Ingo Molnar, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Miao Xie <miaox@cn.fujitsu.com>
commit 5ab116c9349ef52d6fbd2e2917a53f13194b048e upstream.
cpuset_mem_spread_node() returns an offline node, and causes an oops.
This patch fixes it by initializing task->mems_allowed to
node_states[N_HIGH_MEMORY], and updating task->mems_allowed when doing
memory hotplug.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Reported-by: Nick Piggin <npiggin@suse.de>
Tested-by: Nick Piggin <npiggin@suse.de>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>
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>
---
init/main.c | 2 +-
kernel/cpuset.c | 20 ++++++++++++--------
kernel/kthread.c | 2 +-
3 files changed, 14 insertions(+), 10 deletions(-)
--- a/init/main.c
+++ b/init/main.c
@@ -846,7 +846,7 @@ static int __init kernel_init(void * unu
/*
* init can allocate pages on any node
*/
- set_mems_allowed(node_possible_map);
+ set_mems_allowed(node_states[N_HIGH_MEMORY]);
/*
* init can run on any cpu.
*/
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -920,9 +920,6 @@ static int update_cpumask(struct cpuset
* call to guarantee_online_mems(), as we know no one is changing
* our task's cpuset.
*
- * Hold callback_mutex around the two modifications of our tasks
- * mems_allowed to synchronize with cpuset_mems_allowed().
- *
* While the mm_struct we are migrating is typically from some
* other task, the task_struct mems_allowed that we are hacking
* is for our current task, which must allocate new pages for that
@@ -1391,11 +1388,10 @@ static void cpuset_attach(struct cgroup_
if (cs == &top_cpuset) {
cpumask_copy(cpus_attach, cpu_possible_mask);
- to = node_possible_map;
} else {
guarantee_online_cpus(cs, cpus_attach);
- guarantee_online_mems(cs, &to);
}
+ guarantee_online_mems(cs, &to);
/* do per-task migration stuff possibly for each in the threadgroup */
cpuset_attach_task(tsk, &to, cs);
@@ -2090,15 +2086,23 @@ static int cpuset_track_online_cpus(stru
static int cpuset_track_online_nodes(struct notifier_block *self,
unsigned long action, void *arg)
{
+ nodemask_t oldmems;
+
cgroup_lock();
switch (action) {
case MEM_ONLINE:
- case MEM_OFFLINE:
+ oldmems = top_cpuset.mems_allowed;
mutex_lock(&callback_mutex);
top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
mutex_unlock(&callback_mutex);
- if (action == MEM_OFFLINE)
- scan_for_empty_cpusets(&top_cpuset);
+ update_tasks_nodemask(&top_cpuset, &oldmems, NULL);
+ break;
+ case MEM_OFFLINE:
+ /*
+ * needn't update top_cpuset.mems_allowed explicitly because
+ * scan_for_empty_cpusets() will update it.
+ */
+ scan_for_empty_cpusets(&top_cpuset);
break;
default:
break;
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -219,7 +219,7 @@ int kthreadd(void *unused)
set_task_comm(tsk, "kthreadd");
ignore_signals(tsk);
set_cpus_allowed_ptr(tsk, cpu_all_mask);
- set_mems_allowed(node_possible_map);
+ set_mems_allowed(node_states[N_HIGH_MEMORY]);
current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [094/156] nilfs2: fix hang-up of cleaner after log writer returned with error
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (92 preceding siblings ...)
2010-03-30 22:42 ` [093/156] cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [095/156] genirq: Prevent oneshot irq thread race Greg KH
` (61 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ryusuke Konishi,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
commit 110d735a0ae69bdd11af9acb6ea3b979137eb118 upstream.
According to the report from Andreas Beckmann (Message-ID:
<4BA54677.3090902@abeckmann.de>), nilfs in 2.6.33 kernel got stuck
after a disk full error.
This turned out to be a regression by log writer updates merged at
kernel 2.6.33. nilfs_segctor_abort_construction, which is a cleanup
function for erroneous cases, was skipping writeback completion for
some logs.
This fixes the bug and would resolve the hang issue.
Reported-by: Andreas Beckmann <debian@abeckmann.de>
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/segment.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -1902,8 +1902,7 @@ static void nilfs_segctor_abort_construc
list_splice_tail_init(&sci->sc_write_logs, &logs);
ret = nilfs_wait_on_logs(&logs);
- if (ret)
- nilfs_abort_logs(&logs, NULL, sci->sc_super_root, ret);
+ nilfs_abort_logs(&logs, NULL, sci->sc_super_root, ret ? : err);
list_splice_tail_init(&sci->sc_segbufs, &logs);
nilfs_cancel_segusage(&logs, nilfs->ns_sufile);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [095/156] genirq: Prevent oneshot irq thread race
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (93 preceding siblings ...)
2010-03-30 22:42 ` [094/156] nilfs2: fix hang-up of cleaner after log writer returned with error Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [096/156] softlockup: Stop spurious softlockup messages due to overflow Greg KH
` (60 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas Gleixner,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
commit 0b1adaa031a55e44f5dd942f234bf09d28e8a0d6 upstream.
Lars-Peter pointed out that the oneshot threaded interrupt handler
code has the following race:
CPU0 CPU1
hande_level_irq(irq X)
mask_ack_irq(irq X)
handle_IRQ_event(irq X)
wake_up(thread_handler)
thread handler(irq X) runs
finalize_oneshot(irq X)
does not unmask due to
!(desc->status & IRQ_MASKED)
return from irq
does not unmask due to
(desc->status & IRQ_ONESHOT)
This leaves the interrupt line masked forever.
The reason for this is the inconsistent handling of the IRQ_MASKED
flag. Instead of setting it in the mask function the oneshot support
sets the flag after waking up the irq thread.
The solution for this is to set/clear the IRQ_MASKED status whenever
we mask/unmask an interrupt line. That's the easy part, but that
cleanup opens another race:
CPU0 CPU1
hande_level_irq(irq)
mask_ack_irq(irq)
handle_IRQ_event(irq)
wake_up(thread_handler)
thread handler(irq) runs
finalize_oneshot_irq(irq)
unmask(irq)
irq triggers again
handle_level_irq(irq)
mask_ack_irq(irq)
return from irq due to IRQ_INPROGRESS
return from irq
does not unmask due to
(desc->status & IRQ_ONESHOT)
This requires that we synchronize finalize_oneshot_irq() with the
primary handler. If IRQ_INPROGESS is set we wait until the primary
handler on the other CPU has returned before unmasking the interrupt
line again.
We probably have never seen that problem because it does not happen on
UP and on SMP the irqbalancer protects us by pinning the primary
handler and the thread to the same CPU.
Reported-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -359,6 +359,23 @@ static inline void mask_ack_irq(struct irq_desc *desc, int irq)
if (desc->chip->ack)
desc->chip->ack(irq);
}
+ desc->status |= IRQ_MASKED;
+}
+
+static inline void mask_irq(struct irq_desc *desc, int irq)
+{
+ if (desc->chip->mask) {
+ desc->chip->mask(irq);
+ desc->status |= IRQ_MASKED;
+ }
+}
+
+static inline void unmask_irq(struct irq_desc *desc, int irq)
+{
+ if (desc->chip->unmask) {
+ desc->chip->unmask(irq);
+ desc->status &= ~IRQ_MASKED;
+ }
}
/*
@@ -484,10 +501,8 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc)
raw_spin_lock(&desc->lock);
desc->status &= ~IRQ_INPROGRESS;
- if (unlikely(desc->status & IRQ_ONESHOT))
- desc->status |= IRQ_MASKED;
- else if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
- desc->chip->unmask(irq);
+ if (!(desc->status & (IRQ_DISABLED | IRQ_ONESHOT)))
+ unmask_irq(desc, irq);
out_unlock:
raw_spin_unlock(&desc->lock);
}
@@ -524,8 +539,7 @@ handle_fasteoi_irq(unsigned int irq, struct irq_desc *desc)
action = desc->action;
if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
desc->status |= IRQ_PENDING;
- if (desc->chip->mask)
- desc->chip->mask(irq);
+ mask_irq(desc, irq);
goto out;
}
@@ -593,7 +607,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
irqreturn_t action_ret;
if (unlikely(!action)) {
- desc->chip->mask(irq);
+ mask_irq(desc, irq);
goto out_unlock;
}
@@ -605,8 +619,7 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
if (unlikely((desc->status &
(IRQ_PENDING | IRQ_MASKED | IRQ_DISABLED)) ==
(IRQ_PENDING | IRQ_MASKED))) {
- desc->chip->unmask(irq);
- desc->status &= ~IRQ_MASKED;
+ unmask_irq(desc, irq);
}
desc->status &= ~IRQ_PENDING;
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c
index eb6078c..69a3d7b 100644
--- a/kernel/irq/manage.c
+++ b/kernel/irq/manage.c
@@ -483,8 +483,26 @@ static int irq_wait_for_interrupt(struct irqaction *action)
*/
static void irq_finalize_oneshot(unsigned int irq, struct irq_desc *desc)
{
+again:
chip_bus_lock(irq, desc);
raw_spin_lock_irq(&desc->lock);
+
+ /*
+ * Implausible though it may be we need to protect us against
+ * the following scenario:
+ *
+ * The thread is faster done than the hard interrupt handler
+ * on the other CPU. If we unmask the irq line then the
+ * interrupt can come in again and masks the line, leaves due
+ * to IRQ_INPROGRESS and the irq line is masked forever.
+ */
+ if (unlikely(desc->status & IRQ_INPROGRESS)) {
+ raw_spin_unlock_irq(&desc->lock);
+ chip_bus_sync_unlock(irq, desc);
+ cpu_relax();
+ goto again;
+ }
+
if (!(desc->status & IRQ_DISABLED) && (desc->status & IRQ_MASKED)) {
desc->status &= ~IRQ_MASKED;
desc->chip->unmask(irq);
^ permalink raw reply related [flat|nested] 432+ messages in thread
* [096/156] softlockup: Stop spurious softlockup messages due to overflow
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (94 preceding siblings ...)
2010-03-30 22:42 ` [095/156] genirq: Prevent oneshot irq thread race Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [097/156] drm/i915: fix small leak on overlay error path Greg KH
` (59 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Colin Ian King,
Peter Zijlstra, Eric Dumazet, Ingo Molnar, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Colin Ian King <colin.king@canonical.com>
commit 8c2eb4805d422bdbf60ba00ff233c794d23c3c00 upstream.
Ensure additions on touch_ts do not overflow. This can occur
when the top 32 bits of the TSC reach 0xffffffff causing
additions to touch_ts to overflow and this in turn generates
spurious softlockup warnings.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <1268994482.1798.6.camel@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/softlockup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -155,11 +155,11 @@ void softlockup_tick(void)
* Wake up the high-prio watchdog task twice per
* threshold timespan.
*/
- if (now > touch_ts + softlockup_thresh/2)
+ if (time_after(now - softlockup_thresh/2, touch_ts))
wake_up_process(per_cpu(softlockup_watchdog, this_cpu));
/* Warn about unreasonable delays: */
- if (now <= (touch_ts + softlockup_thresh))
+ if (time_before_eq(now - softlockup_thresh, touch_ts))
return;
per_cpu(softlockup_print_ts, this_cpu) = touch_ts;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [097/156] drm/i915: fix small leak on overlay error path
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (95 preceding siblings ...)
2010-03-30 22:42 ` [096/156] softlockup: Stop spurious softlockup messages due to overflow Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [098/156] drm/i915: Avoid NULL deref in get_pages() unwind after error Greg KH
` (58 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dan Carpenter, Eric Anholt,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dan Carpenter <error27@gmail.com>
commit 915a428e43acfd05e4ffeaf40549b0cf163eebe2 upstream.
We should free "params" before returning.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/intel_overlay.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/drivers/gpu/drm/i915/intel_overlay.c
+++ b/drivers/gpu/drm/i915/intel_overlay.c
@@ -1083,14 +1083,18 @@ int intel_overlay_put_image(struct drm_d
drmmode_obj = drm_mode_object_find(dev, put_image_rec->crtc_id,
DRM_MODE_OBJECT_CRTC);
- if (!drmmode_obj)
- return -ENOENT;
+ if (!drmmode_obj) {
+ ret = -ENOENT;
+ goto out_free;
+ }
crtc = to_intel_crtc(obj_to_crtc(drmmode_obj));
new_bo = drm_gem_object_lookup(dev, file_priv,
put_image_rec->bo_handle);
- if (!new_bo)
- return -ENOENT;
+ if (!new_bo) {
+ ret = -ENOENT;
+ goto out_free;
+ }
mutex_lock(&dev->mode_config.mutex);
mutex_lock(&dev->struct_mutex);
@@ -1180,6 +1184,7 @@ out_unlock:
mutex_unlock(&dev->struct_mutex);
mutex_unlock(&dev->mode_config.mutex);
drm_gem_object_unreference(new_bo);
+out_free:
kfree(params);
return ret;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [098/156] drm/i915: Avoid NULL deref in get_pages() unwind after error.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (96 preceding siblings ...)
2010-03-30 22:42 ` [097/156] drm/i915: fix small leak on overlay error path Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [099/156] drm/nouveau: report unknown connector state if lid closed Greg KH
` (57 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Chris Wilson, Eric Anholt,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Chris Wilson <chris@chris-wilson.co.uk>
commit 1f2b10131f83f7caa67bf1273cec126b4283015d upstream.
Fixes:
http://bugzilla.kernel.org/show_bug.cgi?id=15527
NULL pointer dereference in i915_gem_object_save_bit_17_swizzle
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<f82b5d2b>] i915_gem_object_save_bit_17_swizzle+0x5b/0xc0 [i915]
Call Trace:
[<f82aea55>] ? i915_gem_object_put_pages+0x125/0x150 [i915]
[<f82aeb71>] ? i915_gem_object_get_pages+0xf1/0x110 [i915]
[<f82b0de8>] ? i915_gem_object_bind_to_gtt+0xb8/0x2a0 [i915]
[<c02db74d>] ? drm_mm_get_block_generic+0x4d/0x180
[<f82b11cd>] ? i915_gem_mmap_gtt_ioctl+0x16d/0x240 [i915]
[<f82ae786>] ? i915_gem_madvise_ioctl+0x86/0x120 [i915]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: maciej.rutecki@gmail.com
Cc: stable@kernel.org
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/i915_gem.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1470,9 +1470,6 @@ i915_gem_object_put_pages(struct drm_gem
obj_priv->dirty = 0;
for (i = 0; i < page_count; i++) {
- if (obj_priv->pages[i] == NULL)
- break;
-
if (obj_priv->dirty)
set_page_dirty(obj_priv->pages[i]);
@@ -2228,7 +2225,6 @@ i915_gem_object_get_pages(struct drm_gem
struct address_space *mapping;
struct inode *inode;
struct page *page;
- int ret;
if (obj_priv->pages_refcount++ != 0)
return 0;
@@ -2251,11 +2247,9 @@ i915_gem_object_get_pages(struct drm_gem
mapping_gfp_mask (mapping) |
__GFP_COLD |
gfpmask);
- if (IS_ERR(page)) {
- ret = PTR_ERR(page);
- i915_gem_object_put_pages(obj);
- return ret;
- }
+ if (IS_ERR(page))
+ goto err_pages;
+
obj_priv->pages[i] = page;
}
@@ -2263,6 +2257,15 @@ i915_gem_object_get_pages(struct drm_gem
i915_gem_object_do_bit_17_swizzle(obj);
return 0;
+
+err_pages:
+ while (i--)
+ page_cache_release(obj_priv->pages[i]);
+
+ drm_free_large(obj_priv->pages);
+ obj_priv->pages = NULL;
+ obj_priv->pages_refcount--;
+ return PTR_ERR(page);
}
static void i965_write_fence_reg(struct drm_i915_fence_reg *reg)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [099/156] drm/nouveau: report unknown connector state if lid closed
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (97 preceding siblings ...)
2010-03-30 22:42 ` [098/156] drm/i915: Avoid NULL deref in get_pages() unwind after error Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [100/156] netfilter: xt_recent: fix regression in rules using a zero hit_count Greg KH
` (56 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ben Skeggs,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ben Skeggs <bskeggs@redhat.com>
commit b30083bdb990bcc2829fce83d871a86059ff4fc1 upstream.
This is in preference to disconnected. If there's no other outputs
connected this will cause LVDS to be programmed even with the lid
closed rather than having X fail to start because of no available
outputs.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/nouveau/nouveau_connector.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -239,12 +239,14 @@ nouveau_connector_detect(struct drm_conn
if (connector->connector_type == DRM_MODE_CONNECTOR_LVDS)
nv_encoder = find_encoder_by_type(connector, OUTPUT_LVDS);
if (nv_encoder && nv_connector->native_mode) {
+ unsigned status = connector_status_connected;
+
#ifdef CONFIG_ACPI
if (!nouveau_ignorelid && !acpi_lid_open())
- return connector_status_disconnected;
+ status = connector_status_unknown;
#endif
nouveau_connector_set_encoder(connector, nv_encoder);
- return connector_status_connected;
+ return status;
}
/* Cleanup the previous EDID block. */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [100/156] netfilter: xt_recent: fix regression in rules using a zero hit_count
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (98 preceding siblings ...)
2010-03-30 22:42 ` [099/156] drm/nouveau: report unknown connector state if lid closed Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [101/156] x86: Fix placement of FIX_OHCI1394_BASE Greg KH
` (55 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Patrick McHardy,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Patrick McHardy <kaber@trash.net>
commit ef1691504c83ba3eb636c0cfd3ed33f7a6d0b4ee upstream.
Commit 8ccb92ad (netfilter: xt_recent: fix false match) fixed supposedly
false matches in rules using a zero hit_count. As it turns out there is
nothing false about these matches and people are actually using entries
with a hit_count of zero to make rules dependant on addresses inserted
manually through /proc.
Since this slipped past the eyes of three reviewers, instead of
reverting the commit in question, this patch explicitly checks
for a hit_count of zero to make the intentions more clear.
Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Tested-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/netfilter/xt_recent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/netfilter/xt_recent.c
+++ b/net/netfilter/xt_recent.c
@@ -260,7 +260,7 @@ recent_mt(const struct sk_buff *skb, con
for (i = 0; i < e->nstamps; i++) {
if (info->seconds && time_after(time, e->stamps[i]))
continue;
- if (info->hit_count && ++hits >= info->hit_count) {
+ if (!info->hit_count || ++hits >= info->hit_count) {
ret = !ret;
break;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [101/156] x86: Fix placement of FIX_OHCI1394_BASE
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (99 preceding siblings ...)
2010-03-30 22:42 ` [100/156] netfilter: xt_recent: fix regression in rules using a zero hit_count Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [102/156] x86, amd: Restrict usage of c1e_idle() Greg KH
` (54 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jan Beulich, Ingo Molnar,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Beulich <JBeulich@novell.com>
commit ff30a0543e9a6cd732582063e7cae951cdb7acf2 upstream.
Ever for 32-bit with sufficiently high NR_CPUS, and starting
with commit 789d03f584484af85dbdc64935270c8e45f36ef7 also for
64-bit, the statically allocated early fixmap page tables were
not covering FIX_OHCI1394_BASE, leading to a boot time crash
when "ohci1394_dma=early" was used. Despite this entry not being
a permanently used one, it needs to be moved into the permanent
range since it has to be close to FIX_DBGP_BASE and
FIX_EARLYCON_MEM_BASE.
Reported-bisected-and-tested-by: Justin P. Mattock <justinmattock@gmail.com>
Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=14487
Signed-off-by: Jan Beulich <jbeulich@novell.com>
LKML-Reference: <4B9E15D30200007800034D23@vpn.id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/include/asm/fixmap.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -82,6 +82,9 @@ enum fixed_addresses {
#endif
FIX_DBGP_BASE,
FIX_EARLYCON_MEM_BASE,
+#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
+ FIX_OHCI1394_BASE,
+#endif
#ifdef CONFIG_X86_LOCAL_APIC
FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */
#endif
@@ -126,9 +129,6 @@ enum fixed_addresses {
FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 -
(__end_of_permanent_fixed_addresses & 255),
FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1,
-#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
- FIX_OHCI1394_BASE,
-#endif
#ifdef CONFIG_X86_32
FIX_WP_TEST,
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [102/156] x86, amd: Restrict usage of c1e_idle()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (100 preceding siblings ...)
2010-03-30 22:42 ` [101/156] x86: Fix placement of FIX_OHCI1394_BASE Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [103/156] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
` (53 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andreas Herrmann,
H. Peter Anvin, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andreas Herrmann <andreas.herrmann3@amd.com>
commit 035a02c1e1de31888e8b6adac0ff667971ac04db upstream.
Currently c1e_idle returns true for all CPUs greater than or equal to
family 0xf model 0x40. This covers too many CPUs.
Meanwhile a respective erratum for the underlying problem was filed
(#400). This patch adds the logic to check whether erratum #400
applies to a given CPU.
Especially for CPUs where SMI/HW triggered C1e is not supported,
c1e_idle() doesn't need to be used. We can check this by looking at
the respective OSVW bit for erratum #400.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20100319110922.GA19614@alberich.amd.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/include/asm/msr-index.h | 2 ++
arch/x86/kernel/process.c | 32 ++++++++++++++++++++++++--------
2 files changed, 26 insertions(+), 8 deletions(-)
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -105,6 +105,8 @@
#define MSR_AMD64_PATCH_LEVEL 0x0000008b
#define MSR_AMD64_NB_CFG 0xc001001f
#define MSR_AMD64_PATCH_LOADER 0xc0010020
+#define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140
+#define MSR_AMD64_OSVW_STATUS 0xc0010141
#define MSR_AMD64_IBSFETCHCTL 0xc0011030
#define MSR_AMD64_IBSFETCHLINAD 0xc0011031
#define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -519,21 +519,37 @@ static int __cpuinit mwait_usable(const
}
/*
- * Check for AMD CPUs, which have potentially C1E support
+ * Check for AMD CPUs, where APIC timer interrupt does not wake up CPU from C1e.
+ * For more information see
+ * - Erratum #400 for NPT family 0xf and family 0x10 CPUs
+ * - Erratum #365 for family 0x11 (not affected because C1e not in use)
*/
static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c)
{
+ u64 val;
if (c->x86_vendor != X86_VENDOR_AMD)
- return 0;
-
- if (c->x86 < 0x0F)
- return 0;
+ goto no_c1e_idle;
/* Family 0x0f models < rev F do not have C1E */
- if (c->x86 == 0x0f && c->x86_model < 0x40)
- return 0;
+ if (c->x86 == 0x0F && c->x86_model >= 0x40)
+ return 1;
+
+ if (c->x86 == 0x10) {
+ /*
+ * check OSVW bit for CPUs that are not affected
+ * by erratum #400
+ */
+ rdmsrl(MSR_AMD64_OSVW_ID_LENGTH, val);
+ if (val >= 2) {
+ rdmsrl(MSR_AMD64_OSVW_STATUS, val);
+ if (!(val & BIT(1)))
+ goto no_c1e_idle;
+ }
+ return 1;
+ }
- return 1;
+no_c1e_idle:
+ return 0;
}
static cpumask_var_t c1e_mask;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [103/156] hwmon: (coretemp) Add missing newline to dev_warn() message
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (101 preceding siblings ...)
2010-03-30 22:42 ` [102/156] x86, amd: Restrict usage of c1e_idle() Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [104/156] ALSA: hda: Use LPIB for ga-ma770-ud3 board Greg KH
` (52 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jean Delvare,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit 4d7a5644e4adfafe76c2bd8ee168e3f3b5dae3a8 upstream.
Add missing newline to dev_warn() message string. This is more of an issue
with older kernels that don't automatically add a newline if it was missing
from the end of the previous line.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/coretemp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -228,7 +228,7 @@ static int __devinit adjust_tjmax(struct
if (err) {
dev_warn(dev,
"Unable to access MSR 0xEE, for Tjmax, left"
- " at default");
+ " at default\n");
} else if (eax & 0x40000000) {
tjmax = tjmax_ee;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [104/156] ALSA: hda: Use LPIB for ga-ma770-ud3 board
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (102 preceding siblings ...)
2010-03-30 22:42 ` [103/156] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [105/156] ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist Greg KH
` (51 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit 9ec8ddad59fadd8021adfea4cb716a49b0e232e9 upstream.
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575669
The OR states that position_fix=1 is necessary to work around glitching
during volume adjustments using PulseAudio.
Reported-by: Carlos Laviola <claviola@debian.org>
Tested-by: Carlos Laviola <claviola@debian.org>
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/hda/hda_intel.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2265,6 +2265,7 @@ static struct snd_pci_quirk position_fix
SND_PCI_QUIRK(0x103c, 0x306d, "HP dv3", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
+ SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB),
SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB),
^ permalink raw reply [flat|nested] 432+ messages in thread
* [105/156] ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (103 preceding siblings ...)
2010-03-30 22:42 ` [104/156] ALSA: hda: Use LPIB for ga-ma770-ud3 board Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [106/156] ALSA: ac97: Add IBM ThinkPad R40e to Headphone/Line Jack Sense blacklist Greg KH
` (50 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Chen <seven.steps@gmail.com>
commit 5cd165e7057020884e430941c24454d3df9a799d upstream.
BugLink: https://launchpad.net/bugs/481058
The OR has verified that both 'Headphone Jack Sense' and 'Line Jack Sense'
need to be muted for sound to be audible, so just add the machine's SSID
to the ac97 jack sense blacklist.
Reported-by: Richard Gagne
Tested-by: Richard Gagne
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/ac97/ac97_patch.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1873,6 +1873,7 @@ static unsigned int ad1981_jacks_blackli
0x10280160, /* Dell Dimension 2400 */
0x104380b0, /* Asus A7V8X-MX */
0x11790241, /* Toshiba Satellite A-15 S127 */
+ 0x1179ff10, /* Toshiba P500 */
0x144dc01a, /* Samsung NP-X20C004/SEG */
0 /* end */
};
^ permalink raw reply [flat|nested] 432+ messages in thread
* [106/156] ALSA: ac97: Add IBM ThinkPad R40e to Headphone/Line Jack Sense blacklist
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (104 preceding siblings ...)
2010-03-30 22:42 ` [105/156] ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [107/156] ath9k: Enable TIM timer interrupt only when needed Greg KH
` (49 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit e1f7f02b45cf33a774d56e505ce1718af9392f5e upstream.
BugLink: https://launchpad.net/bugs/303789
This model needs both 'Headphone Jack Sense' and 'Line Jack Sense'
muted for audible audio, so just add its SSID to the blacklist and
don't enumerate the controls.
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/ac97/ac97_patch.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1867,6 +1867,7 @@ static unsigned int ad1981_jacks_blackli
0x10140523, /* Thinkpad R40 */
0x10140534, /* Thinkpad X31 */
0x10140537, /* Thinkpad T41p */
+ 0x1014053e, /* Thinkpad R40e */
0x10140554, /* Thinkpad T42p/R50p */
0x10140567, /* Thinkpad T43p 2668-G7U */
0x10140581, /* Thinkpad X41-2527 */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [107/156] ath9k: Enable TIM timer interrupt only when needed.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (105 preceding siblings ...)
2010-03-30 22:42 ` [106/156] ALSA: ac97: Add IBM ThinkPad R40e to Headphone/Line Jack Sense blacklist Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [108/156] ath9k: configure the beacon only if the STA is associated Greg KH
` (48 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Senthil Balasubramanian,
John W. Linville, Luis R. Rodriguez, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Senthil Balasubramanian <senthilkumar@atheros.com>
commit 3f7c5c10e9dc6bf90179eb9f7c06151d508fb324 upstream.
The TIM timer interrupt is enabled even before the ACK of nullqos
is received which is unnecessary.
Also clean up the CONF_PS part of config callback properly for
better readability.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/ath9k.h | 1 +
drivers/net/wireless/ath/ath9k/main.c | 24 ++++++++++++++----------
drivers/net/wireless/ath/ath9k/xmit.c | 7 +++----
3 files changed, 18 insertions(+), 14 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -267,6 +267,7 @@ void ath_tx_aggr_start(struct ath_softc
u16 tid, u16 *ssn);
void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
+void ath9k_enable_ps(struct ath_softc *sc);
/********/
/* VIFs */
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2681,6 +2681,19 @@ static void ath9k_remove_interface(struc
mutex_unlock(&sc->mutex);
}
+void ath9k_enable_ps(struct ath_softc *sc)
+{
+ sc->ps_enabled = true;
+ if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) {
+ if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
+ sc->imask |= ATH9K_INT_TIM_TIMER;
+ ath9k_hw_set_interrupts(sc->sc_ah,
+ sc->imask);
+ }
+ }
+ ath9k_hw_setrxabort(sc->sc_ah, 1);
+}
+
static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
{
struct ath_wiphy *aphy = hw->priv;
@@ -2734,22 +2747,13 @@ static int ath9k_config(struct ieee80211
if (changed & IEEE80211_CONF_CHANGE_PS) {
if (conf->flags & IEEE80211_CONF_PS) {
sc->sc_flags |= SC_OP_PS_ENABLED;
- if (!(ah->caps.hw_caps &
- ATH9K_HW_CAP_AUTOSLEEP)) {
- if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
- sc->imask |= ATH9K_INT_TIM_TIMER;
- ath9k_hw_set_interrupts(sc->sc_ah,
- sc->imask);
- }
- }
/*
* At this point we know hardware has received an ACK
* of a previously sent null data frame.
*/
if ((sc->sc_flags & SC_OP_NULLFUNC_COMPLETED)) {
sc->sc_flags &= ~SC_OP_NULLFUNC_COMPLETED;
- sc->ps_enabled = true;
- ath9k_hw_setrxabort(sc->sc_ah, 1);
+ ath9k_enable_ps(sc);
}
} else {
sc->ps_enabled = false;
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2034,10 +2034,9 @@ static void ath_tx_processq(struct ath_s
*/
if (bf->bf_isnullfunc &&
(ds->ds_txstat.ts_status & ATH9K_TX_ACKED)) {
- if ((sc->sc_flags & SC_OP_PS_ENABLED)) {
- sc->ps_enabled = true;
- ath9k_hw_setrxabort(sc->sc_ah, 1);
- } else
+ if ((sc->sc_flags & SC_OP_PS_ENABLED))
+ ath9k_enable_ps(sc);
+ else
sc->sc_flags |= SC_OP_NULLFUNC_COMPLETED;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [108/156] ath9k: configure the beacon only if the STA is associated
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (106 preceding siblings ...)
2010-03-30 22:42 ` [107/156] ath9k: Enable TIM timer interrupt only when needed Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [109/156] mac80211: Retry null data frame for power save Greg KH
` (47 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Senthil Balasubramanian,
John W. Linville, Luis R. Rodriguez, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Senthil Balasubramanian <senthilkumar@atheros.com>
commit 1a20034a73a40b8056731f9db0c535cec2961eb7 upstream.
beacons configuration SHOULD be done only if the STA is associated.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/beacon.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -573,6 +573,13 @@ static void ath_beacon_config_sta(struct
u64 tsf;
int num_beacons, offset, dtim_dec_count, cfp_dec_count;
+ /* No need to configure beacon if we are not associated */
+ if (!common->curaid) {
+ ath_print(common, ATH_DBG_BEACON,
+ "STA is not yet associated..skipping beacon config\n");
+ return;
+ }
+
memset(&bs, 0, sizeof(bs));
intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [109/156] mac80211: Retry null data frame for power save
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (107 preceding siblings ...)
2010-03-30 22:42 ` [108/156] ath9k: configure the beacon only if the STA is associated Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [110/156] ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k Greg KH
` (46 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Johannes Berg,
Vivek Natarajan, John W. Linville, Luis R. Rodriguez,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Vivek Natarajan <vnatarajan@atheros.com>
commit 375177bf35efc08e1bd37bbda4cc0c8cc4db8500 upstream.
Even if the null data frame is not acked by the AP, mac80211
goes into power save. This might lead to loss of frames
from the AP.
Prevent this by restarting dynamic_ps_timer when ack is not
received for null data frames.
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/net/mac80211.h | 4 ++++
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/mlme.c | 20 +++++++++++++++-----
net/mac80211/status.c | 17 +++++++++++++++--
4 files changed, 35 insertions(+), 7 deletions(-)
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -926,6 +926,9 @@ enum ieee80211_tkip_key_type {
* @IEEE80211_HW_BEACON_FILTER:
* Hardware supports dropping of irrelevant beacon frames to
* avoid waking up cpu.
+ * @IEEE80211_HW_REPORTS_TX_ACK_STATUS:
+ * Hardware can provide ack status reports of Tx frames to
+ * the stack.
*/
enum ieee80211_hw_flags {
IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,
@@ -943,6 +946,7 @@ enum ieee80211_hw_flags {
IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12,
IEEE80211_HW_MFP_CAPABLE = 1<<13,
IEEE80211_HW_BEACON_FILTER = 1<<14,
+ IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<15,
};
/**
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -264,6 +264,7 @@ enum ieee80211_sta_flags {
IEEE80211_STA_DISABLE_11N = BIT(4),
IEEE80211_STA_CSA_RECEIVED = BIT(5),
IEEE80211_STA_MFP_ENABLED = BIT(6),
+ IEEE80211_STA_NULLFUNC_ACKED = BIT(7),
};
/* flags for MLME request */
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -662,8 +662,11 @@ static void ieee80211_enable_ps(struct i
} else {
if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
ieee80211_send_nullfunc(local, sdata, 1);
- conf->flags |= IEEE80211_CONF_PS;
- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+
+ if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) {
+ conf->flags |= IEEE80211_CONF_PS;
+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+ }
}
}
@@ -754,6 +757,7 @@ void ieee80211_dynamic_ps_enable_work(st
container_of(work, struct ieee80211_local,
dynamic_ps_enable_work);
struct ieee80211_sub_if_data *sdata = local->ps_sdata;
+ struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
/* can only happen when PS was just disabled anyway */
if (!sdata)
@@ -762,11 +766,16 @@ void ieee80211_dynamic_ps_enable_work(st
if (local->hw.conf.flags & IEEE80211_CONF_PS)
return;
- if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
+ if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) &&
+ (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)))
ieee80211_send_nullfunc(local, sdata, 1);
- local->hw.conf.flags |= IEEE80211_CONF_PS;
- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+ if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) ||
+ (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) {
+ ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
+ local->hw.conf.flags |= IEEE80211_CONF_PS;
+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+ }
}
void ieee80211_dynamic_ps_timer(unsigned long data)
@@ -2468,6 +2477,7 @@ int ieee80211_mgd_assoc(struct ieee80211
list_add(&wk->list, &ifmgd->work_list);
ifmgd->flags &= ~IEEE80211_STA_DISABLE_11N;
+ ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
for (i = 0; i < req->crypto.n_ciphers_pairwise; i++)
if (req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP40 ||
--- a/net/mac80211/status.c
+++ b/net/mac80211/status.c
@@ -165,6 +165,7 @@ void ieee80211_tx_status(struct ieee8021
rcu_read_lock();
sband = local->hw.wiphy->bands[info->band];
+ fc = hdr->frame_control;
sta = sta_info_get(local, hdr->addr1);
@@ -180,8 +181,6 @@ void ieee80211_tx_status(struct ieee8021
return;
}
- fc = hdr->frame_control;
-
if ((info->flags & IEEE80211_TX_STAT_AMPDU_NO_BACK) &&
(ieee80211_is_data_qos(fc))) {
u16 tid, ssn;
@@ -246,6 +245,20 @@ void ieee80211_tx_status(struct ieee8021
local->dot11FailedCount++;
}
+ if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc) &&
+ (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) &&
+ !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
+ local->ps_sdata && !(local->scanning)) {
+ if (info->flags & IEEE80211_TX_STAT_ACK) {
+ local->ps_sdata->u.mgd.flags |=
+ IEEE80211_STA_NULLFUNC_ACKED;
+ ieee80211_queue_work(&local->hw,
+ &local->dynamic_ps_enable_work);
+ } else
+ mod_timer(&local->dynamic_ps_timer, jiffies +
+ msecs_to_jiffies(10));
+ }
+
/* this was a transmitted frame, but now we want to reuse it */
skb_orphan(skb);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [110/156] ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (108 preceding siblings ...)
2010-03-30 22:42 ` [109/156] mac80211: Retry null data frame for power save Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [111/156] leds-gpio: fix default state handling on OF platforms Greg KH
` (45 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Vivek Natarajan,
John W. Linville, Luis R. Rodriguez, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Vivek Natarajan <vnatarajan@atheros.com>
commit 05df49865be08b30e7ba91b9d3d94d7d52dd3033 upstream.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/main.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1856,6 +1856,7 @@ void ath_set_hw_capab(struct ath_softc *
IEEE80211_HW_SIGNAL_DBM |
IEEE80211_HW_SUPPORTS_PS |
IEEE80211_HW_PS_NULLFUNC_STACK |
+ IEEE80211_HW_REPORTS_TX_ACK_STATUS |
IEEE80211_HW_SPECTRUM_MGMT;
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [111/156] leds-gpio: fix default state handling on OF platforms
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (109 preceding siblings ...)
2010-03-30 22:42 ` [110/156] ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [112/156] icside: bring back ->maskproc method Greg KH
` (44 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Anton Vorontsov,
Richard Purdie, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Anton Vorontsov <avorontsov@ru.mvista.com>
commit 0493a4ff10959ff4c8e0d65efee25b7ffd4fa5db upstream.
The driver wrongly sets default state for LEDs that don't specify
default-state property.
Currently the driver handles default state this way:
memset(&led, 0, sizeof(led));
for_each_child_of_node(np, child) {
state = of_get_property(child, "default-state", NULL);
if (state) {
if (!strcmp(state, "keep"))
led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
...
}
ret = create_gpio_led(&led, ...);
}
Which means that all LEDs that do not specify default-state will inherit
the last value of the default-state property, which is wrong.
This patch fixes the issue by moving LED's template initialization into
the loop body.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/leds/leds-gpio.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -211,7 +211,6 @@ static int __devinit of_gpio_leds_probe(
const struct of_device_id *match)
{
struct device_node *np = ofdev->node, *child;
- struct gpio_led led;
struct gpio_led_of_platform_data *pdata;
int count = 0, ret;
@@ -226,8 +225,8 @@ static int __devinit of_gpio_leds_probe(
if (!pdata)
return -ENOMEM;
- memset(&led, 0, sizeof(led));
for_each_child_of_node(np, child) {
+ struct gpio_led led = {};
enum of_gpio_flags flags;
const char *state;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [112/156] icside: bring back ->maskproc method
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (110 preceding siblings ...)
2010-03-30 22:42 ` [111/156] leds-gpio: fix default state handling on OF platforms Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [113/156] Revert "ide: skip probe if there are no devices on the port (v2)" Greg KH
` (43 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bartlomiej Zolnierkiewicz,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
[ Upstream commit f75d4a238770d83d3a0475ce7f34e3fa37de161e ]
Bring back ->maskproc method since it is still needed for proper operation,
as noticed by Russell King:
> This change is bogus.
>
> writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1);
> readb(base + ICS_ARCIN_V6_INTROFFSET_2);
>
> writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2);
> readb(base + ICS_ARCIN_V6_INTROFFSET_1);
>
> This sequence of code does:
>
> 1. enable interrupt 1
> 2. disable interrupt 2
> 3. enable interrupt 2
> 4. disable interrupt 1
>
> which results in the interrupt for the second channel being enabled -
> leaving channel 1 blocked.
>
> Firstly, icside shares its two IDE channels with one DMA engine - so it's
> a simplex interface. IDE supports those (or did when the code was written)
> serializing requests between the two interfaces. libata does not.
>
> Secondly, the interrupt lines on icside float when there's no drive connected
> or when the drive has its NIEN bit set, which means that you get spurious
> screaming interrupts which can kill off all expansion card interrupts on
> the machine unless you disable the channel interrupt on the card.
>
> Since libata can not serialize the operation of the two channels like IDE
> can, the libata version of the icside driver does not contain the interrupt
> stearing logic. Instead, it looks at the status after reset, and if
> nothing was found on that channel, it masks the interrupt from that
> channel.
This patch reverts changes done in commit dff8817 (I became confused due to
non-standard & undocumented ->maskproc method, anyway sorry about that).
Noticed-by: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/ide/icside.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++----
1 file changed, 60 insertions(+), 4 deletions(-)
--- a/drivers/ide/icside.c
+++ b/drivers/ide/icside.c
@@ -65,6 +65,8 @@ static struct cardinfo icside_cardinfo_v
};
struct icside_state {
+ unsigned int channel;
+ unsigned int enabled;
void __iomem *irq_port;
void __iomem *ioc_base;
unsigned int sel;
@@ -114,11 +116,18 @@ static void icside_irqenable_arcin_v6 (s
struct icside_state *state = ec->irq_data;
void __iomem *base = state->irq_port;
- writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1);
- readb(base + ICS_ARCIN_V6_INTROFFSET_2);
+ state->enabled = 1;
- writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2);
- readb(base + ICS_ARCIN_V6_INTROFFSET_1);
+ switch (state->channel) {
+ case 0:
+ writeb(0, base + ICS_ARCIN_V6_INTROFFSET_1);
+ readb(base + ICS_ARCIN_V6_INTROFFSET_2);
+ break;
+ case 1:
+ writeb(0, base + ICS_ARCIN_V6_INTROFFSET_2);
+ readb(base + ICS_ARCIN_V6_INTROFFSET_1);
+ break;
+ }
}
/* Prototype: icside_irqdisable_arcin_v6 (struct expansion_card *ec, int irqnr)
@@ -128,6 +137,8 @@ static void icside_irqdisable_arcin_v6 (
{
struct icside_state *state = ec->irq_data;
+ state->enabled = 0;
+
readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1);
readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2);
}
@@ -149,6 +160,44 @@ static const expansioncard_ops_t icside_
.irqpending = icside_irqpending_arcin_v6,
};
+/*
+ * Handle routing of interrupts. This is called before
+ * we write the command to the drive.
+ */
+static void icside_maskproc(ide_drive_t *drive, int mask)
+{
+ ide_hwif_t *hwif = drive->hwif;
+ struct expansion_card *ec = ECARD_DEV(hwif->dev);
+ struct icside_state *state = ecard_get_drvdata(ec);
+ unsigned long flags;
+
+ local_irq_save(flags);
+
+ state->channel = hwif->channel;
+
+ if (state->enabled && !mask) {
+ switch (hwif->channel) {
+ case 0:
+ writeb(0, state->irq_port + ICS_ARCIN_V6_INTROFFSET_1);
+ readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2);
+ break;
+ case 1:
+ writeb(0, state->irq_port + ICS_ARCIN_V6_INTROFFSET_2);
+ readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1);
+ break;
+ }
+ } else {
+ readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_2);
+ readb(state->irq_port + ICS_ARCIN_V6_INTROFFSET_1);
+ }
+
+ local_irq_restore(flags);
+}
+
+static const struct ide_port_ops icside_v6_no_dma_port_ops = {
+ .maskproc = icside_maskproc,
+};
+
#ifdef CONFIG_BLK_DEV_IDEDMA_ICS
/*
* SG-DMA support.
@@ -228,6 +277,7 @@ static void icside_set_dma_mode(ide_driv
static const struct ide_port_ops icside_v6_port_ops = {
.set_dma_mode = icside_set_dma_mode,
+ .maskproc = icside_maskproc,
};
static void icside_dma_host_set(ide_drive_t *drive, int on)
@@ -272,6 +322,11 @@ static int icside_dma_setup(ide_drive_t
BUG_ON(dma_channel_active(ec->dma));
/*
+ * Ensure that we have the right interrupt routed.
+ */
+ icside_maskproc(drive, 0);
+
+ /*
* Route the DMA signals to the correct interface.
*/
writeb(state->sel | hwif->channel, state->ioc_base);
@@ -399,6 +454,7 @@ err_free:
static const struct ide_port_info icside_v6_port_info __initdata = {
.init_dma = icside_dma_off_init,
+ .port_ops = &icside_v6_no_dma_port_ops,
.dma_ops = &icside_v6_dma_ops,
.host_flags = IDE_HFLAG_SERIALIZE | IDE_HFLAG_MMIO,
.mwdma_mask = ATA_MWDMA2,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [113/156] Revert "ide: skip probe if there are no devices on the port (v2)"
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (111 preceding siblings ...)
2010-03-30 22:42 ` [112/156] icside: bring back ->maskproc method Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [114/156] ide: Fix Promise UDMA33 IDE driver (pdc202xx_old) Greg KH
` (42 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commit 9ce41aed0d392246eb788786253f242e829fd5e1 ]
This reverts commit a20b2a44eca52818ef52a94959480b7e6ea2f528.
As requested by David Fries. This makes CDROMs which are slave drives
on a ribbon without a master disappear and causes other similar kinds
of badness.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/ide/ide-probe.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -695,14 +695,8 @@ static int ide_probe_port(ide_hwif_t *hw
if (irqd)
disable_irq(hwif->irq);
- rc = ide_port_wait_ready(hwif);
- if (rc == -ENODEV) {
- printk(KERN_INFO "%s: no devices on the port\n", hwif->name);
- goto out;
- } else if (rc == -EBUSY)
- printk(KERN_ERR "%s: not ready before the probe\n", hwif->name);
- else
- rc = -ENODEV;
+ if (ide_port_wait_ready(hwif) == -EBUSY)
+ printk(KERN_DEBUG "%s: Wait for ready failed before probe !\n", hwif->name);
/*
* Second drive should only exist if first drive was found,
@@ -713,7 +707,7 @@ static int ide_probe_port(ide_hwif_t *hw
if (drive->dev_flags & IDE_DFLAG_PRESENT)
rc = 0;
}
-out:
+
/*
* Use cached IRQ number. It might be (and is...) changed by probe
* code above
^ permalink raw reply [flat|nested] 432+ messages in thread
* [114/156] ide: Fix Promise UDMA33 IDE driver (pdc202xx_old)
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (112 preceding siblings ...)
2010-03-30 22:42 ` [113/156] Revert "ide: skip probe if there are no devices on the port (v2)" Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [115/156] qlogicpti: Remove slash in QlogicPTI irq name Greg KH
` (41 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Russell King,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Russell King <rmk@arm.linux.org.uk>
[ Upstream commit c3be57b6f35ef96a980ce84e59d6a5a8ca6184ad ]
On Sun, Jan 03, 2010 at 12:23:14AM +0000, Russell King wrote:
> - with IDE
> - locks the interrupt line, and makes the machine extremely painful -
> about an hour to get to the point of being able to unload the
> pdc202xx_old module.
Having manually bisected kernel versions, I've narrowed it down to some
change between 2.6.30 and 2.6.31. There's not much which has changed
between the two kernels, but one change stands out like a sore thumb:
+static int pdc202xx_test_irq(ide_hwif_t *hwif)
+{
+ struct pci_dev *dev = to_pci_dev(hwif->dev);
+ unsigned long high_16 = pci_resource_start(dev, 4);
+ u8 sc1d = inb(high_16 + 0x1d);
+
+ if (hwif->channel) {
+ /*
+ * bit 7: error, bit 6: interrupting,
+ * bit 5: FIFO full, bit 4: FIFO empty
+ */
+ return ((sc1d & 0x50) == 0x40) ? 1 : 0;
+ } else {
+ /*
+ * bit 3: error, bit 2: interrupting,
+ * bit 1: FIFO full, bit 0: FIFO empty
+ */
+ return ((sc1d & 0x05) == 0x04) ? 1 : 0;
+ }
+}
Reading the (documented as a 32-bit) system control register when the
interface is idle gives: 0x01da110c
So, the byte at 0x1d is 0x11, which is documented as meaning that the
primary and secondary FIFOs are empty.
The code above, which is trying to see whether an IRQ is pending, checks
for the IRQ bit to be one, and the FIFO bit to be zero - or in English,
to be non-empty.
Since during a BM-DMA read, the FIFOs will naturally be drained to the
PCI bus, the chance of us getting to the interface before this happens
are extremely small - and if we don't, it means we decide not to service
the interrupt. Hence, the screaming interrupt problem with drivers/ide.
Fix this by only indicating an interrupt is ready if both the interrupt
and FIFO empty bits are at '1'.
This bug only affects PDC20246/PDC20247 (Promise Ultra33) based cards,
and has been tested on 2.6.31 and 2.6.33-rc2.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/ide/pdc202xx_old.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/ide/pdc202xx_old.c
+++ b/drivers/ide/pdc202xx_old.c
@@ -100,13 +100,13 @@ static int pdc202xx_test_irq(ide_hwif_t
* bit 7: error, bit 6: interrupting,
* bit 5: FIFO full, bit 4: FIFO empty
*/
- return ((sc1d & 0x50) == 0x40) ? 1 : 0;
+ return ((sc1d & 0x50) == 0x50) ? 1 : 0;
} else {
/*
* bit 3: error, bit 2: interrupting,
* bit 1: FIFO full, bit 0: FIFO empty
*/
- return ((sc1d & 0x05) == 0x04) ? 1 : 0;
+ return ((sc1d & 0x05) == 0x05) ? 1 : 0;
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [115/156] qlogicpti: Remove slash in QlogicPTI irq name
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (113 preceding siblings ...)
2010-03-30 22:42 ` [114/156] ide: Fix Promise UDMA33 IDE driver (pdc202xx_old) Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [116/156] sparc64: Properly truncate pt_regs framepointer in perf callback Greg KH
` (40 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Meelis Roos, David S. Miller,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Meelis Roos <mroos@linux.ee>
[ Upstream commit 77d3926306bf4eecac50150ba5625797219f14ba ]
qlogicpti driver registers its irq with a name containing slash.
This results in
[ 71.049735] WARNING: at fs/proc/generic.c:316 __xlate_proc_name+0xa8/0xb8()
[ 71.132815] name 'Qlogic/PTI'
because proc_mkdir with the name of the irq fails. Fix it by just
removing the slash from irq name. Discovered and tested on real hardware
(Sun Ultra 1).
Signed-off-by: Meelis Roos <mroos@linux.ee>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/scsi/qlogicpti.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/scsi/qlogicpti.c
+++ b/drivers/scsi/qlogicpti.c
@@ -738,7 +738,7 @@ static int __devinit qpti_register_irq(s
* sanely maintain.
*/
if (request_irq(qpti->irq, qpti_intr,
- IRQF_SHARED, "Qlogic/PTI", qpti))
+ IRQF_SHARED, "QlogicPTI", qpti))
goto fail;
printk("qlogicpti%d: IRQ %d ", qpti->qpti_id, qpti->irq);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [116/156] sparc64: Properly truncate pt_regs framepointer in perf callback.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (114 preceding siblings ...)
2010-03-30 22:42 ` [115/156] qlogicpti: Remove slash in QlogicPTI irq name Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [117/156] sparc64: Add very basic XVR-1000 framebuffer driver Greg KH
` (39 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commit 9e8307ecaf9f8c8b5b3b22145021204c4e73114a ]
For 32-bit processes, we save the full 64-bits of the regs in pt_regs.
But unlike when the userspace actually does load and store
instructions, the top 32-bits don't get automatically truncated by the
cpu in kernel mode (because the kernel doesn't execute with PSTATE_AM
address masking enabled).
So we have to do it by hand.
Reported-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sparc/kernel/perf_event.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/sparc/kernel/perf_event.c
+++ b/arch/sparc/kernel/perf_event.c
@@ -1337,7 +1337,7 @@ static void perf_callchain_user_32(struc
callchain_store(entry, PERF_CONTEXT_USER);
callchain_store(entry, regs->tpc);
- ufp = regs->u_regs[UREG_I6];
+ ufp = regs->u_regs[UREG_I6] & 0xffffffffUL;
do {
struct sparc_stackf32 *usf, sf;
unsigned long pc;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [117/156] sparc64: Add very basic XVR-1000 framebuffer driver.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (115 preceding siblings ...)
2010-03-30 22:42 ` [116/156] sparc64: Properly truncate pt_regs framepointer in perf callback Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [118/156] l2tp: Fix oops in pppol2tp_xmit Greg KH
` (38 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Frans van Berckel, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commits 2d378b9179881b46a0faf11430efb421fe03ddd8 and
f04e879bf296d136bcafd8c5a26e95599b141671 ]
Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Frans van Berckel <fberckel@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/video/Kconfig | 12 ++
drivers/video/Makefile | 1
drivers/video/sunxvr1000.c | 228 +++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 241 insertions(+)
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -909,6 +909,18 @@ config FB_XVR2500
mostly initialized the card already. It is treated as a
completely dumb framebuffer device.
+config FB_XVR1000
+ bool "Sun XVR-1000 support"
+ depends on (FB = y) && SPARC64
+ select FB_CFB_FILLRECT
+ select FB_CFB_COPYAREA
+ select FB_CFB_IMAGEBLIT
+ help
+ This is the framebuffer device for the Sun XVR-1000 and similar
+ graphics cards. The driver only works on sparc64 systems where
+ the system firmware has mostly initialized the card already. It
+ is treated as a completely dumb framebuffer device.
+
config FB_PVR2
tristate "NEC PowerVR 2 display support"
depends on FB && SH_DREAMCAST
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -79,6 +79,7 @@ obj-$(CONFIG_FB_N411) += n41
obj-$(CONFIG_FB_HGA) += hgafb.o
obj-$(CONFIG_FB_XVR500) += sunxvr500.o
obj-$(CONFIG_FB_XVR2500) += sunxvr2500.o
+obj-$(CONFIG_FB_XVR1000) += sunxvr1000.o
obj-$(CONFIG_FB_IGA) += igafb.o
obj-$(CONFIG_FB_APOLLO) += dnfb.o
obj-$(CONFIG_FB_Q40) += q40fb.o
--- /dev/null
+++ b/drivers/video/sunxvr1000.c
@@ -0,0 +1,228 @@
+/* sunxvr1000.c: Sun XVR-1000 driver for sparc64 systems
+ *
+ * Copyright (C) 2010 David S. Miller (davem@davemloft.net)
+ */
+
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/fb.h>
+#include <linux/init.h>
+#include <linux/of_device.h>
+
+struct gfb_info {
+ struct fb_info *info;
+
+ char __iomem *fb_base;
+ unsigned long fb_base_phys;
+
+ struct device_node *of_node;
+
+ unsigned int width;
+ unsigned int height;
+ unsigned int depth;
+ unsigned int fb_size;
+
+ u32 pseudo_palette[16];
+};
+
+static int __devinit gfb_get_props(struct gfb_info *gp)
+{
+ gp->width = of_getintprop_default(gp->of_node, "width", 0);
+ gp->height = of_getintprop_default(gp->of_node, "height", 0);
+ gp->depth = of_getintprop_default(gp->of_node, "depth", 32);
+
+ if (!gp->width || !gp->height) {
+ printk(KERN_ERR "gfb: Critical properties missing for %s\n",
+ gp->of_node->full_name);
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+static int gfb_setcolreg(unsigned regno,
+ unsigned red, unsigned green, unsigned blue,
+ unsigned transp, struct fb_info *info)
+{
+ u32 value;
+
+ if (regno < 16) {
+ red >>= 8;
+ green >>= 8;
+ blue >>= 8;
+
+ value = (blue << 16) | (green << 8) | red;
+ ((u32 *)info->pseudo_palette)[regno] = value;
+ }
+
+ return 0;
+}
+
+static struct fb_ops gfb_ops = {
+ .owner = THIS_MODULE,
+ .fb_setcolreg = gfb_setcolreg,
+ .fb_fillrect = cfb_fillrect,
+ .fb_copyarea = cfb_copyarea,
+ .fb_imageblit = cfb_imageblit,
+};
+
+static int __devinit gfb_set_fbinfo(struct gfb_info *gp)
+{
+ struct fb_info *info = gp->info;
+ struct fb_var_screeninfo *var = &info->var;
+
+ info->flags = FBINFO_DEFAULT;
+ info->fbops = &gfb_ops;
+ info->screen_base = gp->fb_base;
+ info->screen_size = gp->fb_size;
+
+ info->pseudo_palette = gp->pseudo_palette;
+
+ /* Fill fix common fields */
+ strlcpy(info->fix.id, "gfb", sizeof(info->fix.id));
+ info->fix.smem_start = gp->fb_base_phys;
+ info->fix.smem_len = gp->fb_size;
+ info->fix.type = FB_TYPE_PACKED_PIXELS;
+ if (gp->depth == 32 || gp->depth == 24)
+ info->fix.visual = FB_VISUAL_TRUECOLOR;
+ else
+ info->fix.visual = FB_VISUAL_PSEUDOCOLOR;
+
+ var->xres = gp->width;
+ var->yres = gp->height;
+ var->xres_virtual = var->xres;
+ var->yres_virtual = var->yres;
+ var->bits_per_pixel = gp->depth;
+
+ var->red.offset = 0;
+ var->red.length = 8;
+ var->green.offset = 8;
+ var->green.length = 8;
+ var->blue.offset = 16;
+ var->blue.length = 8;
+ var->transp.offset = 0;
+ var->transp.length = 0;
+
+ if (fb_alloc_cmap(&info->cmap, 256, 0)) {
+ printk(KERN_ERR "gfb: Cannot allocate color map.\n");
+ return -ENOMEM;
+ }
+
+ return 0;
+}
+
+static int __devinit gfb_probe(struct of_device *op,
+ const struct of_device_id *match)
+{
+ struct device_node *dp = op->node;
+ struct fb_info *info;
+ struct gfb_info *gp;
+ int err;
+
+ info = framebuffer_alloc(sizeof(struct gfb_info), &op->dev);
+ if (!info) {
+ printk(KERN_ERR "gfb: Cannot allocate fb_info\n");
+ err = -ENOMEM;
+ goto err_out;
+ }
+
+ gp = info->par;
+ gp->info = info;
+ gp->of_node = dp;
+
+ gp->fb_base_phys = op->resource[6].start;
+
+ err = gfb_get_props(gp);
+ if (err)
+ goto err_release_fb;
+
+ /* Framebuffer length is the same regardless of resolution. */
+ info->fix.line_length = 16384;
+ gp->fb_size = info->fix.line_length * gp->height;
+
+ gp->fb_base = of_ioremap(&op->resource[6], 0,
+ gp->fb_size, "gfb fb");
+ if (!gp->fb_base)
+ goto err_release_fb;
+
+ err = gfb_set_fbinfo(gp);
+ if (err)
+ goto err_unmap_fb;
+
+ printk("gfb: Found device at %s\n", dp->full_name);
+
+ err = register_framebuffer(info);
+ if (err < 0) {
+ printk(KERN_ERR "gfb: Could not register framebuffer %s\n",
+ dp->full_name);
+ goto err_unmap_fb;
+ }
+
+ dev_set_drvdata(&op->dev, info);
+
+ return 0;
+
+err_unmap_fb:
+ of_iounmap(&op->resource[6], gp->fb_base, gp->fb_size);
+
+err_release_fb:
+ framebuffer_release(info);
+
+err_out:
+ return err;
+}
+
+static int __devexit gfb_remove(struct of_device *op)
+{
+ struct fb_info *info = dev_get_drvdata(&op->dev);
+ struct gfb_info *gp = info->par;
+
+ unregister_framebuffer(info);
+
+ iounmap(gp->fb_base);
+
+ of_iounmap(&op->resource[6], gp->fb_base, gp->fb_size);
+
+ framebuffer_release(info);
+
+ dev_set_drvdata(&op->dev, NULL);
+
+ return 0;
+}
+
+static const struct of_device_id gfb_match[] = {
+ {
+ .name = "SUNW,gfb",
+ },
+ {},
+};
+MODULE_DEVICE_TABLE(of, ffb_match);
+
+static struct of_platform_driver gfb_driver = {
+ .name = "gfb",
+ .match_table = gfb_match,
+ .probe = gfb_probe,
+ .remove = __devexit_p(gfb_remove),
+};
+
+static int __init gfb_init(void)
+{
+ if (fb_get_options("gfb", NULL))
+ return -ENODEV;
+
+ return of_register_driver(&gfb_driver, &of_bus_type);
+}
+
+static void __exit gfb_exit(void)
+{
+ of_unregister_driver(&gfb_driver);
+}
+
+module_init(gfb_init);
+module_exit(gfb_exit);
+
+MODULE_DESCRIPTION("framebuffer driver for Sun XVR-1000 graphics");
+MODULE_AUTHOR("David S. Miller <davem@davemloft.net>");
+MODULE_VERSION("1.0");
+MODULE_LICENSE("GPL");
^ permalink raw reply [flat|nested] 432+ messages in thread
* [118/156] l2tp: Fix oops in pppol2tp_xmit
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (116 preceding siblings ...)
2010-03-30 22:42 ` [117/156] sparc64: Add very basic XVR-1000 framebuffer driver Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [119/156] l2tp: Fix UDP socket reference count bugs in the pppol2tp driver Greg KH
` (37 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, James Chapman,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: James Chapman <jchapman@katalix.com>
[ Upstream commit 3feec9095d12e311b7d4eb7fe7e5dfa75d4a72a5 ]
When transmitting L2TP frames, we derive the outgoing interface's UDP
checksum hardware assist capabilities from the tunnel dst dev. This
can sometimes be NULL, especially when routing protocols are used and
routing changes occur. This patch just checks for NULL dst or dev
pointers when checking for netdev hardware assist features.
BUG: unable to handle kernel NULL pointer dereference at 0000000c
IP: [<f89d074c>] pppol2tp_xmit+0x341/0x4da [pppol2tp]
*pde = 00000000
Oops: 0000 [#1] SMP
last sysfs file: /sys/class/net/lo/operstate
Modules linked in: pppol2tp pppox ppp_generic slhc ipv6 dummy loop snd_hda_codec_atihdmi snd_hda_intel snd_hda_codec snd_pcm snd_timer snd soundcore snd_page_alloc evdev psmouse serio_raw processor button i2c_piix4 i2c_core ati_agp agpgart pcspkr ext3 jbd mbcache sd_mod ide_pci_generic atiixp ide_core ahci ata_generic floppy ehci_hcd ohci_hcd libata e1000e scsi_mod usbcore nls_base thermal fan thermal_sys [last unloaded: scsi_wait_scan]
Pid: 0, comm: swapper Not tainted (2.6.32.8 #1)
EIP: 0060:[<f89d074c>] EFLAGS: 00010297 CPU: 3
EIP is at pppol2tp_xmit+0x341/0x4da [pppol2tp]
EAX: 00000000 EBX: f64d1680 ECX: 000005b9 EDX: 00000000
ESI: f6b91850 EDI: f64d16ac EBP: f6a0c4c0 ESP: f70a9cac
DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
Process swapper (pid: 0, ti=f70a8000 task=f70a31c0 task.ti=f70a8000)
Stack:
000005a9 000005b9 f734c400 f66652c0 f7352e00 f67dc800 00000000 f6b91800
<0> 000005a3 f70ef6c4 f67dcda9 000005a3 f89b192e 00000246 000005a3 f64d1680
<0> f63633e0 f6363320 f64d1680 f65a7320 f65a7364 f65856c0 f64d1680 f679f02f
Call Trace:
[<f89b192e>] ? ppp_push+0x459/0x50e [ppp_generic]
[<f89b217f>] ? ppp_xmit_process+0x3b6/0x430 [ppp_generic]
[<f89b2306>] ? ppp_start_xmit+0x10d/0x120 [ppp_generic]
[<c11c15cb>] ? dev_hard_start_xmit+0x21f/0x2b2
[<c11d0947>] ? sch_direct_xmit+0x48/0x10e
[<c11c19a0>] ? dev_queue_xmit+0x263/0x3a6
[<c11e2a9f>] ? ip_finish_output+0x1f7/0x221
[<c11df682>] ? ip_forward_finish+0x2e/0x30
[<c11de645>] ? ip_rcv_finish+0x295/0x2a9
[<c11c0b19>] ? netif_receive_skb+0x3e9/0x404
[<f814b791>] ? e1000_clean_rx_irq+0x253/0x2fc [e1000e]
[<f814cb7a>] ? e1000_clean+0x63/0x1fc [e1000e]
[<c1047eff>] ? sched_clock_local+0x15/0x11b
[<c11c1095>] ? net_rx_action+0x96/0x195
[<c1035750>] ? __do_softirq+0xaa/0x151
[<c1035828>] ? do_softirq+0x31/0x3c
[<c10358fe>] ? irq_exit+0x26/0x58
[<c1004b21>] ? do_IRQ+0x78/0x89
[<c1003729>] ? common_interrupt+0x29/0x30
[<c101ac28>] ? native_safe_halt+0x2/0x3
[<c1008c54>] ? default_idle+0x55/0x75
[<c1009045>] ? c1e_idle+0xd2/0xd5
[<c100233c>] ? cpu_idle+0x46/0x62
Code: 8d 45 08 f0 ff 45 08 89 6b 08 c7 43 68 7e fb 9c f8 8a 45 24 83 e0 0c 3c 04 75 09 80 63 64 f3 e9 b4 00 00 00 8b 43 18 8b 4c 24 04 <8b> 40 0c 8d 79 11 f6 40 44 0e 8a 43 64 75 51 6a 00 8b 4c 24 08
EIP: [<f89d074c>] pppol2tp_xmit+0x341/0x4da [pppol2tp] SS:ESP 0068:f70a9cac
CR2: 000000000000000c
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/pppol2tp.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -1180,7 +1180,8 @@ static int pppol2tp_xmit(struct ppp_chan
/* Calculate UDP checksum if configured to do so */
if (sk_tun->sk_no_check == UDP_CSUM_NOXMIT)
skb->ip_summed = CHECKSUM_NONE;
- else if (!(skb_dst(skb)->dev->features & NETIF_F_V4_CSUM)) {
+ else if ((skb_dst(skb) && skb_dst(skb)->dev) &&
+ (!(skb_dst(skb)->dev->features & NETIF_F_V4_CSUM))) {
skb->ip_summed = CHECKSUM_COMPLETE;
csum = skb_checksum(skb, 0, udp_len, 0);
uh->check = csum_tcpudp_magic(inet->inet_saddr,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [119/156] l2tp: Fix UDP socket reference count bugs in the pppol2tp driver
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (117 preceding siblings ...)
2010-03-30 22:42 ` [118/156] l2tp: Fix oops in pppol2tp_xmit Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [120/156] route: Fix caught BUG_ON during rt_secret_rebuild_oneshot() Greg KH
` (36 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, James Chapman,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: James Chapman <jchapman@katalix.com>
[ Upstream commit c3259c8a7060d480e8eb2166da0a99d6879146b4 ]
This patch fixes UDP socket refcnt bugs in the pppol2tp driver.
A bug can cause a kernel stack trace when a tunnel socket is closed.
A way to reproduce the issue is to prepare the UDP socket for L2TP (by
opening a tunnel pppol2tp socket) and then close it before any L2TP
sessions are added to it. The sequence is
Create UDP socket
Create tunnel pppol2tp socket to prepare UDP socket for L2TP
pppol2tp_connect: session_id=0, peer_session_id=0
L2TP SCCRP control frame received (tunnel_id==0)
pppol2tp_recv_core: sock_hold()
pppol2tp_recv_core: sock_put
L2TP ZLB control frame received (tunnel_id=nnn)
pppol2tp_recv_core: sock_hold()
pppol2tp_recv_core: sock_put
Close tunnel management socket
pppol2tp_release: session_id=0, peer_session_id=0
Close UDP socket
udp_lib_close: BUG
The addition of sock_hold() in pppol2tp_connect() solves the problem.
For data frames, two sock_put() calls were added to plug a refcnt leak
per received data frame. The ref that is grabbed at the top of
pppol2tp_recv_core() must always be released, but this wasn't done for
accepted data frames or data frames discarded because of bad UDP
checksums. This leak meant that any UDP socket that had passed L2TP
data traffic (i.e. L2TP data frames, not just L2TP control frames)
using pppol2tp would not be released by the kernel.
WARNING: at include/net/sock.h:435 udp_lib_unhash+0x117/0x120()
Pid: 1086, comm: openl2tpd Not tainted 2.6.33-rc1 #8
Call Trace:
[<c119e9b7>] ? udp_lib_unhash+0x117/0x120
[<c101b871>] ? warn_slowpath_common+0x71/0xd0
[<c119e9b7>] ? udp_lib_unhash+0x117/0x120
[<c101b8e3>] ? warn_slowpath_null+0x13/0x20
[<c119e9b7>] ? udp_lib_unhash+0x117/0x120
[<c11598a7>] ? sk_common_release+0x17/0x90
[<c11a5e33>] ? inet_release+0x33/0x60
[<c11577b0>] ? sock_release+0x10/0x60
[<c115780f>] ? sock_close+0xf/0x30
[<c106e542>] ? __fput+0x52/0x150
[<c106b68e>] ? filp_close+0x3e/0x70
[<c101d2e2>] ? put_files_struct+0x62/0xb0
[<c101eaf7>] ? do_exit+0x5e7/0x650
[<c1081623>] ? mntput_no_expire+0x13/0x70
[<c106b68e>] ? filp_close+0x3e/0x70
[<c101eb8a>] ? do_group_exit+0x2a/0x70
[<c101ebe1>] ? sys_exit_group+0x11/0x20
[<c10029b0>] ? sysenter_do_call+0x12/0x26
Signed-off-by: James Chapman <jchapman@katalix.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/pppol2tp.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/net/pppol2tp.c
+++ b/drivers/net/pppol2tp.c
@@ -756,6 +756,7 @@ static int pppol2tp_recv_core(struct soc
/* Try to dequeue as many skbs from reorder_q as we can. */
pppol2tp_recv_dequeue(session);
+ sock_put(sock);
return 0;
@@ -772,6 +773,7 @@ discard_bad_csum:
UDP_INC_STATS_USER(&init_net, UDP_MIB_INERRORS, 0);
tunnel->stats.rx_errors++;
kfree_skb(skb);
+ sock_put(sock);
return 0;
@@ -1662,6 +1664,7 @@ static int pppol2tp_connect(struct socke
if (tunnel_sock == NULL)
goto end;
+ sock_hold(tunnel_sock);
tunnel = tunnel_sock->sk_user_data;
} else {
tunnel = pppol2tp_tunnel_find(sock_net(sk), sp->pppol2tp.s_tunnel);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [120/156] route: Fix caught BUG_ON during rt_secret_rebuild_oneshot()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (118 preceding siblings ...)
2010-03-30 22:42 ` [119/156] l2tp: Fix UDP socket reference count bugs in the pppol2tp driver Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [121/156] net: add limit for socket backlog Greg KH
` (35 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Vitaliy Gusev, Neil Horman,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Vitaliy Gusev <vgusev@openvz.org>
[ Upstream commit 858a18a6a2f74e8f0e5b2e9671d4b74694aba708 ]
route: Fix caught BUG_ON during rt_secret_rebuild_oneshot()
Call rt_secret_rebuild can cause BUG_ON(timer_pending(&net->ipv4.rt_secret_timer)) in
add_timer as there is not any synchronization for call rt_secret_rebuild_oneshot()
for the same net namespace.
Also this issue affects to rt_secret_reschedule().
Thus use mod_timer enstead.
Signed-off-by: Vitaliy Gusev <vgusev@openvz.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv4/route.c | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -922,10 +922,8 @@ static void rt_secret_rebuild_oneshot(st
{
del_timer_sync(&net->ipv4.rt_secret_timer);
rt_cache_invalidate(net);
- if (ip_rt_secret_interval) {
- net->ipv4.rt_secret_timer.expires += ip_rt_secret_interval;
- add_timer(&net->ipv4.rt_secret_timer);
- }
+ if (ip_rt_secret_interval)
+ mod_timer(&net->ipv4.rt_secret_timer, jiffies + ip_rt_secret_interval);
}
static void rt_emergency_hash_rebuild(struct net *net)
@@ -3072,22 +3070,20 @@ static void rt_secret_reschedule(int old
rtnl_lock();
for_each_net(net) {
int deleted = del_timer_sync(&net->ipv4.rt_secret_timer);
+ long time;
if (!new)
continue;
if (deleted) {
- long time = net->ipv4.rt_secret_timer.expires - jiffies;
+ time = net->ipv4.rt_secret_timer.expires - jiffies;
if (time <= 0 || (time += diff) <= 0)
time = 0;
-
- net->ipv4.rt_secret_timer.expires = time;
} else
- net->ipv4.rt_secret_timer.expires = new;
+ time = new;
- net->ipv4.rt_secret_timer.expires += jiffies;
- add_timer(&net->ipv4.rt_secret_timer);
+ mod_timer(&net->ipv4.rt_secret_timer, jiffies + time);
}
rtnl_unlock();
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [121/156] net: add limit for socket backlog
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (119 preceding siblings ...)
2010-03-30 22:42 ` [120/156] route: Fix caught BUG_ON during rt_secret_rebuild_oneshot() Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [122/156] tcp: use limited " Greg KH
` (34 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David Miller,
Arnaldo Carvalho de Melo, Alexey Kuznetsov, Pekka Savola (ipv6),
Patrick McHardy, Vlad Yasevich, Sridhar Samudrala, Jon Maloy,
Allan Stephens, Andrew Hendry, Zhu Yi, Eric Dumazet,
Arnaldo Carvalho de Melo, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhu Yi <yi.zhu@intel.com>
[ Upstream commit 8eae939f1400326b06d0c9afe53d2a484a326871 ]
We got system OOM while running some UDP netperf testing on the loopback
device. The case is multiple senders sent stream UDP packets to a single
receiver via loopback on local host. Of course, the receiver is not able
to handle all the packets in time. But we surprisingly found that these
packets were not discarded due to the receiver's sk->sk_rcvbuf limit.
Instead, they are kept queuing to sk->sk_backlog and finally ate up all
the memory. We believe this is a secure hole that a none privileged user
can crash the system.
The root cause for this problem is, when the receiver is doing
__release_sock() (i.e. after userspace recv, kernel udp_recvmsg ->
skb_free_datagram_locked -> release_sock), it moves skbs from backlog to
sk_receive_queue with the softirq enabled. In the above case, multiple
busy senders will almost make it an endless loop. The skbs in the
backlog end up eat all the system memory.
The issue is not only for UDP. Any protocols using socket backlog is
potentially affected. The patch adds limit for socket backlog so that
the backlog size cannot be expanded endlessly.
Reported-by: Alex Shi <alex.shi@intel.com>
Cc: David Miller <davem@davemloft.net>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Allan Stephens <allan.stephens@windriver.com>
Cc: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/net/sock.h | 15 ++++++++++++++-
net/core/sock.c | 16 ++++++++++++++--
2 files changed, 28 insertions(+), 3 deletions(-)
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -253,6 +253,8 @@ struct sock {
struct {
struct sk_buff *head;
struct sk_buff *tail;
+ int len;
+ int limit;
} sk_backlog;
wait_queue_head_t *sk_sleep;
struct dst_entry *sk_dst_cache;
@@ -574,7 +576,7 @@ static inline int sk_stream_memory_free(
return sk->sk_wmem_queued < sk->sk_sndbuf;
}
-/* The per-socket spinlock must be held here. */
+/* OOB backlog add */
static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
{
if (!sk->sk_backlog.tail) {
@@ -586,6 +588,17 @@ static inline void sk_add_backlog(struct
skb->next = NULL;
}
+/* The per-socket spinlock must be held here. */
+static inline int sk_add_backlog_limited(struct sock *sk, struct sk_buff *skb)
+{
+ if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1))
+ return -ENOBUFS;
+
+ sk_add_backlog(sk, skb);
+ sk->sk_backlog.len += skb->truesize;
+ return 0;
+}
+
static inline int sk_backlog_rcv(struct sock *sk, struct sk_buff *skb)
{
return sk->sk_backlog_rcv(sk, skb);
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -340,8 +340,12 @@ int sk_receive_skb(struct sock *sk, stru
rc = sk_backlog_rcv(sk, skb);
mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
- } else
- sk_add_backlog(sk, skb);
+ } else if (sk_add_backlog_limited(sk, skb)) {
+ bh_unlock_sock(sk);
+ atomic_inc(&sk->sk_drops);
+ goto discard_and_relse;
+ }
+
bh_unlock_sock(sk);
out:
sock_put(sk);
@@ -1138,6 +1142,7 @@ struct sock *sk_clone(const struct sock
sock_lock_init(newsk);
bh_lock_sock(newsk);
newsk->sk_backlog.head = newsk->sk_backlog.tail = NULL;
+ newsk->sk_backlog.len = 0;
atomic_set(&newsk->sk_rmem_alloc, 0);
/*
@@ -1541,6 +1546,12 @@ static void __release_sock(struct sock *
bh_lock_sock(sk);
} while ((skb = sk->sk_backlog.head) != NULL);
+
+ /*
+ * Doing the zeroing here guarantee we can not loop forever
+ * while a wild producer attempts to flood us.
+ */
+ sk->sk_backlog.len = 0;
}
/**
@@ -1873,6 +1884,7 @@ void sock_init_data(struct socket *sock,
sk->sk_allocation = GFP_KERNEL;
sk->sk_rcvbuf = sysctl_rmem_default;
sk->sk_sndbuf = sysctl_wmem_default;
+ sk->sk_backlog.limit = sk->sk_rcvbuf << 1;
sk->sk_state = TCP_CLOSE;
sk_set_socket(sk, sock);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [122/156] tcp: use limited socket backlog
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (120 preceding siblings ...)
2010-03-30 22:42 ` [121/156] net: add limit for socket backlog Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [123/156] udp: " Greg KH
` (33 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Alexey Kuznetsov, Pekka Savola (ipv6), Patrick McHardy, Zhu Yi,
Eric Dumazet, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhu Yi <yi.zhu@intel.com>
[ Upstream commit 6b03a53a5ab7ccf2d5d69f96cf1c739c4d2a8fb9 ]
Make tcp adapt to the limited socket backlog change.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Zhu Yi <yi.zhu@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/ipv4/tcp_ipv4.c | 6 ++++--
net/ipv6/tcp_ipv6.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1677,8 +1677,10 @@ process:
if (!tcp_prequeue(sk, skb))
ret = tcp_v4_do_rcv(sk, skb);
}
- } else
- sk_add_backlog(sk, skb);
+ } else if (sk_add_backlog_limited(sk, skb)) {
+ bh_unlock_sock(sk);
+ goto discard_and_relse;
+ }
bh_unlock_sock(sk);
sock_put(sk);
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1732,8 +1732,10 @@ process:
if (!tcp_prequeue(sk, skb))
ret = tcp_v6_do_rcv(sk, skb);
}
- } else
- sk_add_backlog(sk, skb);
+ } else if (sk_add_backlog_limited(sk, skb)) {
+ bh_unlock_sock(sk);
+ goto discard_and_relse;
+ }
bh_unlock_sock(sk);
sock_put(sk);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [123/156] udp: use limited socket backlog
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (121 preceding siblings ...)
2010-03-30 22:42 ` [122/156] tcp: use limited " Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [124/156] llc: " Greg KH
` (32 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Alexey Kuznetsov, Pekka Savola (ipv6), Patrick McHardy, Zhu Yi,
Eric Dumazet, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhu Yi <yi.zhu@intel.com>
[ Upstream commit 55349790d7cbf0d381873a7ece1dcafcffd4aaa9 ]
Make udp adapt to the limited socket backlog change.
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Cc: "Pekka Savola (ipv6)" <pekkas@netcore.fi>
Cc: Patrick McHardy <kaber@trash.net>
Signed-off-by: Zhu Yi <yi.zhu@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/ipv4/udp.c | 6 ++++--
net/ipv6/udp.c | 28 ++++++++++++++++++----------
2 files changed, 22 insertions(+), 12 deletions(-)
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1372,8 +1372,10 @@ int udp_queue_rcv_skb(struct sock *sk, s
bh_lock_sock(sk);
if (!sock_owned_by_user(sk))
rc = __udp_queue_rcv_skb(sk, skb);
- else
- sk_add_backlog(sk, skb);
+ else if (sk_add_backlog_limited(sk, skb)) {
+ bh_unlock_sock(sk);
+ goto drop;
+ }
bh_unlock_sock(sk);
return rc;
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -584,16 +584,20 @@ static void flush_stack(struct sock **st
bh_lock_sock(sk);
if (!sock_owned_by_user(sk))
udpv6_queue_rcv_skb(sk, skb1);
- else
- sk_add_backlog(sk, skb1);
+ else if (sk_add_backlog_limited(sk, skb1)) {
+ kfree_skb(skb1);
+ bh_unlock_sock(sk);
+ goto drop;
+ }
bh_unlock_sock(sk);
- } else {
- atomic_inc(&sk->sk_drops);
- UDP6_INC_STATS_BH(sock_net(sk),
- UDP_MIB_RCVBUFERRORS, IS_UDPLITE(sk));
- UDP6_INC_STATS_BH(sock_net(sk),
- UDP_MIB_INERRORS, IS_UDPLITE(sk));
+ continue;
}
+drop:
+ atomic_inc(&sk->sk_drops);
+ UDP6_INC_STATS_BH(sock_net(sk),
+ UDP_MIB_RCVBUFERRORS, IS_UDPLITE(sk));
+ UDP6_INC_STATS_BH(sock_net(sk),
+ UDP_MIB_INERRORS, IS_UDPLITE(sk));
}
}
/*
@@ -756,8 +760,12 @@ int __udp6_lib_rcv(struct sk_buff *skb,
bh_lock_sock(sk);
if (!sock_owned_by_user(sk))
udpv6_queue_rcv_skb(sk, skb);
- else
- sk_add_backlog(sk, skb);
+ else if (sk_add_backlog_limited(sk, skb)) {
+ atomic_inc(&sk->sk_drops);
+ bh_unlock_sock(sk);
+ sock_put(sk);
+ goto discard;
+ }
bh_unlock_sock(sk);
sock_put(sk);
return 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [124/156] llc: use limited socket backlog
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (122 preceding siblings ...)
2010-03-30 22:42 ` [123/156] udp: " Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [125/156] sctp: " Greg KH
` (31 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Arnaldo Carvalho de Melo,
Zhu Yi, Eric Dumazet, Arnaldo Carvalho de Melo, David S. Miller,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhu Yi <yi.zhu@intel.com>
[ Upstream commit 79545b681961d7001c1f4c3eb9ffb87bed4485db ]
Make llc adapt to the limited socket backlog change.
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/llc/llc_conn.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/llc/llc_conn.c
+++ b/net/llc/llc_conn.c
@@ -756,7 +756,8 @@ void llc_conn_handler(struct llc_sap *sa
else {
dprintk("%s: adding to backlog...\n", __func__);
llc_set_backlog_type(skb, LLC_PACKET);
- sk_add_backlog(sk, skb);
+ if (sk_add_backlog_limited(sk, skb))
+ goto drop_unlock;
}
out:
bh_unlock_sock(sk);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [125/156] sctp: use limited socket backlog
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (123 preceding siblings ...)
2010-03-30 22:42 ` [124/156] llc: " Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [126/156] tipc: " Greg KH
` (30 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Vlad Yasevich,
Sridhar Samudrala, Zhu Yi, David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhu Yi <yi.zhu@intel.com>
[ Upstream commit 50b1a782f845140f4138f14a1ce8a4a6dd0cc82f ]
Make sctp adapt to the limited socket backlog change.
Cc: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: Sridhar Samudrala <sri@us.ibm.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sctp/input.c | 42 +++++++++++++++++++++++++++---------------
net/sctp/socket.c | 3 +++
2 files changed, 30 insertions(+), 15 deletions(-)
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -75,7 +75,7 @@ static struct sctp_association *__sctp_l
const union sctp_addr *peer,
struct sctp_transport **pt);
-static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb);
+static int sctp_add_backlog(struct sock *sk, struct sk_buff *skb);
/* Calculate the SCTP checksum of an SCTP packet. */
@@ -265,8 +265,13 @@ int sctp_rcv(struct sk_buff *skb)
}
if (sock_owned_by_user(sk)) {
+ if (sctp_add_backlog(sk, skb)) {
+ sctp_bh_unlock_sock(sk);
+ sctp_chunk_free(chunk);
+ skb = NULL; /* sctp_chunk_free already freed the skb */
+ goto discard_release;
+ }
SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_BACKLOG);
- sctp_add_backlog(sk, skb);
} else {
SCTP_INC_STATS_BH(SCTP_MIB_IN_PKT_SOFTIRQ);
sctp_inq_push(&chunk->rcvr->inqueue, chunk);
@@ -336,8 +341,10 @@ int sctp_backlog_rcv(struct sock *sk, st
sctp_bh_lock_sock(sk);
if (sock_owned_by_user(sk)) {
- sk_add_backlog(sk, skb);
- backloged = 1;
+ if (sk_add_backlog_limited(sk, skb))
+ sctp_chunk_free(chunk);
+ else
+ backloged = 1;
} else
sctp_inq_push(inqueue, chunk);
@@ -362,22 +369,27 @@ done:
return 0;
}
-static void sctp_add_backlog(struct sock *sk, struct sk_buff *skb)
+static int sctp_add_backlog(struct sock *sk, struct sk_buff *skb)
{
struct sctp_chunk *chunk = SCTP_INPUT_CB(skb)->chunk;
struct sctp_ep_common *rcvr = chunk->rcvr;
+ int ret;
- /* Hold the assoc/ep while hanging on the backlog queue.
- * This way, we know structures we need will not disappear from us
- */
- if (SCTP_EP_TYPE_ASSOCIATION == rcvr->type)
- sctp_association_hold(sctp_assoc(rcvr));
- else if (SCTP_EP_TYPE_SOCKET == rcvr->type)
- sctp_endpoint_hold(sctp_ep(rcvr));
- else
- BUG();
+ ret = sk_add_backlog_limited(sk, skb);
+ if (!ret) {
+ /* Hold the assoc/ep while hanging on the backlog queue.
+ * This way, we know structures we need will not disappear
+ * from us
+ */
+ if (SCTP_EP_TYPE_ASSOCIATION == rcvr->type)
+ sctp_association_hold(sctp_assoc(rcvr));
+ else if (SCTP_EP_TYPE_SOCKET == rcvr->type)
+ sctp_endpoint_hold(sctp_ep(rcvr));
+ else
+ BUG();
+ }
+ return ret;
- sk_add_backlog(sk, skb);
}
/* Handle icmp frag needed error. */
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -3720,6 +3720,9 @@ SCTP_STATIC int sctp_init_sock(struct so
SCTP_DBG_OBJCNT_INC(sock);
percpu_counter_inc(&sctp_sockets_allocated);
+ /* Set socket backlog limit. */
+ sk->sk_backlog.limit = sysctl_sctp_rmem[1];
+
local_bh_disable();
sock_prot_inuse_add(sock_net(sk), sk->sk_prot, 1);
local_bh_enable();
^ permalink raw reply [flat|nested] 432+ messages in thread
* [126/156] tipc: use limited socket backlog
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (124 preceding siblings ...)
2010-03-30 22:42 ` [125/156] sctp: " Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [127/156] x25: " Greg KH
` (29 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jon Maloy, Allan Stephens,
Zhu Yi, Eric Dumazet, David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhu Yi <yi.zhu@intel.com>
[ Upstream commit 53eecb1be5ae499d399d2923933937a9ea1a284f ]
Make tipc adapt to the limited socket backlog change.
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/tipc/socket.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1322,8 +1322,10 @@ static u32 dispatch(struct tipc_port *tp
if (!sock_owned_by_user(sk)) {
res = filter_rcv(sk, buf);
} else {
- sk_add_backlog(sk, buf);
- res = TIPC_OK;
+ if (sk_add_backlog_limited(sk, buf))
+ res = TIPC_ERR_OVERLOAD;
+ else
+ res = TIPC_OK;
}
bh_unlock_sock(sk);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [127/156] x25: use limited socket backlog
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (125 preceding siblings ...)
2010-03-30 22:42 ` [126/156] tipc: " Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [128/156] net: backlog functions rename Greg KH
` (28 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andrew Hendry, Zhu Yi,
Eric Dumazet, David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhu Yi <yi.zhu@intel.com>
[ Upstream commit 2499849ee8f513e795b9f2c19a42d6356e4943a4 ]
Make x25 adapt to the limited socket backlog change.
Cc: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: Zhu Yi <yi.zhu@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/x25/x25_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/x25/x25_dev.c
+++ b/net/x25/x25_dev.c
@@ -53,7 +53,7 @@ static int x25_receive_data(struct sk_bu
if (!sock_owned_by_user(sk)) {
queued = x25_process_rx_frame(sk, skb);
} else {
- sk_add_backlog(sk, skb);
+ queued = !sk_add_backlog_limited(sk, skb);
}
bh_unlock_sock(sk);
sock_put(sk);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [128/156] net: backlog functions rename
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (126 preceding siblings ...)
2010-03-30 22:42 ` [127/156] x25: " Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [129/156] net: add __must_check to sk_add_backlog Greg KH
` (27 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Zhu Yi, Eric Dumazet,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhu Yi <yi.zhu@intel.com>
[ Upstream commit a3a858ff18a72a8d388e31ab0d98f7e944841a62 ]
sk_add_backlog -> __sk_add_backlog
sk_add_backlog_limited -> sk_add_backlog
Signed-off-by: Zhu Yi <yi.zhu@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>
---
include/net/sock.h | 6 +++---
net/core/sock.c | 2 +-
net/dccp/minisocks.c | 2 +-
net/ipv4/tcp_ipv4.c | 2 +-
net/ipv4/tcp_minisocks.c | 2 +-
net/ipv4/udp.c | 2 +-
net/ipv6/tcp_ipv6.c | 2 +-
net/ipv6/udp.c | 4 ++--
net/llc/llc_c_ac.c | 2 +-
net/llc/llc_conn.c | 2 +-
net/sctp/input.c | 4 ++--
net/tipc/socket.c | 2 +-
net/x25/x25_dev.c | 2 +-
13 files changed, 17 insertions(+), 17 deletions(-)
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -577,7 +577,7 @@ static inline int sk_stream_memory_free(
}
/* OOB backlog add */
-static inline void sk_add_backlog(struct sock *sk, struct sk_buff *skb)
+static inline void __sk_add_backlog(struct sock *sk, struct sk_buff *skb)
{
if (!sk->sk_backlog.tail) {
sk->sk_backlog.head = sk->sk_backlog.tail = skb;
@@ -589,12 +589,12 @@ static inline void sk_add_backlog(struct
}
/* The per-socket spinlock must be held here. */
-static inline int sk_add_backlog_limited(struct sock *sk, struct sk_buff *skb)
+static inline int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
{
if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1))
return -ENOBUFS;
- sk_add_backlog(sk, skb);
+ __sk_add_backlog(sk, skb);
sk->sk_backlog.len += skb->truesize;
return 0;
}
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -340,7 +340,7 @@ int sk_receive_skb(struct sock *sk, stru
rc = sk_backlog_rcv(sk, skb);
mutex_release(&sk->sk_lock.dep_map, 1, _RET_IP_);
- } else if (sk_add_backlog_limited(sk, skb)) {
+ } else if (sk_add_backlog(sk, skb)) {
bh_unlock_sock(sk);
atomic_inc(&sk->sk_drops);
goto discard_and_relse;
--- a/net/dccp/minisocks.c
+++ b/net/dccp/minisocks.c
@@ -254,7 +254,7 @@ int dccp_child_process(struct sock *pare
* in main socket hash table and lock on listening
* socket does not protect us more.
*/
- sk_add_backlog(child, skb);
+ __sk_add_backlog(child, skb);
}
bh_unlock_sock(child);
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -1677,7 +1677,7 @@ process:
if (!tcp_prequeue(sk, skb))
ret = tcp_v4_do_rcv(sk, skb);
}
- } else if (sk_add_backlog_limited(sk, skb)) {
+ } else if (sk_add_backlog(sk, skb)) {
bh_unlock_sock(sk);
goto discard_and_relse;
}
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -728,7 +728,7 @@ int tcp_child_process(struct sock *paren
* in main socket hash table and lock on listening
* socket does not protect us more.
*/
- sk_add_backlog(child, skb);
+ __sk_add_backlog(child, skb);
}
bh_unlock_sock(child);
--- a/net/ipv4/udp.c
+++ b/net/ipv4/udp.c
@@ -1372,7 +1372,7 @@ int udp_queue_rcv_skb(struct sock *sk, s
bh_lock_sock(sk);
if (!sock_owned_by_user(sk))
rc = __udp_queue_rcv_skb(sk, skb);
- else if (sk_add_backlog_limited(sk, skb)) {
+ else if (sk_add_backlog(sk, skb)) {
bh_unlock_sock(sk);
goto drop;
}
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1732,7 +1732,7 @@ process:
if (!tcp_prequeue(sk, skb))
ret = tcp_v6_do_rcv(sk, skb);
}
- } else if (sk_add_backlog_limited(sk, skb)) {
+ } else if (sk_add_backlog(sk, skb)) {
bh_unlock_sock(sk);
goto discard_and_relse;
}
--- a/net/ipv6/udp.c
+++ b/net/ipv6/udp.c
@@ -584,7 +584,7 @@ static void flush_stack(struct sock **st
bh_lock_sock(sk);
if (!sock_owned_by_user(sk))
udpv6_queue_rcv_skb(sk, skb1);
- else if (sk_add_backlog_limited(sk, skb1)) {
+ else if (sk_add_backlog(sk, skb1)) {
kfree_skb(skb1);
bh_unlock_sock(sk);
goto drop;
@@ -760,7 +760,7 @@ int __udp6_lib_rcv(struct sk_buff *skb,
bh_lock_sock(sk);
if (!sock_owned_by_user(sk))
udpv6_queue_rcv_skb(sk, skb);
- else if (sk_add_backlog_limited(sk, skb)) {
+ else if (sk_add_backlog(sk, skb)) {
atomic_inc(&sk->sk_drops);
bh_unlock_sock(sk);
sock_put(sk);
--- a/net/llc/llc_c_ac.c
+++ b/net/llc/llc_c_ac.c
@@ -1437,7 +1437,7 @@ static void llc_process_tmr_ev(struct so
llc_conn_state_process(sk, skb);
else {
llc_set_backlog_type(skb, LLC_EVENT);
- sk_add_backlog(sk, skb);
+ __sk_add_backlog(sk, skb);
}
}
}
--- a/net/llc/llc_conn.c
+++ b/net/llc/llc_conn.c
@@ -756,7 +756,7 @@ void llc_conn_handler(struct llc_sap *sa
else {
dprintk("%s: adding to backlog...\n", __func__);
llc_set_backlog_type(skb, LLC_PACKET);
- if (sk_add_backlog_limited(sk, skb))
+ if (sk_add_backlog(sk, skb))
goto drop_unlock;
}
out:
--- a/net/sctp/input.c
+++ b/net/sctp/input.c
@@ -341,7 +341,7 @@ int sctp_backlog_rcv(struct sock *sk, st
sctp_bh_lock_sock(sk);
if (sock_owned_by_user(sk)) {
- if (sk_add_backlog_limited(sk, skb))
+ if (sk_add_backlog(sk, skb))
sctp_chunk_free(chunk);
else
backloged = 1;
@@ -375,7 +375,7 @@ static int sctp_add_backlog(struct sock
struct sctp_ep_common *rcvr = chunk->rcvr;
int ret;
- ret = sk_add_backlog_limited(sk, skb);
+ ret = sk_add_backlog(sk, skb);
if (!ret) {
/* Hold the assoc/ep while hanging on the backlog queue.
* This way, we know structures we need will not disappear
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -1322,7 +1322,7 @@ static u32 dispatch(struct tipc_port *tp
if (!sock_owned_by_user(sk)) {
res = filter_rcv(sk, buf);
} else {
- if (sk_add_backlog_limited(sk, buf))
+ if (sk_add_backlog(sk, buf))
res = TIPC_ERR_OVERLOAD;
else
res = TIPC_OK;
--- a/net/x25/x25_dev.c
+++ b/net/x25/x25_dev.c
@@ -53,7 +53,7 @@ static int x25_receive_data(struct sk_bu
if (!sock_owned_by_user(sk)) {
queued = x25_process_rx_frame(sk, skb);
} else {
- queued = !sk_add_backlog_limited(sk, skb);
+ queued = !sk_add_backlog(sk, skb);
}
bh_unlock_sock(sk);
sock_put(sk);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [129/156] net: add __must_check to sk_add_backlog
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (127 preceding siblings ...)
2010-03-30 22:42 ` [128/156] net: backlog functions rename Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [130/156] bonding: fix device leak on error in bond_create() Greg KH
` (26 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Zhu Yi, David S. Miller,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Zhu Yi <yi.zhu@intel.com>
[ Upstream commit 4045635318538d3ddd2007720412fdc4b08f6a62 ]
Add the "__must_check" tag to sk_add_backlog() so that any failure to
check and drop packets will be warned about.
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/net/sock.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/net/sock.h
+++ b/include/net/sock.h
@@ -589,7 +589,7 @@ static inline void __sk_add_backlog(stru
}
/* The per-socket spinlock must be held here. */
-static inline int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
+static inline __must_check int sk_add_backlog(struct sock *sk, struct sk_buff *skb)
{
if (sk->sk_backlog.len >= max(sk->sk_backlog.limit, sk->sk_rcvbuf << 1))
return -ENOBUFS;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [130/156] bonding: fix device leak on error in bond_create()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (128 preceding siblings ...)
2010-03-30 22:42 ` [129/156] net: add __must_check to sk_add_backlog Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [131/156] e100: Fix ring parameter change handling regression Greg KH
` (25 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Patrick McHardy,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Patrick McHardy <kaber@trash.net>
[ Upstream commit 8d6184e4881b423522136aeb3ec1cbd9c35e8813 ]
When the register_netdevice() call fails, the newly allocated device is
not freed.
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/bonding/bond_main.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -4935,6 +4935,8 @@ int bond_create(struct net *net, const c
}
res = register_netdevice(bond_dev);
+ if (res < 0)
+ goto out_netdev;
out:
rtnl_unlock();
^ permalink raw reply [flat|nested] 432+ messages in thread
* [131/156] e100: Fix ring parameter change handling regression.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (129 preceding siblings ...)
2010-03-30 22:42 ` [130/156] bonding: fix device leak on error in bond_create() Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [132/156] ip_gre: include route header_len in max_headroom calculation Greg KH
` (24 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commit 211a0d941b1924e667483f822a55e2cc694cd212 ]
When the PCI pool changes were added to fix resume failures:
commit 98468efddb101f8a29af974101c17ba513b07be1
e100: Use pci pool to work around GFP_ATOMIC order 5 memory allocation failu
and
commit 70abc8cb90e679d8519721e2761d8366a18212a6
e100: Fix broken cbs accounting due to missing memset.
This introduced a problem that can happen if the TX ring size
is increased. We need to size the PCI pool using cbs->max
instead of the default cbs->count value.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/e100.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/e100.c
+++ b/drivers/net/e100.c
@@ -2854,7 +2854,7 @@ static int __devinit e100_probe(struct p
}
nic->cbs_pool = pci_pool_create(netdev->name,
nic->pdev,
- nic->params.cbs.count * sizeof(struct cb),
+ nic->params.cbs.max * sizeof(struct cb),
sizeof(u32),
0);
DPRINTK(PROBE, INFO, "addr 0x%llx, irq %d, MAC addr %pM\n",
^ permalink raw reply [flat|nested] 432+ messages in thread
* [132/156] ip_gre: include route header_len in max_headroom calculation
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (130 preceding siblings ...)
2010-03-30 22:42 ` [131/156] e100: Fix ring parameter change handling regression Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [133/156] ipsec: Fix bogus bundle flowi Greg KH
` (23 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Timo Teras, Herbert Xu,
David S. Miller, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1284 bytes --]
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Timo Teräs <timo.teras@iki.fi>
[ Upstream commit 243aad830e8a4cdda261626fbaeddde16b08d04a ]
Taking route's header_len into account, and updating gre device
needed_headroom will give better hints on upper bound of required
headroom. This is useful if the gre traffic is xfrm'ed.
Signed-off-by: Timo Teras <timo.teras@iki.fi>
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/ipv4/ip_gre.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -810,11 +810,13 @@ static netdev_tx_t ipgre_tunnel_xmit(str
tunnel->err_count = 0;
}
- max_headroom = LL_RESERVED_SPACE(tdev) + gre_hlen;
+ max_headroom = LL_RESERVED_SPACE(tdev) + gre_hlen + rt->u.dst.header_len;
if (skb_headroom(skb) < max_headroom || skb_shared(skb)||
(skb_cloned(skb) && !skb_clone_writable(skb, 0))) {
struct sk_buff *new_skb = skb_realloc_headroom(skb, max_headroom);
+ if (max_headroom > dev->needed_headroom)
+ dev->needed_headroom = max_headroom;
if (!new_skb) {
ip_rt_put(rt);
txq->tx_dropped++;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [133/156] ipsec: Fix bogus bundle flowi
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (131 preceding siblings ...)
2010-03-30 22:42 ` [132/156] ip_gre: include route header_len in max_headroom calculation Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [134/156] ipv4: check rt_genid in dst_check Greg KH
` (22 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Herbert Xu, Steffen Klassert,
Jamal Hadi Salim, David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Herbert Xu <herbert@gondor.apana.org.au>
[ Upstream commit 87c1e12b5eeb7b30b4b41291bef8e0b41fc3dde9 ]
When I merged the bundle creation code, I introduced a bogus
flowi value in the bundle. Instead of getting from the caller,
it was instead set to the flow in the route object, which is
totally different.
The end result is that the bundles we created never match, and
we instead end up with an ever growing bundle list.
Thanks to Jamal for find this problem.
Reported-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Steffen Klassert <steffen.klassert@secunet.com>
Acked-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/net/xfrm.h | 3 ++-
net/ipv4/xfrm4_policy.c | 5 +++--
net/ipv6/xfrm6_policy.c | 3 ++-
net/xfrm/xfrm_policy.c | 7 ++++---
4 files changed, 11 insertions(+), 7 deletions(-)
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -274,7 +274,8 @@ struct xfrm_policy_afinfo {
struct dst_entry *dst,
int nfheader_len);
int (*fill_dst)(struct xfrm_dst *xdst,
- struct net_device *dev);
+ struct net_device *dev,
+ struct flowi *fl);
};
extern int xfrm_policy_register_afinfo(struct xfrm_policy_afinfo *afinfo);
--- a/net/ipv4/xfrm4_policy.c
+++ b/net/ipv4/xfrm4_policy.c
@@ -91,11 +91,12 @@ static int xfrm4_init_path(struct xfrm_d
return 0;
}
-static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
+static int xfrm4_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
+ struct flowi *fl)
{
struct rtable *rt = (struct rtable *)xdst->route;
- xdst->u.rt.fl = rt->fl;
+ xdst->u.rt.fl = *fl;
xdst->u.dst.dev = dev;
dev_hold(dev);
--- a/net/ipv6/xfrm6_policy.c
+++ b/net/ipv6/xfrm6_policy.c
@@ -116,7 +116,8 @@ static int xfrm6_init_path(struct xfrm_d
return 0;
}
-static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
+static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
+ struct flowi *fl)
{
struct rt6_info *rt = (struct rt6_info*)xdst->route;
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -1354,7 +1354,8 @@ static inline int xfrm_init_path(struct
return err;
}
-static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev)
+static inline int xfrm_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,
+ struct flowi *fl)
{
struct xfrm_policy_afinfo *afinfo =
xfrm_policy_get_afinfo(xdst->u.dst.ops->family);
@@ -1363,7 +1364,7 @@ static inline int xfrm_fill_dst(struct x
if (!afinfo)
return -EINVAL;
- err = afinfo->fill_dst(xdst, dev);
+ err = afinfo->fill_dst(xdst, dev, fl);
xfrm_policy_put_afinfo(afinfo);
@@ -1468,7 +1469,7 @@ static struct dst_entry *xfrm_bundle_cre
for (dst_prev = dst0; dst_prev != dst; dst_prev = dst_prev->child) {
struct xfrm_dst *xdst = (struct xfrm_dst *)dst_prev;
- err = xfrm_fill_dst(xdst, dev);
+ err = xfrm_fill_dst(xdst, dev, fl);
if (err)
goto free_dst;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [134/156] ipv4: check rt_genid in dst_check
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (132 preceding siblings ...)
2010-03-30 22:42 ` [133/156] ipsec: Fix bogus bundle flowi Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [135/156] ipv4: Dont drop redirected route cache entry unless PTMU actually expired Greg KH
` (21 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Timo Teras, Herbert Xu,
David S. Miller, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3040 bytes --]
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Timo Teräs <timo.teras@iki.fi>
[ Upstream commit d11a4dc18bf41719c9f0d7ed494d295dd2973b92 ]
Xfrm_dst keeps a reference to ipv4 rtable entries on each
cached bundle. The only way to renew xfrm_dst when the underlying
route has changed, is to implement dst_check for this. This is
what ipv6 side does too.
The problems started after 87c1e12b5eeb7b30b4b41291bef8e0b41fc3dde9
("ipsec: Fix bogus bundle flowi") which fixed a bug causing xfrm_dst
to not get reused, until that all lookups always generated new
xfrm_dst with new route reference and path mtu worked. But after the
fix, the old routes started to get reused even after they were expired
causing pmtu to break (well it would occationally work if the rtable
gc had run recently and marked the route obsolete causing dst_check to
get called).
Signed-off-by: Timo Teras <timo.teras@iki.fi>
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/ipv4/route.c | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1415,7 +1415,7 @@ void ip_rt_redirect(__be32 old_gw, __be3
dev_hold(rt->u.dst.dev);
if (rt->idev)
in_dev_hold(rt->idev);
- rt->u.dst.obsolete = 0;
+ rt->u.dst.obsolete = -1;
rt->u.dst.lastuse = jiffies;
rt->u.dst.path = &rt->u.dst;
rt->u.dst.neighbour = NULL;
@@ -1480,7 +1480,7 @@ static struct dst_entry *ipv4_negative_a
struct dst_entry *ret = dst;
if (rt) {
- if (dst->obsolete) {
+ if (dst->obsolete > 0) {
ip_rt_put(rt);
ret = NULL;
} else if ((rt->rt_flags & RTCF_REDIRECTED) ||
@@ -1700,7 +1700,9 @@ static void ip_rt_update_pmtu(struct dst
static struct dst_entry *ipv4_dst_check(struct dst_entry *dst, u32 cookie)
{
- return NULL;
+ if (rt_is_expired((struct rtable *)dst))
+ return NULL;
+ return dst;
}
static void ipv4_dst_destroy(struct dst_entry *dst)
@@ -1862,7 +1864,8 @@ static int ip_route_input_mc(struct sk_b
if (!rth)
goto e_nobufs;
- rth->u.dst.output= ip_rt_bug;
+ rth->u.dst.output = ip_rt_bug;
+ rth->u.dst.obsolete = -1;
atomic_set(&rth->u.dst.__refcnt, 1);
rth->u.dst.flags= DST_HOST;
@@ -2023,6 +2026,7 @@ static int __mkroute_input(struct sk_buf
rth->fl.oif = 0;
rth->rt_spec_dst= spec_dst;
+ rth->u.dst.obsolete = -1;
rth->u.dst.input = ip_forward;
rth->u.dst.output = ip_output;
rth->rt_genid = rt_genid(dev_net(rth->u.dst.dev));
@@ -2187,6 +2191,7 @@ local_input:
goto e_nobufs;
rth->u.dst.output= ip_rt_bug;
+ rth->u.dst.obsolete = -1;
rth->rt_genid = rt_genid(net);
atomic_set(&rth->u.dst.__refcnt, 1);
@@ -2413,6 +2418,7 @@ static int __mkroute_output(struct rtabl
rth->rt_spec_dst= fl->fl4_src;
rth->u.dst.output=ip_output;
+ rth->u.dst.obsolete = -1;
rth->rt_genid = rt_genid(dev_net(dev_out));
RT_CACHE_STAT_INC(out_slow_tot);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [135/156] ipv4: Dont drop redirected route cache entry unless PTMU actually expired
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (133 preceding siblings ...)
2010-03-30 22:42 ` [134/156] ipv4: check rt_genid in dst_check Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [136/156] ipv6: Dont drop cache route entry unless timer " Greg KH
` (20 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Guenter Roeck,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Guenter Roeck <guenter.roeck@ericsson.com>
[ Upstream commit 5e016cbf6cffd4a53b7922e0c91b775399d7fe47 ]
TCP sessions over IPv4 can get stuck if routers between endpoints
do not fragment packets but implement PMTU instead, and we are using
those routers because of an ICMP redirect.
Setup is as follows
MTU1 MTU2 MTU1
A--------B------C------D
with MTU1 > MTU2. A and D are endpoints, B and C are routers. B and C
implement PMTU and drop packets larger than MTU2 (for example because
DF is set on all packets). TCP sessions are initiated between A and D.
There is packet loss between A and D, causing frequent TCP
retransmits.
After the number of retransmits on a TCP session reaches tcp_retries1,
tcp calls dst_negative_advice() prior to each retransmit. This results
in route cache entries for the peer to be deleted in
ipv4_negative_advice() if the Path MTU is set.
If the outstanding data on an affected TCP session is larger than
MTU2, packets sent from the endpoints will be dropped by B or C, and
ICMP NEEDFRAG will be returned. A and D receive NEEDFRAG messages and
update PMTU.
Before the next retransmit, tcp will again call dst_negative_advice(),
causing the route cache entry (with correct PMTU) to be deleted. The
retransmitted packet will be larger than MTU2, causing it to be
dropped again.
This sequence repeats until the TCP session aborts or is terminated.
Problem is fixed by removing redirected route cache entries in
ipv4_negative_advice() only if the PMTU is expired.
Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv4/route.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -1484,7 +1484,8 @@ static struct dst_entry *ipv4_negative_a
ip_rt_put(rt);
ret = NULL;
} else if ((rt->rt_flags & RTCF_REDIRECTED) ||
- rt->u.dst.expires) {
+ (rt->u.dst.expires &&
+ time_after_eq(jiffies, rt->u.dst.expires))) {
unsigned hash = rt_hash(rt->fl.fl4_dst, rt->fl.fl4_src,
rt->fl.oif,
rt_genid(dev_net(dst->dev)));
^ permalink raw reply [flat|nested] 432+ messages in thread
* [136/156] ipv6: Dont drop cache route entry unless timer actually expired.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (134 preceding siblings ...)
2010-03-30 22:42 ` [135/156] ipv4: Dont drop redirected route cache entry unless PTMU actually expired Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [137/156] NET_DMA: free skbs periodically Greg KH
` (19 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, YOSHIFUJI Hideaki,
David S. Miller, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
[ Upstream commit 54c1a859efd9fd6cda05bc700315ba2519c14eba ]
This is ipv6 variant of the commit 5e016cbf6.. ("ipv4: Don't drop
redirected route cache entry unless PTMU actually expired")
by Guenter Roeck <guenter.roeck@ericsson.com>.
Remove cache route entry in ipv6_negative_advice() only if
the timer is expired.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv6/route.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -897,12 +897,17 @@ static struct dst_entry *ip6_negative_ad
struct rt6_info *rt = (struct rt6_info *) dst;
if (rt) {
- if (rt->rt6i_flags & RTF_CACHE)
- ip6_del_rt(rt);
- else
+ if (rt->rt6i_flags & RTF_CACHE) {
+ if (rt6_check_expired(rt)) {
+ ip6_del_rt(rt);
+ dst = NULL;
+ }
+ } else {
dst_release(dst);
+ dst = NULL;
+ }
}
- return NULL;
+ return dst;
}
static void ip6_link_failure(struct sk_buff *skb)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [137/156] NET_DMA: free skbs periodically
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (135 preceding siblings ...)
2010-03-30 22:42 ` [136/156] ipv6: Dont drop cache route entry unless timer " Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [138/156] netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err() Greg KH
` (18 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Steven J. Magnani,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Steven J. Magnani <steve@digidescorp.com>
[ Upstream commit 73852e8151b7d7a529fbe019ab6d2d0c02d8f3f2 ]
Under NET_DMA, data transfer can grind to a halt when userland issues a
large read on a socket with a high RCVLOWAT (i.e., 512 KB for both).
This appears to be because the NET_DMA design queues up lots of memcpy
operations, but doesn't issue or wait for them (and thus free the
associated skbs) until it is time for tcp_recvmesg() to return.
The socket hangs when its TCP window goes to zero before enough data is
available to satisfy the read.
Periodically issue asynchronous memcpy operations, and free skbs for ones
that have completed, to prevent sockets from going into zero-window mode.
Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv4/tcp.c | 63 ++++++++++++++++++++++++++++++++++++++-------------------
1 file changed, 43 insertions(+), 20 deletions(-)
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -1254,6 +1254,39 @@ static void tcp_prequeue_process(struct
tp->ucopy.memory = 0;
}
+#ifdef CONFIG_NET_DMA
+static void tcp_service_net_dma(struct sock *sk, bool wait)
+{
+ dma_cookie_t done, used;
+ dma_cookie_t last_issued;
+ struct tcp_sock *tp = tcp_sk(sk);
+
+ if (!tp->ucopy.dma_chan)
+ return;
+
+ last_issued = tp->ucopy.dma_cookie;
+ dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
+
+ do {
+ if (dma_async_memcpy_complete(tp->ucopy.dma_chan,
+ last_issued, &done,
+ &used) == DMA_SUCCESS) {
+ /* Safe to free early-copied skbs now */
+ __skb_queue_purge(&sk->sk_async_wait_queue);
+ break;
+ } else {
+ struct sk_buff *skb;
+ while ((skb = skb_peek(&sk->sk_async_wait_queue)) &&
+ (dma_async_is_complete(skb->dma_cookie, done,
+ used) == DMA_SUCCESS)) {
+ __skb_dequeue(&sk->sk_async_wait_queue);
+ kfree_skb(skb);
+ }
+ }
+ } while (wait);
+}
+#endif
+
static inline struct sk_buff *tcp_recv_skb(struct sock *sk, u32 seq, u32 *off)
{
struct sk_buff *skb;
@@ -1546,6 +1579,10 @@ int tcp_recvmsg(struct kiocb *iocb, stru
/* __ Set realtime policy in scheduler __ */
}
+#ifdef CONFIG_NET_DMA
+ if (tp->ucopy.dma_chan)
+ dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
+#endif
if (copied >= target) {
/* Do not sleep, just process backlog. */
release_sock(sk);
@@ -1554,6 +1591,7 @@ int tcp_recvmsg(struct kiocb *iocb, stru
sk_wait_data(sk, &timeo);
#ifdef CONFIG_NET_DMA
+ tcp_service_net_dma(sk, false); /* Don't block */
tp->ucopy.wakeup = 0;
#endif
@@ -1633,6 +1671,9 @@ do_prequeue:
copied = -EFAULT;
break;
}
+
+ dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
+
if ((offset + used) == skb->len)
copied_early = 1;
@@ -1702,27 +1743,9 @@ skip_copy:
}
#ifdef CONFIG_NET_DMA
- if (tp->ucopy.dma_chan) {
- dma_cookie_t done, used;
-
- dma_async_memcpy_issue_pending(tp->ucopy.dma_chan);
-
- while (dma_async_memcpy_complete(tp->ucopy.dma_chan,
- tp->ucopy.dma_cookie, &done,
- &used) == DMA_IN_PROGRESS) {
- /* do partial cleanup of sk_async_wait_queue */
- while ((skb = skb_peek(&sk->sk_async_wait_queue)) &&
- (dma_async_is_complete(skb->dma_cookie, done,
- used) == DMA_SUCCESS)) {
- __skb_dequeue(&sk->sk_async_wait_queue);
- kfree_skb(skb);
- }
- }
+ tcp_service_net_dma(sk, true); /* Wait for queue to drain */
+ tp->ucopy.dma_chan = NULL;
- /* Safe to free early-copied skbs now */
- __skb_queue_purge(&sk->sk_async_wait_queue);
- tp->ucopy.dma_chan = NULL;
- }
if (tp->ucopy.pinned_list) {
dma_unpin_iovec_pages(tp->ucopy.pinned_list);
tp->ucopy.pinned_list = NULL;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [138/156] netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (136 preceding siblings ...)
2010-03-30 22:42 ` [137/156] NET_DMA: free skbs periodically Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [139/156] netfilter: ctnetlink: fix reliable event delivery if message building fails Greg KH
` (17 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Pablo Neira Ayuso,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Pablo Neira Ayuso <pablo@netfilter.org>
[ Upstream commit 1a50307ba1826e4da0024e64b245ce4eadf7688a ]
Currently, ENOBUFS errors are reported to the socket via
netlink_set_err() even if NETLINK_RECV_NO_ENOBUFS is set. However,
that should not happen. This fixes this problem and it changes the
prototype of netlink_set_err() to return the number of sockets that
have set the NETLINK_RECV_NO_ENOBUFS socket option. This return
value is used in the next patch in these bugfix series.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/netlink.h | 2 +-
net/netlink/af_netlink.c | 17 ++++++++++++++---
2 files changed, 15 insertions(+), 4 deletions(-)
--- a/include/linux/netlink.h
+++ b/include/linux/netlink.h
@@ -188,7 +188,7 @@ extern int netlink_has_listeners(struct
extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
__u32 group, gfp_t allocation);
-extern void netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
+extern int netlink_set_err(struct sock *ssk, __u32 pid, __u32 group, int code);
extern int netlink_register_notifier(struct notifier_block *nb);
extern int netlink_unregister_notifier(struct notifier_block *nb);
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -1093,6 +1093,7 @@ static inline int do_one_set_err(struct
struct netlink_set_err_data *p)
{
struct netlink_sock *nlk = nlk_sk(sk);
+ int ret = 0;
if (sk == p->exclude_sk)
goto out;
@@ -1104,10 +1105,15 @@ static inline int do_one_set_err(struct
!test_bit(p->group - 1, nlk->groups))
goto out;
+ if (p->code == ENOBUFS && nlk->flags & NETLINK_RECV_NO_ENOBUFS) {
+ ret = 1;
+ goto out;
+ }
+
sk->sk_err = p->code;
sk->sk_error_report(sk);
out:
- return 0;
+ return ret;
}
/**
@@ -1116,12 +1122,16 @@ out:
* @pid: the PID of a process that we want to skip (if any)
* @groups: the broadcast group that will notice the error
* @code: error code, must be negative (as usual in kernelspace)
+ *
+ * This function returns the number of broadcast listeners that have set the
+ * NETLINK_RECV_NO_ENOBUFS socket option.
*/
-void netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code)
+int netlink_set_err(struct sock *ssk, u32 pid, u32 group, int code)
{
struct netlink_set_err_data info;
struct hlist_node *node;
struct sock *sk;
+ int ret = 0;
info.exclude_sk = ssk;
info.pid = pid;
@@ -1132,9 +1142,10 @@ void netlink_set_err(struct sock *ssk, u
read_lock(&nl_table_lock);
sk_for_each_bound(sk, node, &nl_table[ssk->sk_protocol].mc_list)
- do_one_set_err(sk, &info);
+ ret += do_one_set_err(sk, &info);
read_unlock(&nl_table_lock);
+ return ret;
}
EXPORT_SYMBOL(netlink_set_err);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [139/156] netfilter: ctnetlink: fix reliable event delivery if message building fails
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (137 preceding siblings ...)
2010-03-30 22:42 ` [138/156] netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err() Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [140/156] netlink: fix unaligned access in nla_get_be64() Greg KH
` (16 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Pablo Neira Ayuso,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Pablo Neira Ayuso <pablo@netfilter.org>
[ Upstream commit 37b7ef7203240b3aba577bb1ff6765fe15225976 ]
This patch fixes a bug that allows to lose events when reliable
event delivery mode is used, ie. if NETLINK_BROADCAST_SEND_ERROR
and NETLINK_RECV_NO_ENOBUFS socket options are set.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/netfilter/nfnetlink.h | 2 +-
net/netfilter/nf_conntrack_netlink.c | 3 ++-
net/netfilter/nfnetlink.c | 4 ++--
3 files changed, 5 insertions(+), 4 deletions(-)
--- a/include/linux/netfilter/nfnetlink.h
+++ b/include/linux/netfilter/nfnetlink.h
@@ -76,7 +76,7 @@ extern int nfnetlink_subsys_unregister(c
extern int nfnetlink_has_listeners(unsigned int group);
extern int nfnetlink_send(struct sk_buff *skb, u32 pid, unsigned group,
int echo, gfp_t flags);
-extern void nfnetlink_set_err(u32 pid, u32 group, int error);
+extern int nfnetlink_set_err(u32 pid, u32 group, int error);
extern int nfnetlink_unicast(struct sk_buff *skb, u_int32_t pid, int flags);
extern void nfnl_lock(void);
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -571,7 +571,8 @@ nla_put_failure:
nlmsg_failure:
kfree_skb(skb);
errout:
- nfnetlink_set_err(0, group, -ENOBUFS);
+ if (nfnetlink_set_err(0, group, -ENOBUFS) > 0)
+ return -ENOBUFS;
return 0;
}
#endif /* CONFIG_NF_CONNTRACK_EVENTS */
--- a/net/netfilter/nfnetlink.c
+++ b/net/netfilter/nfnetlink.c
@@ -114,9 +114,9 @@ int nfnetlink_send(struct sk_buff *skb,
}
EXPORT_SYMBOL_GPL(nfnetlink_send);
-void nfnetlink_set_err(u32 pid, u32 group, int error)
+int nfnetlink_set_err(u32 pid, u32 group, int error)
{
- netlink_set_err(nfnl, pid, group, error);
+ return netlink_set_err(nfnl, pid, group, error);
}
EXPORT_SYMBOL_GPL(nfnetlink_set_err);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [140/156] netlink: fix unaligned access in nla_get_be64()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (138 preceding siblings ...)
2010-03-30 22:42 ` [139/156] netfilter: ctnetlink: fix reliable event delivery if message building fails Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [141/156] r8169: offical fix for CVE-2009-4537 (overlength frame DMAs) Greg KH
` (15 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Pablo Neira Ayuso,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Pablo Neira Ayuso <pablo@netfilter.org>
[ Upstream commit f5d410f2ea7ba340f11815a56e05b9fa9421c421 ]
This patch fixes a unaligned access in nla_get_be64() that was
introduced by myself in a17c859849402315613a0015ac8fbf101acf0cc1.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/net/netlink.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/include/net/netlink.h
+++ b/include/net/netlink.h
@@ -945,7 +945,11 @@ static inline u64 nla_get_u64(const stru
*/
static inline __be64 nla_get_be64(const struct nlattr *nla)
{
- return *(__be64 *) nla_data(nla);
+ __be64 tmp;
+
+ nla_memcpy(&tmp, nla, sizeof(tmp));
+
+ return tmp;
}
/**
^ permalink raw reply [flat|nested] 432+ messages in thread
* [141/156] r8169: offical fix for CVE-2009-4537 (overlength frame DMAs)
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (139 preceding siblings ...)
2010-03-30 22:42 ` [140/156] netlink: fix unaligned access in nla_get_be64() Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [142/156] net: Potential null skb->dev dereference Greg KH
` (14 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Neil Horman, David S. Miller,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Neil Horman <nhorman@redhat.com>
[ Upstream commit c0cd884af045338476b8e69a61fceb3f34ff22f1 ]
Official patch to fix the r8169 frame length check error.
Based on this initial thread:
http://marc.info/?l=linux-netdev&m=126202972828626&w=1
This is the official patch to fix the frame length problems in the r8169
driver. As noted in the previous thread, while this patch incurs a performance
hit on the driver, its possible to improve performance dynamically by updating
the mtu and rx_copybreak values at runtime to return performance to what it was
for those NICS which are unaffected by the ideosyncracy (if there are any).
Summary:
A while back Eric submitted a patch for r8169 in which the proper
allocated frame size was written to RXMaxSize to prevent the NIC from dmaing too
much data. This was done in commit fdd7b4c3302c93f6833e338903ea77245eb510b4. A
long time prior to that however, Francois posted
126fa4b9ca5d9d7cb7d46f779ad3bd3631ca387c, which expiclitly disabled the MaxSize
setting due to the fact that the hardware behaved in odd ways when overlong
frames were received on NIC's supported by this driver. This was mentioned in a
security conference recently:
http://events.ccc.de/congress/2009/Fahrplan//events/3596.en.html
It seems that if we can't enable frame size filtering, then, as Eric correctly
noticed, we can find ourselves DMA-ing too much data to a buffer, causing
corruption. As a result is seems that we are forced to allocate a frame which
is ready to handle a maximally sized receive.
This obviously has performance issues with it, so to mitigate that issue, this
patch does two things:
1) Raises the copybreak value to the frame allocation size, which should force
appropriately sized packets to get allocated on rx, rather than a full new 16k
buffer.
2) This patch only disables frame filtering initially (i.e., during the NIC
open), changing the MTU results in ring buffer allocation of a size in relation
to the new mtu (along with a warning indicating that this is dangerous).
Because of item (2), individuals who can't cope with the performance hit (or can
otherwise filter frames to prevent the bug), or who have hardware they are sure
is unaffected by this issue, can manually lower the copybreak and reset the mtu
such that performance is restored easily.
Signed-off-by: Neil Horman <nhorman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/r8169.c | 29 ++++++++++++++++++++++++-----
1 file changed, 24 insertions(+), 5 deletions(-)
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -186,7 +186,12 @@ static struct pci_device_id rtl8169_pci_
MODULE_DEVICE_TABLE(pci, rtl8169_pci_tbl);
-static int rx_copybreak = 200;
+/*
+ * we set our copybreak very high so that we don't have
+ * to allocate 16k frames all the time (see note in
+ * rtl8169_open()
+ */
+static int rx_copybreak = 16383;
static int use_dac;
static struct {
u32 msg_enable;
@@ -3245,9 +3250,13 @@ static void __devexit rtl8169_remove_one
}
static void rtl8169_set_rxbufsize(struct rtl8169_private *tp,
- struct net_device *dev)
+ unsigned int mtu)
{
- unsigned int max_frame = dev->mtu + VLAN_ETH_HLEN + ETH_FCS_LEN;
+ unsigned int max_frame = mtu + VLAN_ETH_HLEN + ETH_FCS_LEN;
+
+ if (max_frame != 16383)
+ printk(KERN_WARNING "WARNING! Changing of MTU on this NIC"
+ "May lead to frame reception errors!\n");
tp->rx_buf_sz = (max_frame > RX_BUF_SIZE) ? max_frame : RX_BUF_SIZE;
}
@@ -3259,7 +3268,17 @@ static int rtl8169_open(struct net_devic
int retval = -ENOMEM;
- rtl8169_set_rxbufsize(tp, dev);
+ /*
+ * Note that we use a magic value here, its wierd I know
+ * its done because, some subset of rtl8169 hardware suffers from
+ * a problem in which frames received that are longer than
+ * the size set in RxMaxSize register return garbage sizes
+ * when received. To avoid this we need to turn off filtering,
+ * which is done by setting a value of 16383 in the RxMaxSize register
+ * and allocating 16k frames to handle the largest possible rx value
+ * thats what the magic math below does.
+ */
+ rtl8169_set_rxbufsize(tp, 16383 - VLAN_ETH_HLEN - ETH_FCS_LEN);
/*
* Rx and Tx desscriptors needs 256 bytes alignment.
@@ -3912,7 +3931,7 @@ static int rtl8169_change_mtu(struct net
rtl8169_down(dev);
- rtl8169_set_rxbufsize(tp, dev);
+ rtl8169_set_rxbufsize(tp, dev->mtu);
ret = rtl8169_init_ring(dev);
if (ret < 0)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [142/156] net: Potential null skb->dev dereference
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (140 preceding siblings ...)
2010-03-30 22:42 ` [141/156] r8169: offical fix for CVE-2009-4537 (overlength frame DMAs) Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [143/156] skbuff: remove unused dma_head & dma_maps fields Greg KH
` (13 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric Dumazet,
David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric Dumazet <eric.dumazet@gmail.com>
[ Upstream commit 0641e4fbf2f824faee00ea74c459a088d94905fd ]
When doing "ifenslave -d bond0 eth0", there is chance to get NULL
dereference in netif_receive_skb(), because dev->master suddenly becomes
NULL after we tested it.
We should use ACCESS_ONCE() to avoid this (or rcu_dereference())
Signed-off-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>
---
include/linux/netdevice.h | 8 ++++----
net/8021q/vlan_core.c | 4 ++--
net/core/dev.c | 8 +++++---
3 files changed, 11 insertions(+), 9 deletions(-)
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2023,12 +2023,12 @@ static inline void skb_bond_set_mac_by_m
* duplicates except for 802.3ad ETH_P_SLOW, alb non-mcast/bcast, and
* ARP on active-backup slaves with arp_validate enabled.
*/
-static inline int skb_bond_should_drop(struct sk_buff *skb)
+static inline int skb_bond_should_drop(struct sk_buff *skb,
+ struct net_device *master)
{
- struct net_device *dev = skb->dev;
- struct net_device *master = dev->master;
-
if (master) {
+ struct net_device *dev = skb->dev;
+
if (master->priv_flags & IFF_MASTER_ARPMON)
dev->last_rx = jiffies;
--- a/net/8021q/vlan_core.c
+++ b/net/8021q/vlan_core.c
@@ -11,7 +11,7 @@ int __vlan_hwaccel_rx(struct sk_buff *sk
if (netpoll_rx(skb))
return NET_RX_DROP;
- if (skb_bond_should_drop(skb))
+ if (skb_bond_should_drop(skb, ACCESS_ONCE(skb->dev->master)))
goto drop;
__vlan_hwaccel_put_tag(skb, vlan_tci);
@@ -82,7 +82,7 @@ vlan_gro_common(struct napi_struct *napi
{
struct sk_buff *p;
- if (skb_bond_should_drop(skb))
+ if (skb_bond_should_drop(skb, ACCESS_ONCE(skb->dev->master)))
goto drop;
__vlan_hwaccel_put_tag(skb, vlan_tci);
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2421,6 +2421,7 @@ int netif_receive_skb(struct sk_buff *sk
{
struct packet_type *ptype, *pt_prev;
struct net_device *orig_dev;
+ struct net_device *master;
struct net_device *null_or_orig;
int ret = NET_RX_DROP;
__be16 type;
@@ -2440,11 +2441,12 @@ int netif_receive_skb(struct sk_buff *sk
null_or_orig = NULL;
orig_dev = skb->dev;
- if (orig_dev->master) {
- if (skb_bond_should_drop(skb))
+ master = ACCESS_ONCE(orig_dev->master);
+ if (master) {
+ if (skb_bond_should_drop(skb, master))
null_or_orig = orig_dev; /* deliver only exact match */
else
- skb->dev = orig_dev->master;
+ skb->dev = master;
}
__get_cpu_var(netdev_rx_stat).total++;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [143/156] skbuff: remove unused dma_head & dma_maps fields
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (141 preceding siblings ...)
2010-03-30 22:42 ` [142/156] net: Potential null skb->dev dereference Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [144/156] tcp: Fix tcp_mark_head_lost() with packets == 0 Greg KH
` (12 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alexander Duyck,
Jeff Kirsher, Eric Dumazet, David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alexander Duyck <alexander.h.duyck@intel.com>
[ Upstream commit 03e6d819c2cb2cc8ce5642669a0a7c72336ee7a2 ]
The dma map fields in the skb_shared_info structure no longer has any users
and can be dropped since it is making the skb_shared_info unecessarily larger.
Running slabtop show that we were using 4K slabs for the skb->head on x86_64 w/
an allocation size of 1522. It turns out that the dma_head and dma_maps array
made skb_shared large enough that we had crossed over the 2k boundary with
standard frames and as such we were using 4k blocks of memory for all skbs.
Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@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>
---
include/linux/skbuff.h | 6 ------
1 file changed, 6 deletions(-)
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -190,9 +190,6 @@ struct skb_shared_info {
atomic_t dataref;
unsigned short nr_frags;
unsigned short gso_size;
-#ifdef CONFIG_HAS_DMA
- dma_addr_t dma_head;
-#endif
/* Warning: this field is not always filled in (UFO)! */
unsigned short gso_segs;
unsigned short gso_type;
@@ -201,9 +198,6 @@ struct skb_shared_info {
struct sk_buff *frag_list;
struct skb_shared_hwtstamps hwtstamps;
skb_frag_t frags[MAX_SKB_FRAGS];
-#ifdef CONFIG_HAS_DMA
- dma_addr_t dma_maps[MAX_SKB_FRAGS];
-#endif
/* Intermediate layers must ensure that destructor_arg
* remains valid until skb destructor */
void * destructor_arg;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [144/156] tcp: Fix tcp_mark_head_lost() with packets == 0
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (142 preceding siblings ...)
2010-03-30 22:42 ` [143/156] skbuff: remove unused dma_head & dma_maps fields Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:42 ` [145/156] tcp: Fix OOB POLLIN avoidance Greg KH
` (11 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Lennart Schulte,
Arnd Hannemann, David S. Miller, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
[ Upstream commit 6830c25b7d08fbbd922959425193791bc42079f2 ]
A packet is marked as lost in case packets == 0, although nothing should be done.
This results in a too early retransmitted packet during recovery in some cases.
This small patch fixes this issue by returning immediately.
Signed-off-by: Lennart Schulte <lennart.schulte@nets.rwth-aachen.de>
Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv4/tcp_input.c | 3 +++
1 file changed, 3 insertions(+)
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2499,6 +2499,9 @@ static void tcp_mark_head_lost(struct so
int err;
unsigned int mss;
+ if (packets == 0)
+ return;
+
WARN_ON(packets > tp->packets_out);
if (tp->lost_skb_hint) {
skb = tp->lost_skb_hint;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [145/156] tcp: Fix OOB POLLIN avoidance.
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (143 preceding siblings ...)
2010-03-30 22:42 ` [144/156] tcp: Fix tcp_mark_head_lost() with packets == 0 Greg KH
@ 2010-03-30 22:42 ` Greg KH
2010-03-30 22:43 ` [146/156] tcp: Fix tcp_make_synack() Greg KH
` (10 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:42 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alexandra Kossovsky <Alexandra.Kossovsky@oktetlabs.ru>
[ Upstream commit b634f87522dff87712df8bda2a6c9061954d552a ]
From: Alexandra.Kossovsky@oktetlabs.ru
Fixes kernel bugzilla #15541
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv4/tcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -429,7 +429,7 @@ unsigned int tcp_poll(struct file *file,
if (tp->urg_seq == tp->copied_seq &&
!sock_flag(sk, SOCK_URGINLINE) &&
tp->urg_data)
- target--;
+ target++;
/* Potential race condition. If read of tp below will
* escape above sk->sk_state, we can be illegally awaken
^ permalink raw reply [flat|nested] 432+ messages in thread
* [146/156] tcp: Fix tcp_make_synack()
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (144 preceding siblings ...)
2010-03-30 22:42 ` [145/156] tcp: Fix OOB POLLIN avoidance Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [147/156] quota: manage reserved space when quota is not active [v2] Greg KH
` (9 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric Dumazet,
David S. Miller, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2230 bytes --]
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric Dumazet <eric.dumazet@gmail.com>
[ Upstream commit 28b2774a0d5852236dab77a4147b8b88548110f1 ]
Commit 4957faad (TCPCT part 1g: Responder Cookie => Initiator), part
of TCP_COOKIE_TRANSACTION implementation, forgot to correctly size
synack skb in case user data must be included.
Many thanks to Mika Pentillä for spotting this error.
Reported-by: Penttillä Mika <mika.penttila@ixonos.com>
Signed-off-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/ipv4/tcp_output.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/net/ipv4/tcp_output.c
+++ b/net/ipv4/tcp_output.c
@@ -2393,13 +2393,17 @@ struct sk_buff *tcp_make_synack(struct s
struct tcp_extend_values *xvp = tcp_xv(rvp);
struct inet_request_sock *ireq = inet_rsk(req);
struct tcp_sock *tp = tcp_sk(sk);
+ const struct tcp_cookie_values *cvp = tp->cookie_values;
struct tcphdr *th;
struct sk_buff *skb;
struct tcp_md5sig_key *md5;
int tcp_header_size;
int mss;
+ int s_data_desired = 0;
- skb = sock_wmalloc(sk, MAX_TCP_HEADER + 15, 1, GFP_ATOMIC);
+ if (cvp != NULL && cvp->s_data_constant && cvp->s_data_desired)
+ s_data_desired = cvp->s_data_desired;
+ skb = sock_wmalloc(sk, MAX_TCP_HEADER + 15 + s_data_desired, 1, GFP_ATOMIC);
if (skb == NULL)
return NULL;
@@ -2454,16 +2458,12 @@ struct sk_buff *tcp_make_synack(struct s
TCPCB_FLAG_SYN | TCPCB_FLAG_ACK);
if (OPTION_COOKIE_EXTENSION & opts.options) {
- const struct tcp_cookie_values *cvp = tp->cookie_values;
-
- if (cvp != NULL &&
- cvp->s_data_constant &&
- cvp->s_data_desired > 0) {
- u8 *buf = skb_put(skb, cvp->s_data_desired);
+ if (s_data_desired) {
+ u8 *buf = skb_put(skb, s_data_desired);
/* copy data directly from the listening socket. */
- memcpy(buf, cvp->s_data_payload, cvp->s_data_desired);
- TCP_SKB_CB(skb)->end_seq += cvp->s_data_desired;
+ memcpy(buf, cvp->s_data_payload, s_data_desired);
+ TCP_SKB_CB(skb)->end_seq += s_data_desired;
}
if (opts.hash_size > 0) {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [147/156] quota: manage reserved space when quota is not active [v2]
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (145 preceding siblings ...)
2010-03-30 22:43 ` [146/156] tcp: Fix tcp_make_synack() Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [148/156] quota: Fix warning when a delayed write happens before quota is enabled Greg KH
` (8 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dmitry Monakhov, Jan Kara,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dmitry Monakhov <dmonakhov@openvz.org>
commit c469070aea5a0ada45a836937c776fd3083dae2b upstream.
Since we implemented generic reserved space management interface,
then it is possible to account reserved space even when quota
is not active (similar to i_blocks/i_bytes).
Without this patch following testcase result in massive comlain from
WARN_ON in dquot_claim_space()
TEST_CASE:
mount /dev/sdb /mnt -oquota
dd if=/dev/zero of=/mnt/test bs=1M count=1
quotaon /mnt
# fs_reserved_spave == 1Mb
# quota_reserved_space == 0, because quota was disabled
dd if=/dev/zero of=/mnt/test seek=1 bs=1M count=1
# fs_reserved_spave == 2Mb
# quota_reserved_space == 1Mb
sync # ->dquot_claim_space() -> WARN_ON
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/quota/dquot.c | 10 ++++++----
include/linux/quotaops.h | 11 +++++++++--
2 files changed, 15 insertions(+), 6 deletions(-)
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -1351,28 +1351,30 @@ static qsize_t *inode_reserved_space(str
return inode->i_sb->dq_op->get_reserved_space(inode);
}
-static void inode_add_rsv_space(struct inode *inode, qsize_t number)
+void inode_add_rsv_space(struct inode *inode, qsize_t number)
{
spin_lock(&inode->i_lock);
*inode_reserved_space(inode) += number;
spin_unlock(&inode->i_lock);
}
+EXPORT_SYMBOL(inode_add_rsv_space);
-
-static void inode_claim_rsv_space(struct inode *inode, qsize_t number)
+void inode_claim_rsv_space(struct inode *inode, qsize_t number)
{
spin_lock(&inode->i_lock);
*inode_reserved_space(inode) -= number;
__inode_add_bytes(inode, number);
spin_unlock(&inode->i_lock);
}
+EXPORT_SYMBOL(inode_claim_rsv_space);
-static void inode_sub_rsv_space(struct inode *inode, qsize_t number)
+void inode_sub_rsv_space(struct inode *inode, qsize_t number)
{
spin_lock(&inode->i_lock);
*inode_reserved_space(inode) -= number;
spin_unlock(&inode->i_lock);
}
+EXPORT_SYMBOL(inode_sub_rsv_space);
static qsize_t inode_get_rsv_space(struct inode *inode)
{
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -26,6 +26,10 @@ static inline void writeout_quota_sb(str
sb->s_qcop->quota_sync(sb, type);
}
+void inode_add_rsv_space(struct inode *inode, qsize_t number);
+void inode_claim_rsv_space(struct inode *inode, qsize_t number);
+void inode_sub_rsv_space(struct inode *inode, qsize_t number);
+
int dquot_initialize(struct inode *inode, int type);
int dquot_drop(struct inode *inode);
struct dquot *dqget(struct super_block *sb, unsigned int id, int type);
@@ -42,7 +46,6 @@ int dquot_alloc_inode(const struct inode
int dquot_reserve_space(struct inode *inode, qsize_t number, int prealloc);
int dquot_claim_space(struct inode *inode, qsize_t number);
void dquot_release_reserved_space(struct inode *inode, qsize_t number);
-qsize_t dquot_get_reserved_space(struct inode *inode);
int dquot_free_space(struct inode *inode, qsize_t number);
int dquot_free_inode(const struct inode *inode, qsize_t number);
@@ -199,6 +202,8 @@ static inline int vfs_dq_reserve_space(s
if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA)
return 1;
}
+ else
+ inode_add_rsv_space(inode, nr);
return 0;
}
@@ -221,7 +226,7 @@ static inline int vfs_dq_claim_space(str
if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA)
return 1;
} else
- inode_add_bytes(inode, nr);
+ inode_claim_rsv_space(inode, nr);
mark_inode_dirty(inode);
return 0;
@@ -235,6 +240,8 @@ void vfs_dq_release_reservation_space(st
{
if (sb_any_quota_active(inode->i_sb))
inode->i_sb->dq_op->release_rsv(inode, nr);
+ else
+ inode_sub_rsv_space(inode, nr);
}
static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [148/156] quota: Fix warning when a delayed write happens before quota is enabled
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (146 preceding siblings ...)
2010-03-30 22:43 ` [147/156] quota: manage reserved space when quota is not active [v2] Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [149/156] ahci: use BIOS date in broken_suspend list Greg KH
` (7 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jan Kara, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Kara <jack@suse.cz>
commit 0a5a9c725512461d19397490f3adf29931dca1f2 upstream.
If a delayed-allocation write happens before quota is enabled, the
kernel spits out a warning:
WARNING: at fs/quota/dquot.c:988 dquot_claim_space+0x77/0x112()
because the fact that user has some delayed allocation is not recorded
in quota structure.
Make dquot_initialize() update amount of reserved space for user if it sees
inode has some space reserved. Also make sure that reserved quota space does
not go negative and we warn about the filesystem bug just once.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/quota/dquot.c | 35 +++++++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -225,6 +225,8 @@ static struct hlist_head *dquot_hash;
struct dqstats dqstats;
EXPORT_SYMBOL(dqstats);
+static qsize_t inode_get_rsv_space(struct inode *inode);
+
static inline unsigned int
hashfn(const struct super_block *sb, unsigned int id, int type)
{
@@ -840,11 +842,14 @@ static int dqinit_needed(struct inode *i
static void add_dquot_ref(struct super_block *sb, int type)
{
struct inode *inode, *old_inode = NULL;
+ int reserved = 0;
spin_lock(&inode_lock);
list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE|I_NEW))
continue;
+ if (unlikely(inode_get_rsv_space(inode) > 0))
+ reserved = 1;
if (!atomic_read(&inode->i_writecount))
continue;
if (!dqinit_needed(inode, type))
@@ -865,6 +870,12 @@ static void add_dquot_ref(struct super_b
}
spin_unlock(&inode_lock);
iput(old_inode);
+
+ if (reserved) {
+ printk(KERN_WARNING "VFS (%s): Writes happened before quota"
+ " was turned on thus quota information is probably "
+ "inconsistent. Please run quotacheck(8).\n", sb->s_id);
+ }
}
/*
@@ -978,10 +989,12 @@ static inline void dquot_resv_space(stru
/*
* Claim reserved quota space
*/
-static void dquot_claim_reserved_space(struct dquot *dquot,
- qsize_t number)
+static void dquot_claim_reserved_space(struct dquot *dquot, qsize_t number)
{
- WARN_ON(dquot->dq_dqb.dqb_rsvspace < number);
+ if (dquot->dq_dqb.dqb_rsvspace < number) {
+ WARN_ON_ONCE(1);
+ number = dquot->dq_dqb.dqb_rsvspace;
+ }
dquot->dq_dqb.dqb_curspace += number;
dquot->dq_dqb.dqb_rsvspace -= number;
}
@@ -989,7 +1002,12 @@ static void dquot_claim_reserved_space(s
static inline
void dquot_free_reserved_space(struct dquot *dquot, qsize_t number)
{
- dquot->dq_dqb.dqb_rsvspace -= number;
+ if (dquot->dq_dqb.dqb_rsvspace >= number)
+ dquot->dq_dqb.dqb_rsvspace -= number;
+ else {
+ WARN_ON_ONCE(1);
+ dquot->dq_dqb.dqb_rsvspace = 0;
+ }
}
static void dquot_decr_inodes(struct dquot *dquot, qsize_t number)
@@ -1242,6 +1260,7 @@ static int info_bdq_free(struct dquot *d
return QUOTA_NL_BHARDBELOW;
return QUOTA_NL_NOWARN;
}
+
/*
* Initialize quota pointers in inode
* We do things in a bit complicated way but by that we avoid calling
@@ -1253,6 +1272,7 @@ int dquot_initialize(struct inode *inode
int cnt, ret = 0;
struct dquot *got[MAXQUOTAS] = { NULL, NULL };
struct super_block *sb = inode->i_sb;
+ qsize_t rsv;
/* First test before acquiring mutex - solves deadlocks when we
* re-enter the quota code and are already holding the mutex */
@@ -1287,6 +1307,13 @@ int dquot_initialize(struct inode *inode
if (!inode->i_dquot[cnt]) {
inode->i_dquot[cnt] = got[cnt];
got[cnt] = NULL;
+ /*
+ * Make quota reservation system happy if someone
+ * did a write before quota was turned on
+ */
+ rsv = inode_get_rsv_space(inode);
+ if (unlikely(rsv))
+ dquot_resv_space(inode->i_dquot[cnt], rsv);
}
}
out_err:
^ permalink raw reply [flat|nested] 432+ messages in thread
* [149/156] ahci: use BIOS date in broken_suspend list
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (147 preceding siblings ...)
2010-03-30 22:43 ` [148/156] quota: Fix warning when a delayed write happens before quota is enabled Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [150/156] Bluetooth: Fix potential bad memory access with sysfs files Greg KH
` (6 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tejun Heo, Jeff Garzik,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tejun Heo <tj@kernel.org>
commit 9deb343189b3cf45e84dd08480f330575ffe2004 upstream.
HP is recycling both DMI_PRODUCT_NAME and DMI_BIOS_VERSION making
ahci_broken_suspend() trigger for later products which are not
affected by the original problems. Match BIOS date instead of version
and add references to bko's so that full information can be found
easier later.
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=15462
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: tigerfishdaisy@gmail.com
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/ata/ahci.c | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2831,6 +2831,14 @@ static bool ahci_broken_suspend(struct p
* On HP dv[4-6] and HDX18 with earlier BIOSen, link
* to the harddisk doesn't become online after
* resuming from STR. Warn and fail suspend.
+ *
+ * http://bugzilla.kernel.org/show_bug.cgi?id=12276
+ *
+ * Use dates instead of versions to match as HP is
+ * apparently recycling both product and version
+ * strings.
+ *
+ * http://bugzilla.kernel.org/show_bug.cgi?id=15462
*/
{
.ident = "dv4",
@@ -2839,7 +2847,7 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv4 Notebook PC"),
},
- .driver_data = "F.30", /* cutoff BIOS version */
+ .driver_data = "20090105", /* F.30 */
},
{
.ident = "dv5",
@@ -2848,7 +2856,7 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv5 Notebook PC"),
},
- .driver_data = "F.16", /* cutoff BIOS version */
+ .driver_data = "20090506", /* F.16 */
},
{
.ident = "dv6",
@@ -2857,7 +2865,7 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv6 Notebook PC"),
},
- .driver_data = "F.21", /* cutoff BIOS version */
+ .driver_data = "20090423", /* F.21 */
},
{
.ident = "HDX18",
@@ -2866,7 +2874,7 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_PRODUCT_NAME,
"HP HDX18 Notebook PC"),
},
- .driver_data = "F.23", /* cutoff BIOS version */
+ .driver_data = "20090430", /* F.23 */
},
/*
* Acer eMachines G725 has the same problem. BIOS
@@ -2874,6 +2882,8 @@ static bool ahci_broken_suspend(struct p
* work. Inbetween, there are V1.06, V2.06 and V3.03
* that we don't have much idea about. For now,
* blacklist anything older than V3.04.
+ *
+ * http://bugzilla.kernel.org/show_bug.cgi?id=15104
*/
{
.ident = "G725",
@@ -2881,19 +2891,21 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_SYS_VENDOR, "eMachines"),
DMI_MATCH(DMI_PRODUCT_NAME, "eMachines G725"),
},
- .driver_data = "V3.04", /* cutoff BIOS version */
+ .driver_data = "20091216", /* V3.04 */
},
{ } /* terminate list */
};
const struct dmi_system_id *dmi = dmi_first_match(sysids);
- const char *ver;
+ int year, month, date;
+ char buf[9];
if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2))
return false;
- ver = dmi_get_system_info(DMI_BIOS_VERSION);
+ dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
+ snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);
- return !ver || strcmp(ver, dmi->driver_data) < 0;
+ return strcmp(buf, dmi->driver_data) < 0;
}
static bool ahci_broken_online(struct pci_dev *pdev)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [150/156] Bluetooth: Fix potential bad memory access with sysfs files
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (148 preceding siblings ...)
2010-03-30 22:43 ` [149/156] ahci: use BIOS date in broken_suspend list Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [151/156] Bluetooth: Fix kernel crash on L2CAP stress tests Greg KH
` (5 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Marcel Holtmann,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marcel Holtmann <marcel@holtmann.org>
commit 101545f6fef4a0a3ea8daf0b5b880df2c6a92a69 upstream.
When creating a high number of Bluetooth sockets (L2CAP, SCO
and RFCOMM) it is possible to scribble repeatedly on arbitrary
pages of memory. Ensure that the content of these sysfs files is
always less than one page. Even if this means truncating. The
files in question are scheduled to be moved over to debugfs in
the future anyway.
Based on initial patches from Neil Brown and Linus Torvalds
Reported-by: Neil Brown <neilb@suse.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/bluetooth/l2cap.c | 10 +++++++++-
net/bluetooth/rfcomm/core.c | 13 ++++++++++++-
net/bluetooth/rfcomm/sock.c | 11 ++++++++++-
net/bluetooth/sco.c | 11 ++++++++++-
4 files changed, 41 insertions(+), 4 deletions(-)
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3942,16 +3942,24 @@ static ssize_t l2cap_sysfs_show(struct c
struct sock *sk;
struct hlist_node *node;
char *str = buf;
+ int size = PAGE_SIZE;
read_lock_bh(&l2cap_sk_list.lock);
sk_for_each(sk, node, &l2cap_sk_list.head) {
struct l2cap_pinfo *pi = l2cap_pi(sk);
+ int len;
- str += sprintf(str, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d %d\n",
+ len = snprintf(str, size, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->sk_state, __le16_to_cpu(pi->psm), pi->scid,
pi->dcid, pi->imtu, pi->omtu, pi->sec_level);
+
+ size -= len;
+ if (size <= 0)
+ break;
+
+ str += len;
}
read_unlock_bh(&l2cap_sk_list.lock);
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -2103,6 +2103,7 @@ static ssize_t rfcomm_dlc_sysfs_show(str
struct rfcomm_session *s;
struct list_head *pp, *p;
char *str = buf;
+ int size = PAGE_SIZE;
rfcomm_lock();
@@ -2111,11 +2112,21 @@ static ssize_t rfcomm_dlc_sysfs_show(str
list_for_each(pp, &s->dlcs) {
struct sock *sk = s->sock->sk;
struct rfcomm_dlc *d = list_entry(pp, struct rfcomm_dlc, list);
+ int len;
- str += sprintf(str, "%s %s %ld %d %d %d %d\n",
+ len = snprintf(str, size, "%s %s %ld %d %d %d %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
d->state, d->dlci, d->mtu, d->rx_credits, d->tx_credits);
+
+ size -= len;
+ if (size <= 0)
+ break;
+
+ str += len;
}
+
+ if (size <= 0)
+ break;
}
rfcomm_unlock();
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -1066,13 +1066,22 @@ static ssize_t rfcomm_sock_sysfs_show(st
struct sock *sk;
struct hlist_node *node;
char *str = buf;
+ int size = PAGE_SIZE;
read_lock_bh(&rfcomm_sk_list.lock);
sk_for_each(sk, node, &rfcomm_sk_list.head) {
- str += sprintf(str, "%s %s %d %d\n",
+ int len;
+
+ len = snprintf(str, size, "%s %s %d %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->sk_state, rfcomm_pi(sk)->channel);
+
+ size -= len;
+ if (size <= 0)
+ break;
+
+ str += len;
}
read_unlock_bh(&rfcomm_sk_list.lock);
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -958,13 +958,22 @@ static ssize_t sco_sysfs_show(struct cla
struct sock *sk;
struct hlist_node *node;
char *str = buf;
+ int size = PAGE_SIZE;
read_lock_bh(&sco_sk_list.lock);
sk_for_each(sk, node, &sco_sk_list.head) {
- str += sprintf(str, "%s %s %d\n",
+ int len;
+
+ len = snprintf(str, size, "%s %s %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->sk_state);
+
+ size -= len;
+ if (size <= 0)
+ break;
+
+ str += len;
}
read_unlock_bh(&sco_sk_list.lock);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [151/156] Bluetooth: Fix kernel crash on L2CAP stress tests
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (149 preceding siblings ...)
2010-03-30 22:43 ` [150/156] Bluetooth: Fix potential bad memory access with sysfs files Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [152/156] b43: Workaround circular locking in hw-tkip key update callback Greg KH
` (4 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andrei Emeltchenko,
Gustavo F. Padovan, Marcel Holtmann, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
commit c2c77ec83bdad17fb688557b5b3fdc36661dd1c6 upstream.
Added very simple check that req buffer has enough space to
fit configuration parameters. Shall be enough to reject packets
with configuration size more than req buffer.
Crash trace below
[ 6069.659393] Unable to handle kernel paging request at virtual address 02000205
[ 6069.673034] Internal error: Oops: 805 [#1] PREEMPT
...
[ 6069.727172] PC is at l2cap_add_conf_opt+0x70/0xf0 [l2cap]
[ 6069.732604] LR is at l2cap_recv_frame+0x1350/0x2e78 [l2cap]
...
[ 6070.030303] Backtrace:
[ 6070.032806] [<bf1c2880>] (l2cap_add_conf_opt+0x0/0xf0 [l2cap]) from
[<bf1c6624>] (l2cap_recv_frame+0x1350/0x2e78 [l2cap])
[ 6070.043823] r8:dc5d3100 r7:df2a91d6 r6:00000001 r5:df2a8000 r4:00000200
[ 6070.050659] [<bf1c52d4>] (l2cap_recv_frame+0x0/0x2e78 [l2cap]) from
[<bf1c8408>] (l2cap_recv_acldata+0x2bc/0x350 [l2cap])
[ 6070.061798] [<bf1c814c>] (l2cap_recv_acldata+0x0/0x350 [l2cap]) from
[<bf0037a4>] (hci_rx_task+0x244/0x478 [bluetooth])
[ 6070.072631] r6:dc647700 r5:00000001 r4:df2ab740
[ 6070.077362] [<bf003560>] (hci_rx_task+0x0/0x478 [bluetooth]) from
[<c006b9fc>] (tasklet_action+0x78/0xd8)
[ 6070.087005] [<c006b984>] (tasklet_action+0x0/0xd8) from [<c006c160>]
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Gustavo F. Padovan <gustavo@padovan.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/bluetooth/l2cap.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2830,6 +2830,11 @@ static inline int l2cap_config_rsp(struc
int len = cmd->len - sizeof(*rsp);
char req[64];
+ if (len > sizeof(req) - sizeof(struct l2cap_conf_req)) {
+ l2cap_send_disconn_req(conn, sk);
+ goto done;
+ }
+
/* throw out any old stored conf requests */
result = L2CAP_CONF_SUCCESS;
len = l2cap_parse_conf_rsp(sk, rsp->data,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [152/156] b43: Workaround circular locking in hw-tkip key update callback
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (150 preceding siblings ...)
2010-03-30 22:43 ` [151/156] Bluetooth: Fix kernel crash on L2CAP stress tests Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [153/156] x86: Fix sched_clock_cpu for systems with unsynchronized TSC Greg KH
` (3 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable, Greg Kroah-Hartman
Cc: stable-review, torvalds, akpm, alan, Michael Buesch,
Johannes Berg, John W. Linville
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Buesch <mb@bu3sch.de>
commit 96869a39399269a776a94812e9fff3d38b47d838 upstream
The TKIP key update callback is called from the RX path, where the driver
mutex is already locked. This results in a circular locking bug.
Avoid this by removing the lock.
Johannes noted that there is a separate bug: The callback still breaks on SDIO
hardware, because SDIO hardware access needs to sleep, but we are not allowed
to sleep in the callback due to mac80211's RCU locking.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: kecsa@kutfo.hit.bme.hu
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/b43/main.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -852,19 +852,16 @@ static void b43_op_update_tkip_key(struc
if (B43_WARN_ON(!modparam_hwtkip))
return;
- mutex_lock(&wl->mutex);
-
+ /* This is only called from the RX path through mac80211, where
+ * our mutex is already locked. */
+ B43_WARN_ON(!mutex_is_locked(&wl->mutex));
dev = wl->current_dev;
- if (!dev || b43_status(dev) < B43_STAT_INITIALIZED)
- goto out_unlock;
+ B43_WARN_ON(!dev || b43_status(dev) < B43_STAT_INITIALIZED);
keymac_write(dev, index, NULL); /* First zero out mac to avoid race */
rx_tkip_phase1_write(dev, index, iv32, phase1key);
keymac_write(dev, index, addr);
-
-out_unlock:
- mutex_unlock(&wl->mutex);
}
static void do_key_write(struct b43_wldev *dev,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [153/156] x86: Fix sched_clock_cpu for systems with unsynchronized TSC
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (151 preceding siblings ...)
2010-03-30 22:43 ` [152/156] b43: Workaround circular locking in hw-tkip key update callback Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [154/156] classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases Greg KH
` (2 subsequent siblings)
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dimitri Sivanich,
Venkatesh Pallipadi, Peter Zijlstra, Ingo Molnar,
Greg Kroah-Hartman
From: Dimitri Sivanich <sivanich@sgi.com>
commit 14be1f7454ea96ee614467a49cf018a1a383b189 upstream.
On UV systems, the TSC is not synchronized across blades. The
sched_clock_cpu() function is returning values that can go
backwards (I've seen as much as 8 seconds) when switching
between cpus.
As each cpu comes up, early_init_intel() will currently set the
sched_clock_stable flag true. When mark_tsc_unstable() runs, it
clears the flag, but this only occurs once (the first time a cpu
comes up whose TSC is not synchronized with cpu 0). After this,
early_init_intel() will set the flag again as the next cpu comes
up.
Only set sched_clock_stable if tsc has not been marked unstable.
Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100301174815.GC8224@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/cpu/intel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -70,7 +70,8 @@ static void __cpuinit early_init_intel(s
if (c->x86_power & (1 << 8)) {
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC);
- sched_clock_stable = 1;
+ if (!check_tsc_unstable())
+ sched_clock_stable = 1;
}
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [154/156] classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (152 preceding siblings ...)
2010-03-30 22:43 ` [153/156] x86: Fix sched_clock_cpu for systems with unsynchronized TSC Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [155/156] GFS2: Skip check for mandatory locks when unlocking Greg KH
2010-03-30 22:43 ` [156/156] pata_via: fix VT6410/6415/6330 detection issue Greg KH
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan,
Thadeu Lima de Souza Cascardo, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
commit 02e77a55f7b7e36888e39c62439fedb90ae4e808 upstream.
Instead of a MODULE_DEVICE_TABLE for every acpi_driver ids table, we
create a table containing all ids to export to get a module alias for
each one.
This will fix automatic loading of the driver when one of the ACPI
devices is not present (like the accelerometer, which is not present in
some models).
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/platform/x86/classmate-laptop.c | 31 +++++++++++++++++++++----------
1 file changed, 21 insertions(+), 10 deletions(-)
--- a/drivers/platform/x86/classmate-laptop.c
+++ b/drivers/platform/x86/classmate-laptop.c
@@ -34,6 +34,11 @@ struct cmpc_accel {
#define CMPC_ACCEL_SENSITIVITY_DEFAULT 5
+#define CMPC_ACCEL_HID "ACCE0000"
+#define CMPC_TABLET_HID "TBLT0000"
+#define CMPC_BL_HID "IPML200"
+#define CMPC_KEYS_HID "FnBT0000"
+
/*
* Generic input device code.
*/
@@ -282,10 +287,9 @@ static int cmpc_accel_remove(struct acpi
}
static const struct acpi_device_id cmpc_accel_device_ids[] = {
- {"ACCE0000", 0},
+ {CMPC_ACCEL_HID, 0},
{"", 0}
};
-MODULE_DEVICE_TABLE(acpi, cmpc_accel_device_ids);
static struct acpi_driver cmpc_accel_acpi_driver = {
.owner = THIS_MODULE,
@@ -366,10 +370,9 @@ static int cmpc_tablet_resume(struct acp
}
static const struct acpi_device_id cmpc_tablet_device_ids[] = {
- {"TBLT0000", 0},
+ {CMPC_TABLET_HID, 0},
{"", 0}
};
-MODULE_DEVICE_TABLE(acpi, cmpc_tablet_device_ids);
static struct acpi_driver cmpc_tablet_acpi_driver = {
.owner = THIS_MODULE,
@@ -477,17 +480,16 @@ static int cmpc_bl_remove(struct acpi_de
return 0;
}
-static const struct acpi_device_id cmpc_device_ids[] = {
- {"IPML200", 0},
+static const struct acpi_device_id cmpc_bl_device_ids[] = {
+ {CMPC_BL_HID, 0},
{"", 0}
};
-MODULE_DEVICE_TABLE(acpi, cmpc_device_ids);
static struct acpi_driver cmpc_bl_acpi_driver = {
.owner = THIS_MODULE,
.name = "cmpc",
.class = "cmpc",
- .ids = cmpc_device_ids,
+ .ids = cmpc_bl_device_ids,
.ops = {
.add = cmpc_bl_add,
.remove = cmpc_bl_remove
@@ -540,10 +542,9 @@ static int cmpc_keys_remove(struct acpi_
}
static const struct acpi_device_id cmpc_keys_device_ids[] = {
- {"FnBT0000", 0},
+ {CMPC_KEYS_HID, 0},
{"", 0}
};
-MODULE_DEVICE_TABLE(acpi, cmpc_keys_device_ids);
static struct acpi_driver cmpc_keys_acpi_driver = {
.owner = THIS_MODULE,
@@ -607,3 +608,13 @@ static void cmpc_exit(void)
module_init(cmpc_init);
module_exit(cmpc_exit);
+
+static const struct acpi_device_id cmpc_device_ids[] = {
+ {CMPC_ACCEL_HID, 0},
+ {CMPC_TABLET_HID, 0},
+ {CMPC_BL_HID, 0},
+ {CMPC_KEYS_HID, 0},
+ {"", 0}
+};
+
+MODULE_DEVICE_TABLE(acpi, cmpc_device_ids);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [155/156] GFS2: Skip check for mandatory locks when unlocking
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (153 preceding siblings ...)
2010-03-30 22:43 ` [154/156] classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases Greg KH
@ 2010-03-30 22:43 ` Greg KH
2010-03-30 22:43 ` [156/156] pata_via: fix VT6410/6415/6330 detection issue Greg KH
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Sachin Prabhu,
Steven Whitehouse, Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sachin Prabhu <sprabhu@redhat.com>
commit 720e7749279bde0d08684b1bb4e7a2eedeec6394 upstream.
gfs2_lock() will skip locks on file which have mode set to 02666. This is a problem in cases where the mode of the file is changed after a process has obtained a lock on the file. Such a lock will be skipped and will result in a BUG in locks_remove_flock().
gfs2_lock() should skip the check for mandatory locks when unlocking a file.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/gfs2/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -640,7 +640,7 @@ static int gfs2_lock(struct file *file,
if (!(fl->fl_flags & FL_POSIX))
return -ENOLCK;
- if (__mandatory_lock(&ip->i_inode))
+ if (__mandatory_lock(&ip->i_inode) && fl->fl_type != F_UNLCK)
return -ENOLCK;
if (cmd == F_CANCELLK) {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [156/156] pata_via: fix VT6410/6415/6330 detection issue
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
` (154 preceding siblings ...)
2010-03-30 22:43 ` [155/156] GFS2: Skip check for mandatory locks when unlocking Greg KH
@ 2010-03-30 22:43 ` Greg KH
155 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:43 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Joseph Chan, Jeff Garzik,
Greg Kroah-Hartman
2.6.33-stable review patch. If anyone has any objections, please let us know.
------------------
From: JosephChan@via.com.tw <JosephChan@via.com.tw>
commit bc8a67386fd462914269fa93446e1891955a8bb3 upstream.
When using VT6410/6415/6330 chips on some VIA's platforms, the HDD
connection to VT6410/6415/6330 cannot be detected.
It is because the driver detects wrong via_isa_bridge ID, and then
causes this issue to happen.
Signed-off-by: Joseph Chan <josephchan@via.com.tw>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/ata/pata_via.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -588,6 +588,10 @@ static int via_init_one(struct pci_dev *
u8 rev = isa->revision;
pci_dev_put(isa);
+ if ((id->device == 0x0415 || id->device == 0x3164) &&
+ (config->id != id->device))
+ continue;
+
if (rev >= config->rev_min && rev <= config->rev_max)
break;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [01/45] UBI: fix volume creation input checking
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [02/45] Fix potential crash with sys_move_pages Greg KH
` (43 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mika Westerberg,
Artem Bityutskiy, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
commit c5ce5b46af76f52dea21f467397d24c4ae6cb3ff upstream.
Do not use an unchecked variable UBI_IOCMKVOL ioctl.
Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/mtd/ubi/cdev.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -793,7 +793,6 @@ static int ubi_cdev_ioctl(struct inode *
break;
}
- req.name[req.name_len] = '\0';
err = verify_mkvol_req(ubi, &req);
if (err)
break;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [02/45] Fix potential crash with sys_move_pages
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
2010-03-30 22:48 ` [01/45] UBI: fix volume creation input checking Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [03/45] Fix race in tty_fasync() properly Greg KH
` (42 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Hugh Dickins,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 6f5a55f1a6c5abee15a0e878e5c74d9f1569b8b0 upstream.
We incorrectly depended on the 'node_state/node_isset()' functions
testing the node range, rather than checking it explicitly. That's not
reliable, even if it might often happen to work. So do the proper
explicit test.
Reported-by: Marcus Meissner <meissner@suse.de>
Acked-and-tested-by: Brice Goglin <Brice.Goglin@inria.fr>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/migrate.c | 3 +++
1 file changed, 3 insertions(+)
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -1062,6 +1062,9 @@ SYSCALL_DEFINE6(move_pages, pid_t, pid,
goto out;
err = -ENODEV;
+ if (node < 0 || node >= MAX_NUMNODES)
+ goto out;
+
if (!node_state(node, N_HIGH_MEMORY))
goto out;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [03/45] Fix race in tty_fasync() properly
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
2010-03-30 22:48 ` [01/45] UBI: fix volume creation input checking Greg KH
2010-03-30 22:48 ` [02/45] Fix potential crash with sys_move_pages Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [04/45] futex: Handle futex value corruption gracefully Greg KH
` (41 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Greg Kroah-Hartman,
Américo Wang
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3092 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 80e1e823989ec44d8e35bdfddadbddcffec90424 upstream.
This reverts commit 703625118069 ("tty: fix race in tty_fasync") and
commit b04da8bfdfbb ("fnctl: f_modown should call write_lock_irqsave/
restore") that tried to fix up some of the fallout but was incomplete.
It turns out that we really cannot hold 'tty->ctrl_lock' over calling
__f_setown, because not only did that cause problems with interrupt
disables (which the second commit fixed), it also causes a potential
ABBA deadlock due to lock ordering.
Thanks to Tetsuo Handa for following up on the issue, and running
lockdep to show the problem. It goes roughly like this:
- f_getown gets filp->f_owner.lock for reading without interrupts
disabled, so an interrupt that happens while that lock is held can
cause a lockdep chain from f_owner.lock -> sighand->siglock.
- at the same time, the tty->ctrl_lock -> f_owner.lock chain that
commit 703625118069 introduced, together with the pre-existing
sighand->siglock -> tty->ctrl_lock chain means that we have a lock
dependency the other way too.
So instead of extending tty->ctrl_lock over the whole __f_setown() call,
we now just take a reference to the 'pid' structure while holding the
lock, and then release it after having done the __f_setown. That still
guarantees that 'struct pid' won't go away from under us, which is all
we really ever needed.
Reported-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Américo Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/tty_io.c | 4 +++-
fs/fcntl.c | 6 ++----
2 files changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -2437,8 +2437,10 @@ static int tty_fasync(int fd, struct fil
pid = task_pid(current);
type = PIDTYPE_PID;
}
- retval = __f_setown(filp, pid, type, 0);
+ get_pid(pid);
spin_unlock_irqrestore(&tty->ctrl_lock, flags);
+ retval = __f_setown(filp, pid, type, 0);
+ put_pid(pid);
if (retval)
goto out;
} else {
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -200,9 +200,7 @@ static int setfl(int fd, struct file * f
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
uid_t uid, uid_t euid, int force)
{
- unsigned long flags;
-
- write_lock_irqsave(&filp->f_owner.lock, flags);
+ write_lock_irq(&filp->f_owner.lock);
if (force || !filp->f_owner.pid) {
put_pid(filp->f_owner.pid);
filp->f_owner.pid = get_pid(pid);
@@ -210,7 +208,7 @@ static void f_modown(struct file *filp,
filp->f_owner.uid = uid;
filp->f_owner.euid = euid;
}
- write_unlock_irqrestore(&filp->f_owner.lock, flags);
+ write_unlock_irq(&filp->f_owner.lock);
}
int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [04/45] futex: Handle futex value corruption gracefully
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (2 preceding siblings ...)
2010-03-30 22:48 ` [03/45] Fix race in tty_fasync() properly Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [05/45] futex: Handle user space " Greg KH
` (40 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas Gleixner, Darren Hart,
Peter Zijlstra, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
commit 59647b6ac3050dd964bc556fe6ef22f4db5b935c upstream.
The WARN_ON in lookup_pi_state which complains about a mismatch
between pi_state->owner->pid and the pid which we retrieved from the
user space futex is completely bogus.
The code just emits the warning and then continues despite the fact
that it detected an inconsistent state of the futex. A conveniant way
for user space to spam the syslog.
Replace the WARN_ON by a consistency check. If the values do not match
return -EINVAL and let user space deal with the mess it created.
This also fixes the missing task_pid_vnr() when we compare the
pi_state->owner pid with the futex value.
Reported-by: Jermome Marchand <jmarchan@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Darren Hart <dvhltc@us.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/futex.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -533,8 +533,25 @@ lookup_pi_state(u32 uval, struct futex_h
return -EINVAL;
WARN_ON(!atomic_read(&pi_state->refcount));
- WARN_ON(pid && pi_state->owner &&
- pi_state->owner->pid != pid);
+
+ /*
+ * When pi_state->owner is NULL then the owner died
+ * and another waiter is on the fly. pi_state->owner
+ * is fixed up by the task which acquires
+ * pi_state->rt_mutex.
+ *
+ * We do not check for pid == 0 which can happen when
+ * the owner died and robust_list_exit() cleared the
+ * TID.
+ */
+ if (pid && pi_state->owner) {
+ /*
+ * Bail out if user space manipulated the
+ * futex value.
+ */
+ if (pid != task_pid_vnr(pi_state->owner))
+ return -EINVAL;
+ }
atomic_inc(&pi_state->refcount);
*ps = pi_state;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [05/45] futex: Handle user space corruption gracefully
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (3 preceding siblings ...)
2010-03-30 22:48 ` [04/45] futex: Handle futex value corruption gracefully Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [06/45] resource: add helpers for fetching rlimits Greg KH
` (39 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas Gleixner, Darren Hart,
Peter Zijlstra, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
commit 51246bfd189064079c54421507236fd2723b18f3 upstream.
If the owner of a PI futex dies we fix up the pi_state and set
pi_state->owner to NULL. When a malicious or just sloppy programmed
user space application sets the futex value to 0 e.g. by calling
pthread_mutex_init(), then the futex can be acquired again. A new
waiter manages to enqueue itself on the pi_state w/o damage, but on
unlock the kernel dereferences pi_state->owner and oopses.
Prevent this by checking pi_state->owner in the unlock path. If
pi_state->owner is not current we know that user space manipulated the
futex value. Ignore the mess and return -EINVAL.
This catches the above case and also the case where a task hijacks the
futex by setting the tid value and then tries to unlock it.
Reported-by: Jermome Marchand <jmarchan@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Darren Hart <dvhltc@us.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/futex.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -647,6 +647,13 @@ static int wake_futex_pi(u32 __user *uad
if (!pi_state)
return -EINVAL;
+ /*
+ * If current does not own the pi_state then the futex is
+ * inconsistent and user space fiddled with the futex value.
+ */
+ if (pi_state->owner != current)
+ return -EINVAL;
+
spin_lock(&pi_state->pi_mutex.wait_lock);
new_owner = rt_mutex_next_owner(&pi_state->pi_mutex);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [06/45] resource: add helpers for fetching rlimits
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (4 preceding siblings ...)
2010-03-30 22:48 ` [05/45] futex: Handle user space " Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [07/45] printk: robustify printk, fix #2 Greg KH
` (38 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jiri Slaby, James Morris,
Heiko Carstens, Ingo Molnar, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Slaby <jslaby@suse.cz>
commit 3e10e716abf3c71bdb5d86b8f507f9e72236c9cd upstream.
We want to be sure that compiler fetches the limit variable only
once, so add helpers for fetching current and maximal resource
limits which do that.
Add them to sched.h (instead of resource.h) due to circular dependency
sched.h->resource.h->task_struct
Alternative would be to create a separate res_access.h or similar.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: James Morris <jmorris@namei.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/sched.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2232,6 +2232,28 @@ static inline void mm_init_owner(struct
#define TASK_STATE_TO_CHAR_STR "RSDTtZX"
+static inline unsigned long task_rlimit(const struct task_struct *tsk,
+ unsigned int limit)
+{
+ return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_cur);
+}
+
+static inline unsigned long task_rlimit_max(const struct task_struct *tsk,
+ unsigned int limit)
+{
+ return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_max);
+}
+
+static inline unsigned long rlimit(unsigned int limit)
+{
+ return task_rlimit(current, limit);
+}
+
+static inline unsigned long rlimit_max(unsigned int limit)
+{
+ return task_rlimit_max(current, limit);
+}
+
#endif /* __KERNEL__ */
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [07/45] printk: robustify printk, fix #2
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (5 preceding siblings ...)
2010-03-30 22:48 ` [06/45] resource: add helpers for fetching rlimits Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [08/45] hwmon: (lm78) Fix I/O resource conflict with PNP Greg KH
` (37 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Peter Zijlstra, Ingo Molnar,
Paul Gortmaker, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
commit fa33507a22623b3bd543b15a21c362cf364b6cff upstream.
Dmitry Adamushko reported:
> [*] btw., with DEBUG being enabled, pr_debug() generates [1] when
> debug_smp_processor_id() is used (CONFIG_DEBUG_PREEMPT).
>
> the problem seems to be caused by the following commit:
> commit b845b517b5e3706a3729f6ea83b88ab85f0725b0
> Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Date: Fri Aug 8 21:47:09 2008 +0200
>
> printk: robustify printk
>
>
> wake_up_klogd() -> __get_cpu_var() -> smp_processor_id()
>
> and that's being called from release_console_sem() which is, in turn,
> said to be "may be called from any context" [2]
>
> and in this case, it seems to be called from some non-preemptible
> context (although, it can't be printk()...
> although, I haven't looked carefully yet).
>
> Provided [2], __get_cpu_var() is perhaps not the right solution there.
>
>
> [1]
>
> [ 7697.942005] BUG: using smp_processor_id() in preemptible [00000000] code: syslogd/3542
> [ 7697.942005] caller is wake_up_klogd+0x1b/0x50
> [ 7697.942005] Pid: 3542, comm: syslogd Not tainted 2.6.27-rc3-tip-git #2
> [ 7697.942005] Call Trace:
> [ 7697.942005] [<ffffffff8036b398>] debug_smp_processor_id+0xe8/0xf0
> [ 7697.942005] [<ffffffff80239d3b>] wake_up_klogd+0x1b/0x50
> [ 7697.942005] [<ffffffff8023a047>] release_console_sem+0x1e7/0x200
> [ 7697.942005] [<ffffffff803c0f17>] do_con_write+0xb7/0x1f30
> [ 7697.942005] [<ffffffff8020d920>] ? show_trace+0x10/0x20
> [ 7697.942005] [<ffffffff8020dc42>] ? dump_stack+0x72/0x80
> [ 7697.942005] [<ffffffff8036392d>] ? __ratelimit+0xbd/0xe0
> [ 7697.942005] [<ffffffff8036b398>] ? debug_smp_processor_id+0xe8/0xf0
> [ 7697.942005] [<ffffffff80239d3b>] ? wake_up_klogd+0x1b/0x50
> [ 7697.942005] [<ffffffff8023a047>] ? release_console_sem+0x1e7/0x200
> [ 7697.942005] [<ffffffff803c2de9>] con_write+0x19/0x30
> [ 7697.942005] [<ffffffff803b37b6>] write_chan+0x276/0x3c0
> [ 7697.942005] [<ffffffff80232b20>] ? default_wake_function+0x0/0x10
> [ 7697.942005] [<ffffffff804cb872>] ? _spin_lock_irqsave+0x22/0x50
> [ 7697.942005] [<ffffffff803b1334>] tty_write+0x194/0x260
> [ 7697.942005] [<ffffffff803b3540>] ? write_chan+0x0/0x3c0
> [ 7697.942005] [<ffffffff803b14a4>] redirected_tty_write+0xa4/0xb0
> [ 7697.942005] [<ffffffff803b1400>] ? redirected_tty_write+0x0/0xb0
> [ 7697.942005] [<ffffffff802a88c2>] do_loop_readv_writev+0x52/0x80
> [ 7697.942005] [<ffffffff802a939d>] do_readv_writev+0x1bd/0x1d0
> [ 7697.942005] [<ffffffff802a93e9>] vfs_writev+0x39/0x60
> [ 7697.942005] [<ffffffff802a9870>] sys_writev+0x50/0x90
> [ 7697.942005] [<ffffffff8020bb3b>] system_call_fastpath+0x16/0x1b
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reported-by: Dmitry Adamushko <dmitry.adamushko@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/printk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/printk.c
+++ b/kernel/printk.c
@@ -995,7 +995,7 @@ int printk_needs_cpu(int cpu)
void wake_up_klogd(void)
{
if (waitqueue_active(&log_wait))
- __get_cpu_var(printk_pending) = 1;
+ __raw_get_cpu_var(printk_pending) = 1;
}
/**
^ permalink raw reply [flat|nested] 432+ messages in thread
* [08/45] hwmon: (lm78) Fix I/O resource conflict with PNP
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (6 preceding siblings ...)
2010-03-30 22:48 ` [07/45] printk: robustify printk, fix #2 Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [09/45] r8169: Fix receive buffer length when MTU is between 1515 and 1536 Greg KH
` (36 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Delvare,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jean Delvare <khali@linux-fr.org>
This fix is the combination of the following two upstream patches:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=197027e6ef830d60e10f76efc8d12bf3b6c35db5
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=47c15532ddcd6818f51cb15f914d63864b3ee9ab
Only request I/O ports 0x295-0x296 instead of the full I/O address
range. This solves a conflict with PNP resources on a few motherboards.
Also request the I/O ports individually during device detection,
otherwise the PNP resource may cause the request (and thus the
detection) fail.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/lm78.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
--- a/drivers/hwmon/lm78.c
+++ b/drivers/hwmon/lm78.c
@@ -655,7 +655,7 @@ static int __devinit lm78_isa_probe(stru
/* Reserve the ISA region */
res = platform_get_resource(pdev, IORESOURCE_IO, 0);
- if (!request_region(res->start, LM78_EXTENT, "lm78")) {
+ if (!request_region(res->start + LM78_ADDR_REG_OFFSET, 2, "lm78")) {
err = -EBUSY;
goto exit;
}
@@ -699,7 +699,7 @@ static int __devinit lm78_isa_probe(stru
device_remove_file(&pdev->dev, &dev_attr_name);
kfree(data);
exit_release_region:
- release_region(res->start, LM78_EXTENT);
+ release_region(res->start + LM78_ADDR_REG_OFFSET, 2);
exit:
return err;
}
@@ -711,7 +711,7 @@ static int __devexit lm78_isa_remove(str
hwmon_device_unregister(data->hwmon_dev);
sysfs_remove_group(&pdev->dev.kobj, &lm78_group);
device_remove_file(&pdev->dev, &dev_attr_name);
- release_region(data->client.addr, LM78_EXTENT);
+ release_region(data->client.addr + LM78_ADDR_REG_OFFSET, 2);
kfree(data);
return 0;
@@ -836,9 +836,17 @@ static struct lm78_data *lm78_update_dev
static int __init lm78_isa_found(unsigned short address)
{
int val, save, found = 0;
+ int port;
- if (!request_region(address, LM78_EXTENT, "lm78"))
- return 0;
+ /* Some boards declare base+0 to base+7 as a PNP device, some base+4
+ * to base+7 and some base+5 to base+6. So we better request each port
+ * individually for the probing phase. */
+ for (port = address; port < address + LM78_EXTENT; port++) {
+ if (!request_region(port, 1, "lm78")) {
+ pr_debug("lm78: Failed to request port 0x%x\n", port);
+ goto release;
+ }
+ }
#define REALLY_SLOW_IO
/* We need the timeouts for at least some LM78-like
@@ -901,7 +909,8 @@ static int __init lm78_isa_found(unsigne
val & 0x80 ? "LM79" : "LM78", (int)address);
release:
- release_region(address, LM78_EXTENT);
+ for (port--; port >= address; port--)
+ release_region(port, 1);
return found;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [09/45] r8169: Fix receive buffer length when MTU is between 1515 and 1536
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (7 preceding siblings ...)
2010-03-30 22:48 ` [08/45] hwmon: (lm78) Fix I/O resource conflict with PNP Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [10/45] EHCI: fix bug in keeping track of resuming ports Greg KH
` (35 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Raimonds Cicans,
David S. Miller, Jean Delvare, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Raimonds Cicans <ray@apollo.lv>
commit 8812304cf1110ae16b0778680f6022216cf4716a upstream.
In r8169 driver MTU is used to calculate receive buffer size.
Receive buffer size is used to configure hardware incoming packet filter.
For jumbo frames:
Receive buffer size = Max frame size = MTU + 14 (ethernet header) + 4
(vlan header) + 4 (ethernet checksum) = MTU + 22
Bug:
driver for all MTU up to 1536 use receive buffer size 1536
As you can see from formula, this mean all IP packets > 1536 - 22
(for vlan tagged, 1536 - 18 for not tagged) are dropped by hardware
filter.
Example:
host_good> ifconfig eth0 mtu 1536
host_r8169> ifconfig eth0 mtu 1536
host_good> ping host_r8169
Ok
host_good> ping -s 1500 host_r8169
Fail
host_good> ifconfig eth0 mtu 7000
host_r8169> ifconfig eth0 mtu 7000
host_good> ping -s 1500 host_r8169
Ok
Bonus: got rid of magic number 8
Signed-off-by: Raimonds Cicans <ray@apollo.lv>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/r8169.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/r8169.c
+++ b/drivers/net/r8169.c
@@ -1842,9 +1842,9 @@ static void __devexit rtl8169_remove_one
static void rtl8169_set_rxbufsize(struct rtl8169_private *tp,
struct net_device *dev)
{
- unsigned int mtu = dev->mtu;
+ unsigned int max_frame = dev->mtu + VLAN_ETH_HLEN + ETH_FCS_LEN;
- tp->rx_buf_sz = (mtu > RX_BUF_SIZE) ? mtu + ETH_HLEN + 8 : RX_BUF_SIZE;
+ tp->rx_buf_sz = (max_frame > RX_BUF_SIZE) ? max_frame : RX_BUF_SIZE;
}
static int rtl8169_open(struct net_device *dev)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [10/45] EHCI: fix bug in keeping track of resuming ports
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (8 preceding siblings ...)
2010-03-30 22:48 ` [09/45] r8169: Fix receive buffer length when MTU is between 1515 and 1536 Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [11/45] ax25: Fix possible oops in ax25_make_new Greg KH
` (34 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable, Greg KH
Cc: stable-review, torvalds, akpm, alan, Corey Wright, Alan Stern,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
This patch fixes a bug caused by backporting commit
cec3a53c7fe794237b582e8e77fc0e48465e65ee (USB: EHCI & UHCI: fix race
between root-hub suspend and port resume) to 2.6.27.stable without
also backporting commit eafe5b99f2135488b21cf17a262c54997c44f784 (USB:
EHCI: fix remote-wakeup support for ARC/TDI core). This extracts the
necessary changes from the earlier patch and backports them.
The symptom of the bug is that the system will fail to suspend more
than once. The problem is caused by setting ehci->reset_done[i] but
never clearing it. When ehci_bus_suspend() sees a nonzero value
there, it assumes this means the port is in the middle of resuming so
it aborts the bus suspend.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Corey Wright <undefined@pobox.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/ehci-hub.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -254,10 +254,8 @@ static int ehci_bus_resume (struct usb_h
temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
temp &= ~(PORT_RWC_BITS | PORT_WAKE_BITS);
if (test_bit(i, &ehci->bus_suspended) &&
- (temp & PORT_SUSPEND)) {
- ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
+ (temp & PORT_SUSPEND))
temp |= PORT_RESUME;
- }
ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
}
i = HCS_N_PORTS (ehci->hcs_params);
@@ -752,6 +750,9 @@ static int ehci_hub_control (
ehci_readl(ehci, status_reg));
}
+ if (!(temp & (PORT_RESUME|PORT_RESET)))
+ ehci->reset_done[wIndex] = 0;
+
/* transfer dedicated ports to the companion hc */
if ((temp & PORT_CONNECT) &&
test_bit(wIndex, &ehci->companion_ports)) {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [11/45] ax25: Fix possible oops in ax25_make_new
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (9 preceding siblings ...)
2010-03-30 22:48 ` [10/45] EHCI: fix bug in keeping track of resuming ports Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [12/45] net: unix: fix sending fds in multiple buffers Greg KH
` (33 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jarek Poplawski,
David S. Miller, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jarek Poplawski <jarkao2@gmail.com>
commit 8c185ab6185bf5e67766edb000ce428269364c86 upstream.
In ax25_make_new, if kmemdup of digipeat returns an error, there would
be an oops in sk_free while calling sk_destruct, because sk_protinfo
is NULL at the moment; move sk->sk_destruct initialization after this.
BTW of reported-by: Bernard Pidoux F6BVP <f6bvp@free.fr>
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/ax25/af_ax25.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ax25/af_ax25.c
+++ b/net/ax25/af_ax25.c
@@ -894,7 +894,6 @@ struct sock *ax25_make_new(struct sock *
sock_init_data(NULL, sk);
- sk->sk_destruct = ax25_free_sock;
sk->sk_type = osk->sk_type;
sk->sk_priority = osk->sk_priority;
sk->sk_protocol = osk->sk_protocol;
@@ -932,6 +931,7 @@ struct sock *ax25_make_new(struct sock *
}
sk->sk_protinfo = ax25;
+ sk->sk_destruct = ax25_free_sock;
ax25->sk = sk;
return sk;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [12/45] net: unix: fix sending fds in multiple buffers
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (10 preceding siblings ...)
2010-03-30 22:48 ` [11/45] ax25: Fix possible oops in ax25_make_new Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [13/45] sit: fix off-by-one in ipip6_tunnel_get_prl Greg KH
` (32 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Miklos Szeredi,
David S. Miller, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Miklos Szeredi <mszeredi@suse.cz>
commit 8ba69ba6a324b13e1190fc31e41954d190fd4f1d upstream.
Kalle Olavi Niemitalo reported that:
"..., when one process calls sendmsg once to send 43804 bytes of
data and one file descriptor, and another process then calls recvmsg
three times to receive the 16032+16032+11740 bytes, each of those
recvmsg calls returns the file descriptor in the ancillary data. I
confirmed this with strace. The behaviour differs from Linux
2.6.26, where reportedly only one of those recvmsg calls (I think
the first one) returned the file descriptor."
This bug was introduced by a patch from me titled "net: unix: fix inflight
counting bug in garbage collector", commit 6209344f5.
And the reason is, quoting Kalle:
"Before your patch, unix_attach_fds() would set scm->fp = NULL, so
that if the loop in unix_stream_sendmsg() ran multiple iterations,
it could not call unix_attach_fds() again. But now,
unix_attach_fds() leaves scm->fp unchanged, and I think this causes
it to be called multiple times and duplicate the same file
descriptors to each struct sk_buff."
Fix this by introducing a flag that is cleared at the start and set
when the fds attached to the first buffer. The resulting code should
work equivalently to the one on 2.6.26.
Reported-by: Kalle Olavi Niemitalo <kon@iki.fi>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/unix/af_unix.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -1491,6 +1491,7 @@ static int unix_stream_sendmsg(struct ki
struct sk_buff *skb;
int sent=0;
struct scm_cookie tmp_scm;
+ bool fds_sent = false;
if (NULL == siocb->scm)
siocb->scm = &tmp_scm;
@@ -1552,12 +1553,14 @@ static int unix_stream_sendmsg(struct ki
size = min_t(int, size, skb_tailroom(skb));
memcpy(UNIXCREDS(skb), &siocb->scm->creds, sizeof(struct ucred));
- if (siocb->scm->fp) {
+ /* Only send the fds in the first buffer */
+ if (siocb->scm->fp && !fds_sent) {
err = unix_attach_fds(siocb->scm, skb);
if (err) {
kfree_skb(skb);
goto out_err;
}
+ fds_sent = true;
}
if ((err = memcpy_fromiovec(skb_put(skb,size), msg->msg_iov, size)) != 0) {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [13/45] sit: fix off-by-one in ipip6_tunnel_get_prl
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (11 preceding siblings ...)
2010-03-30 22:48 ` [12/45] net: unix: fix sending fds in multiple buffers Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [14/45] tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG() Greg KH
` (31 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Sascha Hlusiak,
Fred L. Templin, David S. Miller, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sascha Hlusiak <contact@saschahlusiak.de>
commit 298bf12ddb25841804f26234a43b89da1b1c0e21 upstream.
When requesting all prl entries (kprl.addr == INADDR_ANY) and there are
more prl entries than there is space passed from userspace, the existing
code would always copy cmax+1 entries, which is more than can be handled.
This patch makes the kernel copy only exactly cmax entries.
Signed-off-by: Sascha Hlusiak <contact@saschahlusiak.de>
Acked-By: Fred L. Templin <Fred.L.Templin@boeing.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv6/sit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv6/sit.c
+++ b/net/ipv6/sit.c
@@ -260,7 +260,7 @@ static int ipip6_tunnel_get_prl(struct i
c = 0;
for (prl = t->prl; prl; prl = prl->next) {
- if (c > cmax)
+ if (c >= cmax)
break;
if (kprl.addr != htonl(INADDR_ANY) && prl->addr != kprl.addr)
continue;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [14/45] tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG()
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (12 preceding siblings ...)
2010-03-30 22:48 ` [13/45] sit: fix off-by-one in ipip6_tunnel_get_prl Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [15/45] x86: fix csum_ipv6_magic asm memory clobber Greg KH
` (30 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Robert Varga,
David S. Miller, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Robert Varga <nite@hq.alert.sk>
commit 657e9649e745b06675aa5063c84430986cdc3afa upstream.
I have recently came across a preemption imbalance detected by:
<4>huh, entered ffffffff80644630 with preempt_count 00000102, exited with 00000101?
<0>------------[ cut here ]------------
<2>kernel BUG at /usr/src/linux/kernel/timer.c:664!
<0>invalid opcode: 0000 [1] PREEMPT SMP
with ffffffff80644630 being inet_twdr_hangman().
This appeared after I enabled CONFIG_TCP_MD5SIG and played with it a
bit, so I looked at what might have caused it.
One thing that struck me as strange is tcp_twsk_destructor(), as it
calls tcp_put_md5sig_pool() -- which entails a put_cpu(), causing the
detected imbalance. Found on 2.6.23.9, but 2.6.31 is affected as well,
as far as I can tell.
Signed-off-by: Robert Varga <nite@hq.alert.sk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/ipv4/tcp_minisocks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/ipv4/tcp_minisocks.c
+++ b/net/ipv4/tcp_minisocks.c
@@ -362,7 +362,7 @@ void tcp_twsk_destructor(struct sock *sk
#ifdef CONFIG_TCP_MD5SIG
struct tcp_timewait_sock *twsk = tcp_twsk(sk);
if (twsk->tw_md5_keylen)
- tcp_put_md5sig_pool();
+ tcp_free_md5sig_pool();
#endif
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [15/45] x86: fix csum_ipv6_magic asm memory clobber
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (13 preceding siblings ...)
2010-03-30 22:48 ` [14/45] tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG() Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [16/45] sky2: Set SKY2_HW_RAM_BUFFER in sky2_init Greg KH
` (29 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Samuel Thibault, Ingo Molnar,
Thomas Gleixner, H. Peter Anvin, David S. Miller, Andi Kleen,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
commit 392d814daf460a9564d29b2cebc51e1ea34e0504 upstream.
Just like ip_fast_csum, the assembly snippet in csum_ipv6_magic needs a
memory clobber, as it is only passed the address of the buffer, not a
memory reference to the buffer itself.
This caused failures in Hurd's pfinetv4 when we tried to compile it with
gcc-4.3 (bogus checksums).
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Cc: Andi Kleen <andi@firstfloor.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>
---
include/asm-x86/checksum_32.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/include/asm-x86/checksum_32.h
+++ b/include/asm-x86/checksum_32.h
@@ -161,7 +161,8 @@ static inline __sum16 csum_ipv6_magic(co
"adcl $0, %0 ;\n"
: "=&r" (sum)
: "r" (saddr), "r" (daddr),
- "r" (htonl(len)), "r" (htonl(proto)), "0" (sum));
+ "r" (htonl(len)), "r" (htonl(proto)), "0" (sum)
+ : "memory");
return csum_fold(sum);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [16/45] sky2: Set SKY2_HW_RAM_BUFFER in sky2_init
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (14 preceding siblings ...)
2010-03-30 22:48 ` [15/45] x86: fix csum_ipv6_magic asm memory clobber Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [17/45] sched: fine-tune SD_MC_INIT Greg KH
` (28 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mike McCormack,
Stephen Hemminger, David S. Miller, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mike McCormack <mikem@ring3k.org>
commit 74a61ebf653c6abe459f228eb40e9f24f7ef1fb7 upstream.
The SKY2_HW_RAM_BUFFER bit in hw->flags was checked in sky2_mac_init(),
before being set later in sky2_up().
Setting SKY2_HW_RAM_BUFFER in sky2_init() where other hw->flags are set
should avoid this problem recurring.
Signed-off-by: Mike McCormack <mikem@ring3k.org>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/sky2.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/drivers/net/sky2.c
+++ b/drivers/net/sky2.c
@@ -1438,7 +1438,6 @@ static int sky2_up(struct net_device *de
if (ramsize > 0) {
u32 rxspace;
- hw->flags |= SKY2_HW_RAM_BUFFER;
pr_debug(PFX "%s: ram buffer %dK\n", dev->name, ramsize);
if (ramsize < 16)
rxspace = ramsize / 2;
@@ -2846,6 +2845,9 @@ static int __devinit sky2_init(struct sk
++hw->ports;
}
+ if (sky2_read8(hw, B2_E_0))
+ hw->flags |= SKY2_HW_RAM_BUFFER;
+
return 0;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [17/45] sched: fine-tune SD_MC_INIT
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (15 preceding siblings ...)
2010-03-30 22:48 ` [16/45] sky2: Set SKY2_HW_RAM_BUFFER in sky2_init Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [18/45] sched: fine-tune SD_SIBLING_INIT Greg KH
` (27 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mike Galbraith,
Peter Zijlstra, Ingo Molnar, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mike Galbraith <efault@gmx.de>
commit 14800984706bf6936bbec5187f736e928be5c218 upstream.
Tune SD_MC_INIT the same way as SD_CPU_INIT:
unset SD_BALANCE_NEWIDLE, and set SD_WAKE_BALANCE.
This improves vmark by 5%:
vmark 132102 125968 125497 messages/sec avg 127855.66 .984
vmark 139404 131719 131272 messages/sec avg 134131.66 1.033
Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/topology.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -120,10 +120,10 @@ void arch_update_cpu_topology(void);
.wake_idx = 1, \
.forkexec_idx = 1, \
.flags = SD_LOAD_BALANCE \
- | SD_BALANCE_NEWIDLE \
| SD_BALANCE_FORK \
| SD_BALANCE_EXEC \
| SD_WAKE_AFFINE \
+ | SD_WAKE_BALANCE \
| SD_SHARE_PKG_RESOURCES\
| BALANCE_FOR_MC_POWER, \
.last_balance = jiffies, \
^ permalink raw reply [flat|nested] 432+ messages in thread
* [18/45] sched: fine-tune SD_SIBLING_INIT
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (16 preceding siblings ...)
2010-03-30 22:48 ` [17/45] sched: fine-tune SD_MC_INIT Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [19/45] sched: wakeup preempt when small overlap Greg KH
` (26 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ingo Molnar,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ingo Molnar <mingo@elte.hu>
commit 52c642f33b14bfa1b00ef2b68296effb34a573f3 upstream.
fine-tune the HT sched-domains parameters as well.
On a HT capable box, this increases lat_ctx performance from 23.87
usecs to 1.49 usecs:
# before
$ ./lat_ctx -s 0 2
"size=0k ovr=1.89
2 23.87
# after
$ ./lat_ctx -s 0 2
"size=0k ovr=1.84
2 1.49
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/topology.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/include/linux/topology.h
+++ b/include/linux/topology.h
@@ -99,7 +99,7 @@ void arch_update_cpu_topology(void);
| SD_BALANCE_FORK \
| SD_BALANCE_EXEC \
| SD_WAKE_AFFINE \
- | SD_WAKE_IDLE \
+ | SD_WAKE_BALANCE \
| SD_SHARE_CPUPOWER, \
.last_balance = jiffies, \
.balance_interval = 1, \
^ permalink raw reply [flat|nested] 432+ messages in thread
* [19/45] sched: wakeup preempt when small overlap
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (17 preceding siblings ...)
2010-03-30 22:48 ` [18/45] sched: fine-tune SD_SIBLING_INIT Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [20/45] drivers/char/mem.c: avoid OOM lockup during large reads from /dev/zero Greg KH
` (25 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Peter Zijlstra, Ingo Molnar,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
commit 15afe09bf496ae10c989e1a375a6b5da7bd3e16e upstream.
Lin Ming reported a 10% OLTP regression against 2.6.27-rc4.
The difference seems to come from different preemption agressiveness,
which affects the cache footprint of the workload and its effective
cache trashing.
Aggresively preempt a task if its avg overlap is very small, this should
avoid the task going to sleep and find it still running when we schedule
back to it - saving a wakeup.
Reported-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/sched.h | 2 +-
kernel/sched.c | 12 ++++++------
kernel/sched_fair.c | 13 ++++++++++---
kernel/sched_features.h | 1 +
kernel/sched_idletask.c | 6 +++---
kernel/sched_rt.c | 2 +-
6 files changed, 22 insertions(+), 14 deletions(-)
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -901,7 +901,7 @@ struct sched_class {
void (*yield_task) (struct rq *rq);
int (*select_task_rq)(struct task_struct *p, int sync);
- void (*check_preempt_curr) (struct rq *rq, struct task_struct *p);
+ void (*check_preempt_curr) (struct rq *rq, struct task_struct *p, int sync);
struct task_struct * (*pick_next_task) (struct rq *rq);
void (*put_prev_task) (struct rq *rq, struct task_struct *p);
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -604,9 +604,9 @@ struct rq {
static DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues);
-static inline void check_preempt_curr(struct rq *rq, struct task_struct *p)
+static inline void check_preempt_curr(struct rq *rq, struct task_struct *p, int sync)
{
- rq->curr->sched_class->check_preempt_curr(rq, p);
+ rq->curr->sched_class->check_preempt_curr(rq, p, sync);
}
static inline int cpu_of(struct rq *rq)
@@ -2285,7 +2285,7 @@ out_running:
trace_mark(kernel_sched_wakeup,
"pid %d state %ld ## rq %p task %p rq->curr %p",
p->pid, p->state, rq, p, rq->curr);
- check_preempt_curr(rq, p);
+ check_preempt_curr(rq, p, sync);
p->state = TASK_RUNNING;
#ifdef CONFIG_SMP
@@ -2420,7 +2420,7 @@ void wake_up_new_task(struct task_struct
trace_mark(kernel_sched_wakeup_new,
"pid %d state %ld ## rq %p task %p rq->curr %p",
p->pid, p->state, rq, p, rq->curr);
- check_preempt_curr(rq, p);
+ check_preempt_curr(rq, p, 0);
#ifdef CONFIG_SMP
if (p->sched_class->task_wake_up)
p->sched_class->task_wake_up(rq, p);
@@ -2880,7 +2880,7 @@ static void pull_task(struct rq *src_rq,
* Note that idle threads have a prio of MAX_PRIO, for this test
* to be always true for them.
*/
- check_preempt_curr(this_rq, p);
+ check_preempt_curr(this_rq, p, 0);
}
/*
@@ -5957,7 +5957,7 @@ static int __migrate_task(struct task_st
set_task_cpu(p, dest_cpu);
if (on_rq) {
activate_task(rq_dest, p, 0);
- check_preempt_curr(rq_dest, p);
+ check_preempt_curr(rq_dest, p, 0);
}
done:
ret = 1;
--- a/kernel/sched_fair.c
+++ b/kernel/sched_fair.c
@@ -1331,7 +1331,7 @@ static inline int depth_se(struct sched_
/*
* Preempt the current task with a newly woken task if needed:
*/
-static void check_preempt_wakeup(struct rq *rq, struct task_struct *p)
+static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int sync)
{
struct task_struct *curr = rq->curr;
struct cfs_rq *cfs_rq = task_cfs_rq(curr);
@@ -1360,6 +1360,13 @@ static void check_preempt_wakeup(struct
if (!sched_feat(WAKEUP_PREEMPT))
return;
+ if (sched_feat(WAKEUP_OVERLAP) && sync &&
+ se->avg_overlap < sysctl_sched_migration_cost &&
+ pse->avg_overlap < sysctl_sched_migration_cost) {
+ resched_task(curr);
+ return;
+ }
+
/*
* preemption test can be made between sibling entities who are in the
* same cfs_rq i.e who have a common parent. Walk up the hierarchy of
@@ -1642,7 +1649,7 @@ static void prio_changed_fair(struct rq
if (p->prio > oldprio)
resched_task(rq->curr);
} else
- check_preempt_curr(rq, p);
+ check_preempt_curr(rq, p, 0);
}
/*
@@ -1659,7 +1666,7 @@ static void switched_to_fair(struct rq *
if (running)
resched_task(rq->curr);
else
- check_preempt_curr(rq, p);
+ check_preempt_curr(rq, p, 0);
}
/* Account for a task changing its policy or group.
--- a/kernel/sched_features.h
+++ b/kernel/sched_features.h
@@ -11,3 +11,4 @@ SCHED_FEAT(ASYM_GRAN, 1)
SCHED_FEAT(LB_BIAS, 1)
SCHED_FEAT(LB_WAKEUP_UPDATE, 1)
SCHED_FEAT(ASYM_EFF_LOAD, 1)
+SCHED_FEAT(WAKEUP_OVERLAP, 1)
--- a/kernel/sched_idletask.c
+++ b/kernel/sched_idletask.c
@@ -14,7 +14,7 @@ static int select_task_rq_idle(struct ta
/*
* Idle tasks are unconditionally rescheduled:
*/
-static void check_preempt_curr_idle(struct rq *rq, struct task_struct *p)
+static void check_preempt_curr_idle(struct rq *rq, struct task_struct *p, int sync)
{
resched_task(rq->idle);
}
@@ -76,7 +76,7 @@ static void switched_to_idle(struct rq *
if (running)
resched_task(rq->curr);
else
- check_preempt_curr(rq, p);
+ check_preempt_curr(rq, p, 0);
}
static void prio_changed_idle(struct rq *rq, struct task_struct *p,
@@ -93,7 +93,7 @@ static void prio_changed_idle(struct rq
if (p->prio > oldprio)
resched_task(rq->curr);
} else
- check_preempt_curr(rq, p);
+ check_preempt_curr(rq, p, 0);
}
/*
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -784,7 +784,7 @@ static void check_preempt_equal_prio(str
/*
* Preempt the current task with a newly woken task if needed:
*/
-static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p)
+static void check_preempt_curr_rt(struct rq *rq, struct task_struct *p, int sync)
{
if (p->prio < rq->curr->prio) {
resched_task(rq->curr);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [20/45] drivers/char/mem.c: avoid OOM lockup during large reads from /dev/zero
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (18 preceding siblings ...)
2010-03-30 22:48 ` [19/45] sched: wakeup preempt when small overlap Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [21/45] i2c: Do not use device name after device_unregister Greg KH
` (24 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Salman Qazi, Nick Piggin,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Salman Qazi <sqazi@google.com>
commit 730c586ad5228c339949b2eb4e72b80ae167abc4 upstream.
While running 20 parallel instances of dd as follows:
#!/bin/bash
for i in `seq 1 20`; do
dd if=/dev/zero of=/export/hda3/dd_$i bs=1073741824 count=1 &
done
wait
on a 16G machine, we noticed that rather than just killing the processes,
the entire kernel went down. Stracing dd reveals that it first does an
mmap2, which makes 1GB worth of zero page mappings. Then it performs a
read on those pages from /dev/zero, and finally it performs a write.
The machine died during the reads. Looking at the code, it was noticed
that /dev/zero's read operation had been changed by
557ed1fa2620dc119adb86b34c614e152a629a80 ("remove ZERO_PAGE") from giving
zero page mappings to actually zeroing the page.
The zeroing of the pages causes physical pages to be allocated to the
process. But, when the process exhausts all the memory that it can, the
kernel cannot kill it, as it is still in the kernel mode allocating more
memory. Consequently, the kernel eventually crashes.
To fix this, I propose that when a fatal signal is pending during
/dev/zero read operation, we simply return and let the user process die.
Signed-off-by: Salman Qazi <sqazi@google.com>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
[ Modified error return and comment trivially. - Linus]
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/mem.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/char/mem.c
+++ b/drivers/char/mem.c
@@ -724,6 +724,9 @@ static ssize_t read_zero(struct file * f
written += chunk - unwritten;
if (unwritten)
break;
+ /* Consider changing this to just 'signal_pending()' with lots of testing */
+ if (fatal_signal_pending(current))
+ return written ? written : -EINTR;
buf += chunk;
count -= chunk;
cond_resched();
^ permalink raw reply [flat|nested] 432+ messages in thread
* [21/45] i2c: Do not use device name after device_unregister
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (19 preceding siblings ...)
2010-03-30 22:48 ` [20/45] drivers/char/mem.c: avoid OOM lockup during large reads from /dev/zero Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [22/45] serial: 8250: add serial transmitter fully empty test Greg KH
` (23 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan,
Thadeu Lima de Souza Cascardo, Jean Delvare, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1519 bytes --]
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
In Linus' tree:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c556752109794a5ff199b80a1673336b4df8433a
dev_dbg outputs dev_name, which is released with device_unregister. This bug
resulted in output like this:
i2c Xy2�0: adapter [SMBus I801 adapter at 1880] unregistered
The right output would be:
i2c i2c-0: adapter [SMBus I801 adapter at 1880] unregistered
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/i2c/i2c-core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -644,6 +644,9 @@ int i2c_del_adapter(struct i2c_adapter *
}
}
+ /* device name is gone after device_unregister */
+ dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name);
+
/* clean up the sysfs representation */
init_completion(&adap->dev_released);
device_unregister(&adap->dev);
@@ -654,8 +657,6 @@ int i2c_del_adapter(struct i2c_adapter *
/* free bus id */
idr_remove(&i2c_adapter_idr, adap->nr);
- dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name);
-
/* Clear the device structure in case this adapter is ever going to be
added again */
memset(&adap->dev, 0, sizeof(adap->dev));
^ permalink raw reply [flat|nested] 432+ messages in thread
* [22/45] serial: 8250: add serial transmitter fully empty test
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (20 preceding siblings ...)
2010-03-30 22:48 ` [21/45] i2c: Do not use device name after device_unregister Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [23/45] USB: usbfs: only copy the actual data received Greg KH
` (22 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dick Hollenbeck, Alan Cox,
Kees Schoenmakers, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dick Hollenbeck <dick@softplc.com>
commit bca476139d2ded86be146dae09b06e22548b67f3 upstream.
When controlling an industrial radio modem it can be necessary to
manipulate the handshake lines in order to control the radio modem's
transmitter, from userspace.
The transmitter should not be turned off before all characters have been
transmitted. serial8250_tx_empty() was reporting that all characters were
transmitted before they actually were.
===
Discovered in parallel with more testing and analysis by Kees Schoenmakers
as follows:
I ran into an NetMos 9835 serial pci board which behaves a little
different than the standard. This type of expansion board is very common.
"Standard" 8250 compatible devices clear the 'UART_LST_TEMT" bit together
with the "UART_LSR_THRE" bit when writing data to the device.
The NetMos device does it slightly different
I believe that the TEMT bit is coupled to the shift register. The problem
is that after writing data to the device and very quickly after that one
does call serial8250_tx_empty, it returns the wrong information.
My patch makes the test more robust (and solves the problem) and it does
not affect the already correct devices.
Alan:
We may yet need to quirk this but now we know which chips we have a
way to do that should we find this breaks some other 8250 clone with
dodgy THRE.
Signed-off-by: Dick Hollenbeck <dick@softplc.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/serial/8250.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -70,6 +70,9 @@ static unsigned int nr_uarts = CONFIG_SE
#define PASS_LIMIT 256
+#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
+
+
/*
* We default to IRQ0 for the "no irq" hack. Some
* machine types want others as well - they're free
@@ -1656,7 +1659,7 @@ static unsigned int serial8250_tx_empty(
up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
spin_unlock_irqrestore(&up->port.lock, flags);
- return lsr & UART_LSR_TEMT ? TIOCSER_TEMT : 0;
+ return (lsr & BOTH_EMPTY) == BOTH_EMPTY ? TIOCSER_TEMT : 0;
}
static unsigned int serial8250_get_mctrl(struct uart_port *port)
@@ -1714,8 +1717,6 @@ static void serial8250_break_ctl(struct
spin_unlock_irqrestore(&up->port.lock, flags);
}
-#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
-
/*
* Wait for transmitter & holding register to empty
*/
^ permalink raw reply [flat|nested] 432+ messages in thread
* [23/45] USB: usbfs: only copy the actual data received
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (21 preceding siblings ...)
2010-03-30 22:48 ` [22/45] serial: 8250: add serial transmitter fully empty test Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [24/45] USB: usbfs: properly clean up the as structure on error paths Greg KH
` (21 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Greg KH <greg@kroah.com>
commit d4a4683ca054ed9917dfc9e3ff0f7ecf74ad90d6 upstream.
We need to only copy the data received by the device to userspace, not
the whole kernel buffer, which can contain "stale" data.
Thanks to Marcus Meissner for pointing this out and testing the fix.
Reported-by: Marcus Meissner <meissner@suse.de>
Tested-by: Marcus Meissner <meissner@suse.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/devio.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1224,9 +1224,9 @@ static int processcompl(struct async *as
void __user *addr = as->userurb;
unsigned int i;
- if (as->userbuffer)
+ if (as->userbuffer && urb->actual_length)
if (copy_to_user(as->userbuffer, urb->transfer_buffer,
- urb->transfer_buffer_length))
+ urb->actual_length))
goto err_out;
if (put_user(as->status, &userurb->status))
goto err_out;
@@ -1347,9 +1347,9 @@ static int processcompl_compat(struct as
void __user *addr = as->userurb;
unsigned int i;
- if (as->userbuffer)
+ if (as->userbuffer && urb->actual_length)
if (copy_to_user(as->userbuffer, urb->transfer_buffer,
- urb->transfer_buffer_length))
+ urb->actual_length))
return -EFAULT;
if (put_user(as->status, &userurb->status))
return -EFAULT;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [24/45] USB: usbfs: properly clean up the as structure on error paths
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (22 preceding siblings ...)
2010-03-30 22:48 ` [23/45] USB: usbfs: only copy the actual data received Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [25/45] USB: EHCI: fix counting of transaction error retries Greg KH
` (20 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern, Marcus Meissner,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit ddeee0b2eec2a51b0712b04de4b39e7bec892a53 upstream.
I notice that the processcompl_compat() function seems to be leaking the
'struct async *as' in the error paths.
I think that the calling convention is fundamentally buggered. The
caller is the one that did the "reap_as()" to get the as thing, the
caller should be the one to free it too.
Freeing it in the caller also means that it very clearly always gets
freed, and avoids the need for any "free in the error case too".
From: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Marcus Meissner <meissner@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/devio.c | 40 ++++++++++++++++++++++++++--------------
1 file changed, 26 insertions(+), 14 deletions(-)
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1246,14 +1246,11 @@ static int processcompl(struct async *as
}
}
- free_async(as);
-
if (put_user(addr, (void __user * __user *)arg))
return -EFAULT;
return 0;
err_out:
- free_async(as);
return -EFAULT;
}
@@ -1283,8 +1280,11 @@ static struct async *reap_as(struct dev_
static int proc_reapurb(struct dev_state *ps, void __user *arg)
{
struct async *as = reap_as(ps);
- if (as)
- return processcompl(as, (void __user * __user *)arg);
+ if (as) {
+ int retval = processcompl(as, (void __user * __user *)arg);
+ free_async(as);
+ return retval;
+ }
if (signal_pending(current))
return -EINTR;
return -EIO;
@@ -1292,11 +1292,16 @@ static int proc_reapurb(struct dev_state
static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg)
{
+ int retval;
struct async *as;
- if (!(as = async_getcompleted(ps)))
- return -EAGAIN;
- return processcompl(as, (void __user * __user *)arg);
+ as = async_getcompleted(ps);
+ retval = -EAGAIN;
+ if (as) {
+ retval = processcompl(as, (void __user * __user *)arg);
+ free_async(as);
+ }
+ return retval;
}
#ifdef CONFIG_COMPAT
@@ -1369,7 +1374,6 @@ static int processcompl_compat(struct as
}
}
- free_async(as);
if (put_user(ptr_to_compat(addr), (u32 __user *)arg))
return -EFAULT;
return 0;
@@ -1378,8 +1382,11 @@ static int processcompl_compat(struct as
static int proc_reapurb_compat(struct dev_state *ps, void __user *arg)
{
struct async *as = reap_as(ps);
- if (as)
- return processcompl_compat(as, (void __user * __user *)arg);
+ if (as) {
+ int retval = processcompl_compat(as, (void __user * __user *)arg);
+ free_async(as);
+ return retval;
+ }
if (signal_pending(current))
return -EINTR;
return -EIO;
@@ -1387,11 +1394,16 @@ static int proc_reapurb_compat(struct de
static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg)
{
+ int retval;
struct async *as;
- if (!(as = async_getcompleted(ps)))
- return -EAGAIN;
- return processcompl_compat(as, (void __user * __user *)arg);
+ retval = -EAGAIN;
+ as = async_getcompleted(ps);
+ if (as) {
+ retval = processcompl_compat(as, (void __user * __user *)arg);
+ free_async(as);
+ }
+ return retval;
}
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [25/45] USB: EHCI: fix counting of transaction error retries
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (23 preceding siblings ...)
2010-03-30 22:48 ` [24/45] USB: usbfs: properly clean up the as structure on error paths Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [26/45] KVM: x86 emulator: limit instructions to 15 bytes Greg KH
` (19 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Reinoud Koornstra, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit ef4638f955f2c4a667c8af20769d03f5ed3781ca upstream.
This patch (as1274) simplifies the counting of transaction-error
retries. Now we will count up from 0 to QH_XACTERR_MAX instead of
down from QH_XACTERR_MAX to 0.
The patch also fixes a small bug: qh->xacterr was not getting
initialized for interrupt endpoints.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Matthijs Kooijman <matthijs@stdin.nl>
Cc: Reinoud Koornstra <koornstra@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/ehci-q.c | 11 +++++------
drivers/usb/host/ehci-sched.c | 1 +
2 files changed, 6 insertions(+), 6 deletions(-)
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -346,12 +346,11 @@ qh_completions (struct ehci_hcd *ehci, s
*/
if ((token & QTD_STS_XACT) &&
QTD_CERR(token) == 0 &&
- --qh->xacterrs > 0 &&
+ ++qh->xacterrs < QH_XACTERR_MAX &&
!urb->unlinked) {
ehci_dbg(ehci,
- "detected XactErr len %d/%d retry %d\n",
- qtd->length - QTD_LENGTH(token), qtd->length,
- QH_XACTERR_MAX - qh->xacterrs);
+ "detected XactErr len %zu/%zu retry %d\n",
+ qtd->length - QTD_LENGTH(token), qtd->length, qh->xacterrs);
/* reset the token in the qtd and the
* qh overlay (which still contains
@@ -451,7 +450,7 @@ halt:
last = qtd;
/* reinit the xacterr counter for the next qtd */
- qh->xacterrs = QH_XACTERR_MAX;
+ qh->xacterrs = 0;
}
/* last urb's completion might still need calling */
@@ -898,7 +897,7 @@ static void qh_link_async (struct ehci_h
head->qh_next.qh = qh;
head->hw_next = dma;
- qh->xacterrs = QH_XACTERR_MAX;
+ qh->xacterrs = 0;
qh->qh_state = QH_STATE_LINKED;
/* qtd completions reported later by interrupt */
}
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -542,6 +542,7 @@ static int qh_link_periodic (struct ehci
}
}
qh->qh_state = QH_STATE_LINKED;
+ qh->xacterrs = 0;
qh_get (qh);
/* update per-qh bandwidth for usbfs */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [26/45] KVM: x86 emulator: limit instructions to 15 bytes
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (24 preceding siblings ...)
2010-03-30 22:48 ` [25/45] USB: EHCI: fix counting of transaction error retries Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [27/45] ext4: Avoid null pointer dereference when decoding EROFS w/o a journal Greg KH
` (18 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Avi Kivity,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
commit eb3c79e64a70fb8f7473e30fa07e89c1ecc2c9bb upstream
[ <cebbert@redhat.com>: backport to 2.6.27 ]
While we are never normally passed an instruction that exceeds 15 bytes,
smp games can cause us to attempt to interpret one, which will cause
large latencies in non-preempt hosts.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kvm/x86_emulate.c | 5 ++++-
include/asm-x86/kvm_x86_emulate.h | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -581,6 +581,9 @@ static int do_insn_fetch(struct x86_emul
{
int rc = 0;
+ /* x86 instructions are limited to 15 bytes. */
+ if (eip + size - ctxt->decode.eip_orig > 15)
+ return X86EMUL_UNHANDLEABLE;
eip += ctxt->cs_base;
while (size--) {
rc = do_fetch_insn_byte(ctxt, ops, eip++, dest++);
@@ -839,7 +842,7 @@ x86_decode_insn(struct x86_emulate_ctxt
/* Shadow copy of register state. Committed on successful emulation. */
memset(c, 0, sizeof(struct decode_cache));
- c->eip = ctxt->vcpu->arch.rip;
+ c->eip = c->eip_orig = ctxt->vcpu->arch.rip;
ctxt->cs_base = seg_base(ctxt, VCPU_SREG_CS);
memcpy(c->regs, ctxt->vcpu->arch.regs, sizeof c->regs);
--- a/include/asm-x86/kvm_x86_emulate.h
+++ b/include/asm-x86/kvm_x86_emulate.h
@@ -128,7 +128,7 @@ struct decode_cache {
u8 seg_override;
unsigned int d;
unsigned long regs[NR_VCPU_REGS];
- unsigned long eip;
+ unsigned long eip, eip_orig;
/* modrm */
u8 modrm;
u8 modrm_mod;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [27/45] ext4: Avoid null pointer dereference when decoding EROFS w/o a journal
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (25 preceding siblings ...)
2010-03-30 22:48 ` [26/45] KVM: x86 emulator: limit instructions to 15 bytes Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [28/45] KVM: VMX: Check cpl before emulating debug register access Greg KH
` (17 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric Sesterhenn,
Theodore Tso, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Theodore Ts'o <tytso@mit.edu>
commit 78f1ddbb498283c2445c11b0dfa666424c301803 upstream.
We need to check to make sure a journal is present before checking the
journal flags in ext4_decode_error().
Signed-off-by: Eric Sesterhenn <eric.sesterhenn@lsexperts.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ext4/super.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -254,7 +254,8 @@ static const char *ext4_decode_error(str
errstr = "Out of memory";
break;
case -EROFS:
- if (!sb || EXT4_SB(sb)->s_journal->j_flags & JBD2_ABORT)
+ if (!sb || (EXT4_SB(sb)->s_journal &&
+ EXT4_SB(sb)->s_journal->j_flags & JBD2_ABORT))
errstr = "Journal has aborted";
else
errstr = "Readonly filesystem";
^ permalink raw reply [flat|nested] 432+ messages in thread
* [28/45] KVM: VMX: Check cpl before emulating debug register access
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (26 preceding siblings ...)
2010-03-30 22:48 ` [27/45] ext4: Avoid null pointer dereference when decoding EROFS w/o a journal Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [29/45] drm/r128: Add test for initialisation to all ioctls that require it Greg KH
` (16 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Avi Kivity, Marcelo Tosatti,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Avi Kivity <avi@redhat.com>
commit 0a79b009525b160081d75cef5dbf45817956acf2 upstream.
Debug registers may only be accessed from cpl 0. Unfortunately, vmx will
code to emulate the instruction even though it was issued from guest
userspace, possibly leading to an unexpected trap later.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kvm/vmx.c | 3 +++
arch/x86/kvm/x86.c | 13 +++++++++++++
include/asm-x86/kvm_host.h | 1 +
3 files changed, 17 insertions(+)
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -2464,6 +2464,9 @@ static int handle_dr(struct kvm_vcpu *vc
unsigned long val;
int dr, reg;
+ if (!kvm_require_cpl(vcpu, 0))
+ return 1;
+
/*
* FIXME: this code assumes the host is debugging the guest.
* need to deal with guest debugging itself too.
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -198,6 +198,19 @@ static void __queue_exception(struct kvm
}
/*
+ * Checks if cpl <= required_cpl; if true, return true. Otherwise queue
+ * a #GP and return false.
+ */
+bool kvm_require_cpl(struct kvm_vcpu *vcpu, int required_cpl)
+{
+ if (kvm_x86_ops->get_cpl(vcpu) <= required_cpl)
+ return true;
+ kvm_queue_exception_e(vcpu, GP_VECTOR, 0);
+ return false;
+}
+EXPORT_SYMBOL_GPL(kvm_require_cpl);
+
+/*
* Load the pae pdptrs. Return true is they are all valid.
*/
int load_pdptrs(struct kvm_vcpu *vcpu, unsigned long cr3)
--- a/include/asm-x86/kvm_host.h
+++ b/include/asm-x86/kvm_host.h
@@ -537,6 +537,7 @@ void kvm_queue_exception(struct kvm_vcpu
void kvm_queue_exception_e(struct kvm_vcpu *vcpu, unsigned nr, u32 error_code);
void kvm_inject_page_fault(struct kvm_vcpu *vcpu, unsigned long cr2,
u32 error_code);
+bool kvm_require_cpl(struct kvm_vcpu *vcpu, int required_cpl);
void kvm_inject_nmi(struct kvm_vcpu *vcpu);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [29/45] drm/r128: Add test for initialisation to all ioctls that require it
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (27 preceding siblings ...)
2010-03-30 22:48 ` [28/45] KVM: VMX: Check cpl before emulating debug register access Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [30/45] tc: Fix unitialized kernel memory leak Greg KH
` (15 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ben Hutchings, Dave Airlie,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ben Hutchings <ben@decadent.org.uk>
commit 7dc482dfeeeefcfd000d4271c4626937406756d7 upstream.
Almost all r128's private ioctls require that the CCE state has
already been initialised. However, most do not test that this has
been done, and will proceed to dereference a null pointer. This may
result in a security vulnerability, since some ioctls are
unprivileged.
This adds a macro for the common initialisation test and changes all
ioctl implementations that require prior initialisation to use that
macro.
Also, r128_do_init_cce() does not test that the CCE state has not
been initialised already. Repeated initialisation may lead to a crash
or resource leak. This adds that test.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/r128/r128_cce.c | 18 ++++++++++++++----
drivers/gpu/drm/r128/r128_drv.h | 8 ++++++++
drivers/gpu/drm/r128/r128_state.c | 36 +++++++++++++++++++-----------------
3 files changed, 41 insertions(+), 21 deletions(-)
--- a/drivers/gpu/drm/r128/r128_cce.c
+++ b/drivers/gpu/drm/r128/r128_cce.c
@@ -353,6 +353,11 @@ static int r128_do_init_cce(struct drm_d
DRM_DEBUG("\n");
+ if (dev->dev_private) {
+ DRM_DEBUG("called when already initialized\n");
+ return -EINVAL;
+ }
+
dev_priv = drm_alloc(sizeof(drm_r128_private_t), DRM_MEM_DRIVER);
if (dev_priv == NULL)
return -ENOMEM;
@@ -651,6 +656,8 @@ int r128_cce_start(struct drm_device *de
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
if (dev_priv->cce_running || dev_priv->cce_mode == R128_PM4_NONPM4) {
DRM_DEBUG("while CCE running\n");
return 0;
@@ -673,6 +680,8 @@ int r128_cce_stop(struct drm_device *dev
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
/* Flush any pending CCE commands. This ensures any outstanding
* commands are exectuted by the engine before we turn it off.
*/
@@ -710,10 +719,7 @@ int r128_cce_reset(struct drm_device *de
LOCK_TEST_WITH_RETURN(dev, file_priv);
- if (!dev_priv) {
- DRM_DEBUG("called before init done\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
r128_do_cce_reset(dev_priv);
@@ -730,6 +736,8 @@ int r128_cce_idle(struct drm_device *dev
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
if (dev_priv->cce_running) {
r128_do_cce_flush(dev_priv);
}
@@ -743,6 +751,8 @@ int r128_engine_reset(struct drm_device
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev->dev_private);
+
return r128_do_engine_reset(dev);
}
--- a/drivers/gpu/drm/r128/r128_drv.h
+++ b/drivers/gpu/drm/r128/r128_drv.h
@@ -418,6 +418,14 @@ static __inline__ void r128_update_ring_
* Misc helper macros
*/
+#define DEV_INIT_TEST_WITH_RETURN(_dev_priv) \
+do { \
+ if (!_dev_priv) { \
+ DRM_ERROR("called with no initialization\n"); \
+ return -EINVAL; \
+ } \
+} while (0)
+
#define RING_SPACE_TEST_WITH_RETURN( dev_priv ) \
do { \
drm_r128_ring_buffer_t *ring = &dev_priv->ring; int i; \
--- a/drivers/gpu/drm/r128/r128_state.c
+++ b/drivers/gpu/drm/r128/r128_state.c
@@ -1244,14 +1244,18 @@ static void r128_cce_dispatch_stipple(st
static int r128_cce_clear(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
drm_r128_private_t *dev_priv = dev->dev_private;
- drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
+ drm_r128_sarea_t *sarea_priv;
drm_r128_clear_t *clear = data;
DRM_DEBUG("\n");
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
RING_SPACE_TEST_WITH_RETURN(dev_priv);
+ sarea_priv = dev_priv->sarea_priv;
+
if (sarea_priv->nbox > R128_NR_SAREA_CLIPRECTS)
sarea_priv->nbox = R128_NR_SAREA_CLIPRECTS;
@@ -1312,6 +1316,8 @@ static int r128_cce_flip(struct drm_devi
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
RING_SPACE_TEST_WITH_RETURN(dev_priv);
if (!dev_priv->page_flipping)
@@ -1331,6 +1337,8 @@ static int r128_cce_swap(struct drm_devi
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
RING_SPACE_TEST_WITH_RETURN(dev_priv);
if (sarea_priv->nbox > R128_NR_SAREA_CLIPRECTS)
@@ -1354,10 +1362,7 @@ static int r128_cce_vertex(struct drm_de
LOCK_TEST_WITH_RETURN(dev, file_priv);
- if (!dev_priv) {
- DRM_ERROR("called with no initialization\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
DRM_DEBUG("pid=%d index=%d count=%d discard=%d\n",
DRM_CURRENTPID, vertex->idx, vertex->count, vertex->discard);
@@ -1410,10 +1415,7 @@ static int r128_cce_indices(struct drm_d
LOCK_TEST_WITH_RETURN(dev, file_priv);
- if (!dev_priv) {
- DRM_ERROR("called with no initialization\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
DRM_DEBUG("pid=%d buf=%d s=%d e=%d d=%d\n", DRM_CURRENTPID,
elts->idx, elts->start, elts->end, elts->discard);
@@ -1476,6 +1478,8 @@ static int r128_cce_blit(struct drm_devi
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
DRM_DEBUG("pid=%d index=%d\n", DRM_CURRENTPID, blit->idx);
if (blit->idx < 0 || blit->idx >= dma->buf_count) {
@@ -1501,6 +1505,8 @@ static int r128_cce_depth(struct drm_dev
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
RING_SPACE_TEST_WITH_RETURN(dev_priv);
ret = -EINVAL;
@@ -1531,6 +1537,8 @@ static int r128_cce_stipple(struct drm_d
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
if (DRM_COPY_FROM_USER(&mask, stipple->mask, 32 * sizeof(u32)))
return -EFAULT;
@@ -1555,10 +1563,7 @@ static int r128_cce_indirect(struct drm_
LOCK_TEST_WITH_RETURN(dev, file_priv);
- if (!dev_priv) {
- DRM_ERROR("called with no initialization\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
DRM_DEBUG("idx=%d s=%d e=%d d=%d\n",
indirect->idx, indirect->start, indirect->end,
@@ -1620,10 +1625,7 @@ static int r128_getparam(struct drm_devi
drm_r128_getparam_t *param = data;
int value;
- if (!dev_priv) {
- DRM_ERROR("called with no initialization\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [30/45] tc: Fix unitialized kernel memory leak
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (28 preceding siblings ...)
2010-03-30 22:48 ` [29/45] drm/r128: Add test for initialisation to all ioctls that require it Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [31/45] parisc: isa-eeprom - Fix loff_t usage Greg KH
` (14 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric Dumazet,
David S. Miller, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric Dumazet <eric.dumazet@gmail.com>
commit 16ebb5e0b36ceadc8186f71d68b0c4fa4b6e781b upstream.
Three bytes of uninitialized kernel memory are currently leaked to user
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sched/sch_api.c | 2 ++
1 file changed, 2 insertions(+)
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1453,6 +1453,8 @@ static int tc_fill_tclass(struct sk_buff
nlh = NLMSG_NEW(skb, pid, seq, event, sizeof(*tcm), flags);
tcm = NLMSG_DATA(nlh);
tcm->tcm_family = AF_UNSPEC;
+ tcm->tcm__pad1 = 0;
+ tcm->tcm__pad2 = 0;
tcm->tcm_ifindex = qdisc_dev(q)->ifindex;
tcm->tcm_parent = q->handle;
tcm->tcm_handle = q->handle;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [31/45] parisc: isa-eeprom - Fix loff_t usage
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (29 preceding siblings ...)
2010-03-30 22:48 ` [30/45] tc: Fix unitialized kernel memory leak Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [32/45] KVM: x86: check for cr3 validity in ioctl_set_sregs Greg KH
` (13 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Michael Buesch, Helge Deller,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Buesch <mb@bu3sch.de>
commit 6b4dbcd86a9d464057fcc7abe4d0574093071fcc upstream.
loff_t is a signed type. If userspace passes a negative ppos, the "count"
range check is weakened. "count"s bigger than HPEE_MAX_LENGTH will pass the check.
Also, if ppos is negative, the readb(eisa_eeprom_addr + *ppos) will poke in random
memory.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/parisc/eisa_eeprom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/parisc/eisa_eeprom.c
+++ b/drivers/parisc/eisa_eeprom.c
@@ -55,7 +55,7 @@ static ssize_t eisa_eeprom_read(struct f
ssize_t ret;
int i;
- if (*ppos >= HPEE_MAX_LENGTH)
+ if (*ppos < 0 || *ppos >= HPEE_MAX_LENGTH)
return 0;
count = *ppos + count < HPEE_MAX_LENGTH ? count : HPEE_MAX_LENGTH - *ppos;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [32/45] KVM: x86: check for cr3 validity in ioctl_set_sregs
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (30 preceding siblings ...)
2010-03-30 22:48 ` [31/45] parisc: isa-eeprom - Fix loff_t usage Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [33/45] fix LOOKUP_FOLLOW on automount "symlinks" Greg KH
` (12 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Marcelo Tosatti, Avi Kivity,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marcelo Tosatti <mtosatti@redhat.com>
commit 59839dfff5eabca01cc4e20b45797a60a80af8cb upstream.
Matt T. Yourst notes that kvm_arch_vcpu_ioctl_set_sregs lacks validity
checking for the new cr3 value:
"Userspace callers of KVM_SET_SREGS can pass a bogus value of cr3 to
the kernel. This will trigger a NULL pointer access in gfn_to_rmap()
when userspace next tries to call KVM_RUN on the affected VCPU and kvm
attempts to activate the new non-existent page table root.
This happens since kvm only validates that cr3 points to a valid guest
physical memory page when code *inside* the guest sets cr3. However, kvm
currently trusts the userspace caller (e.g. QEMU) on the host machine to
always supply a valid page table root, rather than properly validating
it along with the rest of the reloaded guest state."
http://sourceforge.net/tracker/?func=detail&atid=893831&aid=2687641&group_id=180599
Check for a valid cr3 address in kvm_arch_vcpu_ioctl_set_sregs, triple
fault in case of failure.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kvm/x86.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3658,7 +3658,13 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct
vcpu->arch.cr2 = sregs->cr2;
mmu_reset_needed |= vcpu->arch.cr3 != sregs->cr3;
- vcpu->arch.cr3 = sregs->cr3;
+
+ down_read(&vcpu->kvm->slots_lock);
+ if (gfn_to_memslot(vcpu->kvm, sregs->cr3 >> PAGE_SHIFT))
+ vcpu->arch.cr3 = sregs->cr3;
+ else
+ set_bit(KVM_REQ_TRIPLE_FAULT, &vcpu->requests);
+ up_read(&vcpu->kvm->slots_lock);
kvm_set_cr8(vcpu, sregs->cr8);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [33/45] fix LOOKUP_FOLLOW on automount "symlinks"
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (31 preceding siblings ...)
2010-03-30 22:48 ` [32/45] KVM: x86: check for cr3 validity in ioctl_set_sregs Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [34/45] x86, ia32_aout: do not kill argument mapping Greg KH
` (11 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Al Viro, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@ZenIV.linux.org.uk>
commit ac278a9c505092dd82077a2446af8f9fc0d9c095 upstream.
Make sure that automount "symlinks" are followed regardless of LOOKUP_FOLLOW;
it should have no effect on them.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/namei.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -841,6 +841,17 @@ fail:
}
/*
+ * This is a temporary kludge to deal with "automount" symlinks; proper
+ * solution is to trigger them on follow_mount(), so that do_lookup()
+ * would DTRT. To be killed before 2.6.34-final.
+ */
+static inline int follow_on_final(struct inode *inode, unsigned lookup_flags)
+{
+ return inode && unlikely(inode->i_op->follow_link) &&
+ ((lookup_flags & LOOKUP_FOLLOW) || S_ISDIR(inode->i_mode));
+}
+
+/*
* Name resolution.
* This is the basic name resolution function, turning a pathname into
* the final dentry. We expect 'base' to be positive and a directory.
@@ -984,8 +995,7 @@ last_component:
if (err)
break;
inode = next.dentry->d_inode;
- if ((lookup_flags & LOOKUP_FOLLOW)
- && inode && inode->i_op && inode->i_op->follow_link) {
+ if (follow_on_final(inode, lookup_flags)) {
err = do_follow_link(&next, nd);
if (err)
goto return_err;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [34/45] x86, ia32_aout: do not kill argument mapping
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (32 preceding siblings ...)
2010-03-30 22:48 ` [33/45] fix LOOKUP_FOLLOW on automount "symlinks" Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [35/45] coredump: suppress uid comparison test if core output files are pipes Greg KH
` (10 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jiri Slaby, Ingo Molnar,
Thomas Gleixner, Ollie Wild, x86, H. Peter Anvin,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Slaby <jslaby@suse.cz>
commit 318f6b228ba88a394ef560efc1bfe028ad5ae6b6 upstream.
Do not set current->mm->mmap to NULL in 32-bit emulation on 64-bit
load_aout_binary after flush_old_exec as it would destroy already
set brpm mapping with arguments.
Introduced by b6a2fea39318e43fee84fa7b0b90d68bed92d2ba
mm: variable length argument support
where the argument mapping in bprm was added.
[ hpa: this is a regression from 2.6.22... time to kill a.out? ]
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
LKML-Reference: <1265831716-7668-1-git-send-email-jslaby@suse.cz>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ollie Wild <aaw@google.com>
Cc: x86@kernel.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/ia32/ia32_aout.c | 1 -
1 file changed, 1 deletion(-)
--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -324,7 +324,6 @@ static int load_aout_binary(struct linux
current->mm->free_area_cache = TASK_UNMAPPED_BASE;
current->mm->cached_hole_size = 0;
- current->mm->mmap = NULL;
compute_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [35/45] coredump: suppress uid comparison test if core output files are pipes
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (33 preceding siblings ...)
2010-03-30 22:48 ` [34/45] x86, ia32_aout: do not kill argument mapping Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [36/45] bonding: ignore updelay param when there is no active slave Greg KH
` (9 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Neil Horman, Andi Kleen,
Oleg Nesterov, Al Viro, Ingo Molnar, maximilian attems,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Neil Horman <nhorman@tuxdriver.com>
commit 76595f79d76fbe6267a51b3a866a028d150f06d4 upstream.
Modify uid check in do_coredump so as to not apply it in the case of
pipes.
This just got noticed in testing. The end of do_coredump validates the
uid of the inode for the created file against the uid of the crashing
process to ensure that no one can pre-create a core file with different
ownership and grab the information contained in the core when they
shouldn' tbe able to. This causes failures when using pipes for a core
dumps if the crashing process is not root, which is the uid of the pipe
when it is created.
The fix is simple. Since the check for matching uid's isn't relevant for
pipes (a process can't create a pipe that the uermodehelper code will open
anyway), we can just just skip it in the event ispipe is non-zero
Reverts a pipe-affecting change which was accidentally made in
: commit c46f739dd39db3b07ab5deb4e3ec81e1c04a91af
: Author: Ingo Molnar <mingo@elte.hu>
: AuthorDate: Wed Nov 28 13:59:18 2007 +0100
: Commit: Linus Torvalds <torvalds@woody.linux-foundation.org>
: CommitDate: Wed Nov 28 10:58:01 2007 -0800
:
: vfs: coredumping fix
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/exec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1826,8 +1826,9 @@ int do_coredump(long signr, int exit_cod
/*
* Dont allow local users get cute and trick others to coredump
* into their pre-created files:
+ * Note, this is not relevant for pipes
*/
- if (inode->i_uid != current->fsuid)
+ if (!ispipe && (inode->i_uid != current->fsuid))
goto close_fail;
if (!file->f_op)
goto close_fail;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [36/45] bonding: ignore updelay param when there is no active slave
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (34 preceding siblings ...)
2010-03-30 22:48 ` [35/45] coredump: suppress uid comparison test if core output files are pipes Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [37/45] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
` (8 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jiri Pirko, David S. Miller,
Jean Delvare, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Pirko <jpirko@redhat.com>
commit 41f8910040639eb106b1a5b5301aab79ecde4940 upstream.
Pointed out by Sean E. Millichamp.
Quote from Documentation/networking/bonding.txt:
"Note that when a bonding interface has no active links, the
driver will immediately reuse the first link that goes up, even if the
updelay parameter has been specified (the updelay is ignored in this
case). If there are slave interfaces waiting for the updelay timeout
to expire, the interface that first went into that state will be
immediately reused. This reduces down time of the network if the
value of updelay has been overestimated, and since this occurs only in
cases with no connectivity, there is no additional penalty for
ignoring the updelay."
This patch actually changes the behaviour in this way.
Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Cc: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/bonding/bond_main.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/drivers/net/bonding/bond_main.c
+++ b/drivers/net/bonding/bond_main.c
@@ -2228,6 +2228,9 @@ static int bond_miimon_inspect(struct bo
{
struct slave *slave;
int i, link_state, commit = 0;
+ bool ignore_updelay;
+
+ ignore_updelay = !bond->curr_active_slave ? true : false;
bond_for_each_slave(bond, slave, i) {
slave->new_link = BOND_LINK_NOCHANGE;
@@ -2292,6 +2295,7 @@ static int bond_miimon_inspect(struct bo
": %s: link status up for "
"interface %s, enabling it in %d ms.\n",
bond->dev->name, slave->dev->name,
+ ignore_updelay ? 0 :
bond->params.updelay *
bond->params.miimon);
}
@@ -2310,9 +2314,13 @@ static int bond_miimon_inspect(struct bo
continue;
}
+ if (ignore_updelay)
+ slave->delay = 0;
+
if (slave->delay <= 0) {
slave->new_link = BOND_LINK_UP;
commit++;
+ ignore_updelay = false;
continue;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [37/45] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (35 preceding siblings ...)
2010-03-30 22:48 ` [36/45] bonding: ignore updelay param when there is no active slave Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [38/45] b44 WOL setup: one-bit-off stack corruption kernel panic fix Greg KH
` (7 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Francesco Lavra,
Mauro Carvalho Chehab, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Francesco Lavra <francescolavra@interfree.it>
commit 19f48cb105b7fa18d0dcab435919a3a29b7a7c4c upstream.
this patch fixes a memory leak which occurs when an em28xx card with DVB
extension is unplugged or its DVB extension driver is unloaded. In
dvb_fini(), dev->dvb must be freed before being set to NULL, as is done
in dvb_init() in case of error.
Note that this bug is also present in the latest stable kernel release.
Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/media/video/em28xx/em28xx-dvb.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -501,6 +501,7 @@ static int dvb_fini(struct em28xx *dev)
if (dev->dvb) {
unregister_dvb(dev->dvb);
+ kfree(dev->dvb);
dev->dvb = NULL;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [38/45] b44 WOL setup: one-bit-off stack corruption kernel panic fix
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (36 preceding siblings ...)
2010-03-30 22:48 ` [37/45] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:48 ` [39/45] tmpfs: fix oops on mounts with mpol=default Greg KH
` (6 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Stanislav Brabec,
David S. Miller, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stanislav Brabec <sbrabec@suse.cz>
commit e0188829cb724e7d12a2d4e343b368ff1d6e1471 upstream.
About 50% of shutdowns of b44 Ethernet adapter ends by kernel panic
with kernels compiled with stack-protector.
Checking b44_magic_pattern() return values, one call of
b44_magic_pattern() returns 127. It means, that set_bit(128, pmask)
was called on line 1509. It means that bit 0 of 17th byte of pmask was
overwritten. But pmask has only 16 bytes. Stack corruption happens.
It seems that set_bit() on line 1509 always writes one bit off.
The fix does not only solve the stack corruption, but also makes Wake
On LAN working on my onboard B44 on Asus A7V-333X mainboard.
It seems that this problem affects all kernel versions since commit
725ad800 ([PATCH] b44: add wol for old nic) on 2006-06-20.
Signed-off-by: Stanislav Brabec <sbrabec@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/b44.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/net/b44.c
+++ b/drivers/net/b44.c
@@ -1502,8 +1502,7 @@ static int b44_magic_pattern(u8 *macaddr
for (k = 0; k< ethaddr_bytes; k++) {
ppattern[offset + magicsync +
(j * ETH_ALEN) + k] = macaddr[k];
- len++;
- set_bit(len, (unsigned long *) pmask);
+ set_bit(len++, (unsigned long *) pmask);
}
}
return len - 1;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [39/45] tmpfs: fix oops on mounts with mpol=default
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (37 preceding siblings ...)
2010-03-30 22:48 ` [38/45] b44 WOL setup: one-bit-off stack corruption kernel panic fix Greg KH
@ 2010-03-30 22:48 ` Greg KH
2010-03-30 22:49 ` [40/45] tmpfs: mpol=bind:0 dont cause mount error Greg KH
` (5 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:48 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ravikiran Thirumalai,
KOSAKI Motohiro, Christoph Lameter, Mel Gorman, Lee Schermerhorn,
Hugh Dickins, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ravikiran G Thirumalai <kiran@scalex86.org>
commit 413b43deab8377819aba1dbad2abf0c15d59b491 upstream.
Fix an 'oops' when a tmpfs mount point is mounted with the mpol=default
mempolicy.
Upon remounting a tmpfs mount point with 'mpol=default' option, the mount
code crashed with a null pointer dereference. The initial problem report
was on 2.6.27, but the problem exists in mainline 2.6.34-rc as well. On
examining the code, we see that mpol_new returns NULL if default mempolicy
was requested. This 'NULL' mempolicy is accessed to store the node mask
resulting in oops.
The following patch fixes it.
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2049,10 +2049,15 @@ int mpol_parse_str(char *str, struct mem
goto out;
mode = MPOL_PREFERRED;
break;
-
+ case MPOL_DEFAULT:
+ /*
+ * Insist on a empty nodelist
+ */
+ if (!nodelist)
+ err = 0;
+ goto out;
/*
* case MPOL_BIND: mpol_new() enforces non-empty nodemask.
- * case MPOL_DEFAULT: mpol_new() enforces empty nodemask, ignores flags.
*/
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [40/45] tmpfs: mpol=bind:0 dont cause mount error.
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (38 preceding siblings ...)
2010-03-30 22:48 ` [39/45] tmpfs: fix oops on mounts with mpol=default Greg KH
@ 2010-03-30 22:49 ` Greg KH
2010-03-30 22:49 ` [41/45] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
` (4 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:49 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit d69b2e63e9172afb4d07c305601b79a55509ac4c upstream.
Currently, following mount operation cause mount error.
% mount -t tmpfs -ompol=bind:0 none /tmp
Because commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) corrupted MPOL_BIND parse code.
This patch restore the needed one.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2056,9 +2056,13 @@ int mpol_parse_str(char *str, struct mem
if (!nodelist)
err = 0;
goto out;
- /*
- * case MPOL_BIND: mpol_new() enforces non-empty nodemask.
- */
+ case MPOL_BIND:
+ /*
+ * Insist on a nodelist
+ */
+ if (!nodelist)
+ goto out;
+ err = 0;
}
mode_flags = 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [41/45] tmpfs: handle MPOL_LOCAL mount option properly
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (39 preceding siblings ...)
2010-03-30 22:49 ` [40/45] tmpfs: mpol=bind:0 dont cause mount error Greg KH
@ 2010-03-30 22:49 ` Greg KH
2010-03-30 22:49 ` [42/45] doc: add the documentation for mpol=local Greg KH
` (3 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:49 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 12821f5fb942e795f8009ece14bde868893bd811 upstream.
commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) added mpol=local mount option. but its feature is broken
since it was born. because such code always return 1 (i.e. mount
failure).
This patch fixes it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 1 +
1 file changed, 1 insertion(+)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2048,6 +2048,7 @@ int mpol_parse_str(char *str, struct mem
if (nodelist)
goto out;
mode = MPOL_PREFERRED;
+ err = 0;
break;
case MPOL_DEFAULT:
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [42/45] doc: add the documentation for mpol=local
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (40 preceding siblings ...)
2010-03-30 22:49 ` [41/45] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
@ 2010-03-30 22:49 ` Greg KH
2010-03-30 22:49 ` [43/45] tmpfs: cleanup mpol_parse_str() Greg KH
` (2 subsequent siblings)
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:49 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 5574169613b40b85d6f4c67208fa4846b897a0a1 upstream.
commit 3f226aa1c (mempolicy: support mpol=local tmpfs mount option) added
new mpol=local mount option. but it didn't add a documentation.
This patch does it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
Documentation/filesystems/tmpfs.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/Documentation/filesystems/tmpfs.txt
+++ b/Documentation/filesystems/tmpfs.txt
@@ -82,11 +82,13 @@ tmpfs has a mount option to set the NUMA
all files in that instance (if CONFIG_NUMA is enabled) - which can be
adjusted on the fly via 'mount -o remount ...'
-mpol=default prefers to allocate memory from the local node
+mpol=default use the process allocation policy
+ (see set_mempolicy(2))
mpol=prefer:Node prefers to allocate memory from the given Node
mpol=bind:NodeList allocates memory only from nodes in NodeList
mpol=interleave prefers to allocate from each node in turn
mpol=interleave:NodeList allocates from each node of NodeList in turn
+mpol=local prefers to allocate memory from the local node
NodeList format is a comma-separated list of decimal numbers and ranges,
a range being two hyphen-separated decimal numbers, the smallest and
@@ -134,3 +136,5 @@ Author:
Christoph Rohland <cr@sap.com>, 1.12.01
Updated:
Hugh Dickins <hugh@veritas.com>, 4 June 2007
+Updated:
+ KOSAKI Motohiro, 16 Mar 2010
^ permalink raw reply [flat|nested] 432+ messages in thread
* [43/45] tmpfs: cleanup mpol_parse_str()
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (41 preceding siblings ...)
2010-03-30 22:49 ` [42/45] doc: add the documentation for mpol=local Greg KH
@ 2010-03-30 22:49 ` Greg KH
2010-03-30 22:49 ` [44/45] USB: fix usbfs regression Greg KH
2010-03-30 22:49 ` [45/45] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:49 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 926f2ae04f183098cf9a30521776fb2759c8afeb upstream.
mpol_parse_str() made lots 'err' variable related bug. Because it is ugly
and reviewing unfriendly.
This patch simplifies it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2029,8 +2029,8 @@ int mpol_parse_str(char *str, struct mem
char *rest = nodelist;
while (isdigit(*rest))
rest++;
- if (!*rest)
- err = 0;
+ if (*rest)
+ goto out;
}
break;
case MPOL_INTERLEAVE:
@@ -2039,7 +2039,6 @@ int mpol_parse_str(char *str, struct mem
*/
if (!nodelist)
nodes = node_states[N_HIGH_MEMORY];
- err = 0;
break;
case MPOL_LOCAL:
/*
@@ -2048,7 +2047,6 @@ int mpol_parse_str(char *str, struct mem
if (nodelist)
goto out;
mode = MPOL_PREFERRED;
- err = 0;
break;
case MPOL_DEFAULT:
/*
@@ -2063,7 +2061,6 @@ int mpol_parse_str(char *str, struct mem
*/
if (!nodelist)
goto out;
- err = 0;
}
mode_flags = 0;
@@ -2077,14 +2074,17 @@ int mpol_parse_str(char *str, struct mem
else if (!strcmp(flags, "relative"))
mode_flags |= MPOL_F_RELATIVE_NODES;
else
- err = 1;
+ goto out;
}
new = mpol_new(mode, mode_flags, &nodes);
if (IS_ERR(new))
- err = 1;
- else if (no_context)
- new->w.user_nodemask = nodes; /* save for contextualization */
+ goto out;
+ err = 0;
+ if (no_context) {
+ /* save for contextualization */
+ new->w.user_nodemask = nodes;
+ }
out:
/* Restore string for error message */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [44/45] USB: fix usbfs regression
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (42 preceding siblings ...)
2010-03-30 22:49 ` [43/45] tmpfs: cleanup mpol_parse_str() Greg KH
@ 2010-03-30 22:49 ` Greg KH
2010-03-30 22:49 ` [45/45] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:49 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit 7152b592593b9d48b33f8997b1dfd6df9143f7ec upstream.
This patch (as1352) fixes a bug in the way isochronous input data is
returned to userspace for usbfs transfers. The entire buffer must be
copied, not just the first actual_length bytes, because the individual
packets will be discontiguous if any of them are short.
Reported-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/devio.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1123,6 +1123,13 @@ static int proc_do_submiturb(struct dev_
free_async(as);
return -ENOMEM;
}
+ /* Isochronous input data may end up being discontiguous
+ * if some of the packets are short. Clear the buffer so
+ * that the gaps don't leak kernel data to userspace.
+ */
+ if (is_in && uurb->type == USBDEVFS_URB_TYPE_ISO)
+ memset(as->urb->transfer_buffer, 0,
+ uurb->buffer_length);
}
as->urb->dev = ps->dev;
as->urb->pipe = (uurb->type << 30) |
@@ -1224,10 +1231,14 @@ static int processcompl(struct async *as
void __user *addr = as->userurb;
unsigned int i;
- if (as->userbuffer && urb->actual_length)
- if (copy_to_user(as->userbuffer, urb->transfer_buffer,
- urb->actual_length))
+ if (as->userbuffer && urb->actual_length) {
+ if (urb->number_of_packets > 0) /* Isochronous */
+ i = urb->transfer_buffer_length;
+ else /* Non-Isoc */
+ i = urb->actual_length;
+ if (copy_to_user(as->userbuffer, urb->transfer_buffer, i))
goto err_out;
+ }
if (put_user(as->status, &userurb->status))
goto err_out;
if (put_user(urb->actual_length, &userurb->actual_length))
^ permalink raw reply [flat|nested] 432+ messages in thread
* [45/45] hwmon: (coretemp) Add missing newline to dev_warn() message
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (43 preceding siblings ...)
2010-03-30 22:49 ` [44/45] USB: fix usbfs regression Greg KH
@ 2010-03-30 22:49 ` Greg KH
44 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:49 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jean Delvare,
Greg Kroah-Hartman
2.6.27-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit 4d7a5644e4adfafe76c2bd8ee168e3f3b5dae3a8 upstream.
Add missing newline to dev_warn() message string. This is more of an issue
with older kernels that don't automatically add a newline if it was missing
from the end of the previous line.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/coretemp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -191,7 +191,7 @@ static int __devinit adjust_tjmax(struct
if (err) {
dev_warn(dev,
"Unable to access MSR 0xEE, for Tjmax, left"
- " at default");
+ " at default\n");
} else if (eax & 0x40000000) {
tjmax = 85000;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [001/116] drm/i915: fix gpio register detection logic for BIOS without VBT
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [002/116] drivers/scsi/ses.c: eliminate double free Greg KH
` (114 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Shaohua Li, Zhao Yakui,
Eric Anholt, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Shaohua Li <shaohua.li@intel.com>
commit 29874f44fbcbc24b231b42c9956f8f9de9407231 upstream.
if no VBT is present, crt_ddc_bus will be left at 0, and cause us
to use that for the GPIO register offset. That's never a valid register
offset, so let the "undefined" value be 0 instead of -1.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
[anholt: clarified the commit message a bit]
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/i915_drv.h | 2 +-
drivers/gpu/drm/i915/intel_bios.c | 4 ----
drivers/gpu/drm/i915/intel_crt.c | 2 +-
3 files changed, 2 insertions(+), 6 deletions(-)
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -258,7 +258,7 @@ typedef struct drm_i915_private {
struct notifier_block lid_notifier;
- int crt_ddc_bus; /* -1 = unknown, else GPIO to use for CRT DDC */
+ int crt_ddc_bus; /* 0 = unknown, else GPIO to use for CRT DDC */
struct drm_i915_fence_reg fence_regs[16]; /* assume 965 */
int fence_reg_start; /* 4 if userland hasn't ioctl'd us yet */
int num_fence_regs; /* 8 on pre-965, 16 otherwise */
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -241,10 +241,6 @@ parse_general_definitions(struct drm_i91
GPIOF,
};
- /* Set sensible defaults in case we can't find the general block
- or it is the wrong chipset */
- dev_priv->crt_ddc_bus = -1;
-
general = find_section(bdb, BDB_GENERAL_DEFINITIONS);
if (general) {
u16 block_size = get_blocksize(general);
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -557,7 +557,7 @@ void intel_crt_init(struct drm_device *d
else {
i2c_reg = GPIOA;
/* Use VBT information for CRT DDC if available */
- if (dev_priv->crt_ddc_bus != -1)
+ if (dev_priv->crt_ddc_bus != 0)
i2c_reg = dev_priv->crt_ddc_bus;
}
intel_output->ddc_bus = intel_i2c_create(dev, i2c_reg, "CRTDDC_A");
^ permalink raw reply [flat|nested] 432+ messages in thread
* [002/116] drivers/scsi/ses.c: eliminate double free
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
2010-03-30 22:54 ` [001/116] drm/i915: fix gpio register detection logic for BIOS without VBT Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [003/116] decompress: fix new decompressor for PIC Greg KH
` (113 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Julia Lawall,
James Bottomley, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Julia Lawall <julia@diku.dk>
commit 9b3a6549b2602ca30f58715a0071e29f9898cae9 upstream.
The few lines below the kfree of hdr_buf may go to the label err_free
which will also free hdr_buf. The most straightforward solution seems to
be to just move the kfree of hdr_buf after these gotos.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@r@
identifier E;
expression E1;
iterator I;
statement S;
@@
*kfree(E);
... when != E = E1
when != I(E,...) S
when != &E
*kfree(E);
// </smpl>
Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: James Bottomley <James.Bottomley@HansenPartnership.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/scsi/ses.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/scsi/ses.c
+++ b/drivers/scsi/ses.c
@@ -591,8 +591,6 @@ static int ses_intf_add(struct device *c
ses_dev->page10_len = len;
buf = NULL;
}
- kfree(hdr_buf);
-
scomp = kzalloc(sizeof(struct ses_component) * components, GFP_KERNEL);
if (!scomp)
goto err_free;
@@ -604,6 +602,8 @@ static int ses_intf_add(struct device *c
goto err_free;
}
+ kfree(hdr_buf);
+
edev->scratch = ses_dev;
for (i = 0; i < components; i++)
edev->component[i].scratch = scomp + i;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [003/116] decompress: fix new decompressor for PIC
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
2010-03-30 22:54 ` [001/116] drm/i915: fix gpio register detection logic for BIOS without VBT Greg KH
2010-03-30 22:54 ` [002/116] drivers/scsi/ses.c: eliminate double free Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [004/116] ARM: Fix decompressors kernel size estimation for ROM=y Greg KH
` (112 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Russell King, Alain Knaff,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Russell King <rmk@arm.linux.org.uk>
commit 5ceaa2f39bfa73c4398cd01e78f1c3ebde3d3383 upstream.
The ARM kernel decompressor wants to be able to relocate r/w data
independently from the rest of the image, and we do this by ensuring that
r/w data has global visibility. Define STATIC_RW_DATA to be empty to
achieve this.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: Alain Knaff <alain@knaff.lu>
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>
---
include/linux/decompress/mm.h | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- a/include/linux/decompress/mm.h
+++ b/include/linux/decompress/mm.h
@@ -14,11 +14,21 @@
/* Code active when included from pre-boot environment: */
+/*
+ * Some architectures want to ensure there is no local data in their
+ * pre-boot environment, so that data can arbitarily relocated (via
+ * GOT references). This is achieved by defining STATIC_RW_DATA to
+ * be null.
+ */
+#ifndef STATIC_RW_DATA
+#define STATIC_RW_DATA static
+#endif
+
/* A trivial malloc implementation, adapted from
* malloc by Hannu Savolainen 1993 and Matthias Urlichs 1994
*/
-static unsigned long malloc_ptr;
-static int malloc_count;
+STATIC_RW_DATA unsigned long malloc_ptr;
+STATIC_RW_DATA int malloc_count;
static void *malloc(int size)
{
^ permalink raw reply [flat|nested] 432+ messages in thread
* [004/116] ARM: Fix decompressors kernel size estimation for ROM=y
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (2 preceding siblings ...)
2010-03-30 22:54 ` [003/116] decompress: fix new decompressor for PIC Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [005/116] MIPS: Cleanup forgotten label_module_alloc in tlbex.c Greg KH
` (111 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Russell King,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Russell King <rmk+kernel@arm.linux.org.uk>
commit 98e12b5a6e05413420a7e3b3eca7fbfc2ff41b6d upstream.
Commit 2552fc2 changed the way the decompressor decides if it is safe
to decompress the kernel directly to its final location. Unfortunately,
it took the top of the compressed data as being the stack pointer,
which it is for ROM=n cases. However, for ROM=y, the stack pointer
is not relevant, and results in the wrong answer.
Fix this by explicitly storing the end of the biggybacked data in the
decompressor, and use that to calculate the compressed image size.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/arm/boot/compressed/head.S | 50 ++++++++++++++------------------
arch/arm/boot/compressed/vmlinux.lds.in | 3 +
2 files changed, 26 insertions(+), 27 deletions(-)
--- a/arch/arm/boot/compressed/head.S
+++ b/arch/arm/boot/compressed/head.S
@@ -162,8 +162,8 @@ not_angel:
.text
adr r0, LC0
- ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, ip, sp} )
- THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, ip} )
+ ARM( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip, sp})
+ THUMB( ldmia r0, {r1, r2, r3, r4, r5, r6, r11, ip} )
THUMB( ldr sp, [r0, #28] )
subs r0, r0, r1 @ calculate the delta offset
@@ -174,12 +174,13 @@ not_angel:
/*
* We're running at a different address. We need to fix
* up various pointers:
- * r5 - zImage base address
- * r6 - GOT start
+ * r5 - zImage base address (_start)
+ * r6 - size of decompressed image
+ * r11 - GOT start
* ip - GOT end
*/
add r5, r5, r0
- add r6, r6, r0
+ add r11, r11, r0
add ip, ip, r0
#ifndef CONFIG_ZBOOT_ROM
@@ -197,10 +198,10 @@ not_angel:
/*
* Relocate all entries in the GOT table.
*/
-1: ldr r1, [r6, #0] @ relocate entries in the GOT
+1: ldr r1, [r11, #0] @ relocate entries in the GOT
add r1, r1, r0 @ table. This fixes up the
- str r1, [r6], #4 @ C references.
- cmp r6, ip
+ str r1, [r11], #4 @ C references.
+ cmp r11, ip
blo 1b
#else
@@ -208,12 +209,12 @@ not_angel:
* Relocate entries in the GOT table. We only relocate
* the entries that are outside the (relocated) BSS region.
*/
-1: ldr r1, [r6, #0] @ relocate entries in the GOT
+1: ldr r1, [r11, #0] @ relocate entries in the GOT
cmp r1, r2 @ entry < bss_start ||
cmphs r3, r1 @ _end < entry
addlo r1, r1, r0 @ table. This fixes up the
- str r1, [r6], #4 @ C references.
- cmp r6, ip
+ str r1, [r11], #4 @ C references.
+ cmp r11, ip
blo 1b
#endif
@@ -239,6 +240,7 @@ not_relocated: mov r0, #0
* Check to see if we will overwrite ourselves.
* r4 = final kernel address
* r5 = start of this image
+ * r6 = size of decompressed image
* r2 = end of malloc space (and therefore this image)
* We basically want:
* r4 >= r2 -> OK
@@ -246,8 +248,7 @@ not_relocated: mov r0, #0
*/
cmp r4, r2
bhs wont_overwrite
- sub r3, sp, r5 @ > compressed kernel size
- add r0, r4, r3, lsl #2 @ allow for 4x expansion
+ add r0, r4, r6
cmp r0, r5
bls wont_overwrite
@@ -263,7 +264,6 @@ not_relocated: mov r0, #0
* r1-r3 = unused
* r4 = kernel execution address
* r5 = decompressed kernel start
- * r6 = processor ID
* r7 = architecture ID
* r8 = atags pointer
* r9-r12,r14 = corrupted
@@ -304,7 +304,8 @@ LC0: .word LC0 @ r1
.word _end @ r3
.word zreladdr @ r4
.word _start @ r5
- .word _got_start @ r6
+ .word _image_size @ r6
+ .word _got_start @ r11
.word _got_end @ ip
.word user_stack+4096 @ sp
LC1: .word reloc_end - reloc_start
@@ -328,7 +329,6 @@ params: ldr r0, =params_phys
*
* On entry,
* r4 = kernel execution address
- * r6 = processor ID
* r7 = architecture number
* r8 = atags pointer
* r9 = run-time address of "start" (???)
@@ -534,7 +534,6 @@ __common_mmu_cache_on:
* r1-r3 = unused
* r4 = kernel execution address
* r5 = decompressed kernel start
- * r6 = processor ID
* r7 = architecture ID
* r8 = atags pointer
* r9-r12,r14 = corrupted
@@ -573,19 +572,19 @@ call_kernel: bl cache_clean_flush
* r1 = corrupted
* r2 = corrupted
* r3 = block offset
- * r6 = corrupted
+ * r9 = corrupted
* r12 = corrupted
*/
call_cache_fn: adr r12, proc_types
#ifdef CONFIG_CPU_CP15
- mrc p15, 0, r6, c0, c0 @ get processor ID
+ mrc p15, 0, r9, c0, c0 @ get processor ID
#else
- ldr r6, =CONFIG_PROCESSOR_ID
+ ldr r9, =CONFIG_PROCESSOR_ID
#endif
1: ldr r1, [r12, #0] @ get value
ldr r2, [r12, #4] @ get mask
- eor r1, r1, r6 @ (real ^ match)
+ eor r1, r1, r9 @ (real ^ match)
tst r1, r2 @ & mask
ARM( addeq pc, r12, r3 ) @ call cache function
THUMB( addeq r12, r3 )
@@ -764,8 +763,7 @@ proc_types:
* Turn off the Cache and MMU. ARMv3 does not support
* reading the control register, but ARMv4 does.
*
- * On entry, r6 = processor ID
- * On exit, r0, r1, r2, r3, r12 corrupted
+ * On exit, r0, r1, r2, r3, r9, r12 corrupted
* This routine must preserve: r4, r6, r7
*/
.align 5
@@ -838,10 +836,8 @@ __armv3_mmu_cache_off:
/*
* Clean and flush the cache to maintain consistency.
*
- * On entry,
- * r6 = processor ID
* On exit,
- * r1, r2, r3, r11, r12 corrupted
+ * r1, r2, r3, r9, r11, r12 corrupted
* This routine must preserve:
* r0, r4, r5, r6, r7
*/
@@ -953,7 +949,7 @@ __armv4_mmu_cache_flush:
mov r2, #64*1024 @ default: 32K dcache size (*2)
mov r11, #32 @ default: 32 byte line size
mrc p15, 0, r3, c0, c0, 1 @ read cache type
- teq r3, r6 @ cache ID register present?
+ teq r3, r9 @ cache ID register present?
beq no_cache_id
mov r1, r3, lsr #18
and r1, r1, #7
--- a/arch/arm/boot/compressed/vmlinux.lds.in
+++ b/arch/arm/boot/compressed/vmlinux.lds.in
@@ -36,6 +36,9 @@ SECTIONS
_etext = .;
+ /* Assume size of decompressed image is 4x the compressed image */
+ _image_size = (_etext - _text) * 4;
+
_got_start = .;
.got : { *(.got) }
_got_end = .;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [005/116] MIPS: Cleanup forgotten label_module_alloc in tlbex.c
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (3 preceding siblings ...)
2010-03-30 22:54 ` [004/116] ARM: Fix decompressors kernel size estimation for ROM=y Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [006/116] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt() Greg KH
` (110 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David Daney, linux-mips,
Ralf Baechle, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Daney <ddaney@caviumnetworks.com>
commit abbdc3d88aa2d5c937b21044c336bcd056c1732f upstream.
commit c8af165342e83a4eb078c9607d29a7c399d30a53 (lmo) rsp.
e0cc87f59490d7d62a8ab2a76498dc8a2b64927a (kernel.org) left
label_module_alloc unused. Remove it now.
Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Cc: linux-mips@linux-mips.org
Patchwork: http://patchwork.linux-mips.org/patch/752/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/mips/mm/tlbex.c | 8 --------
1 file changed, 8 deletions(-)
--- a/arch/mips/mm/tlbex.c
+++ b/arch/mips/mm/tlbex.c
@@ -73,9 +73,6 @@ static int __cpuinit m4kc_tlbp_war(void)
enum label_id {
label_second_part = 1,
label_leave,
-#ifdef MODULE_START
- label_module_alloc,
-#endif
label_vmalloc,
label_vmalloc_done,
label_tlbw_hazard,
@@ -92,9 +89,6 @@ enum label_id {
UASM_L_LA(_second_part)
UASM_L_LA(_leave)
-#ifdef MODULE_START
-UASM_L_LA(_module_alloc)
-#endif
UASM_L_LA(_vmalloc)
UASM_L_LA(_vmalloc_done)
UASM_L_LA(_tlbw_hazard)
@@ -802,8 +796,6 @@ static void __cpuinit build_r4000_tlb_re
} else {
#if defined(CONFIG_HUGETLB_PAGE)
const enum label_id ls = label_tlb_huge_update;
-#elif defined(MODULE_START)
- const enum label_id ls = label_module_alloc;
#else
const enum label_id ls = label_vmalloc;
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [006/116] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (4 preceding siblings ...)
2010-03-30 22:54 ` [005/116] MIPS: Cleanup forgotten label_module_alloc in tlbex.c Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [007/116] tg3: Fix 5906 transmit hangs Greg KH
` (109 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Louis Rilling,
David S. Miller, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Louis Rilling <Louis.Rilling@kerlabs.com>
commit fe234f0e5cbb880792d2d1ac0743cf8c07e9dde3 upstream.
Commit 09943a1819a240ff4a72f924d0038818fcdd0a90
Author: Matt Carlson <mcarlson@broadcom.com>
Date: Fri Aug 28 14:01:57 2009 +0000
tg3: Convert ISR parameter to tnapi
forgot to update tg3_poll_controller(), leading to intermittent crashes with
netpoll.
Fix this.
Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/tg3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -4995,7 +4995,7 @@ static void tg3_poll_controller(struct n
struct tg3 *tp = netdev_priv(dev);
for (i = 0; i < tp->irq_cnt; i++)
- tg3_interrupt(tp->napi[i].irq_vec, dev);
+ tg3_interrupt(tp->napi[i].irq_vec, &tp->napi[i]);
}
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [007/116] tg3: Fix 5906 transmit hangs
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (5 preceding siblings ...)
2010-03-30 22:54 ` [006/116] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt() Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-31 1:15 ` [Stable-review] " Chuck Ebbert
2010-03-30 22:54 ` [008/116] ALSA: hda - Fix input source elements of secondary ADCs on Realtek Greg KH
` (108 subsequent siblings)
115 siblings, 1 reply; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, mcarlson, Mike Pagano,
Michael Chan, David S. Miller, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Matt Carlson <mcarlson@broadcom.com>
This is a resubmit backport of commit 92c6b8d16a36df3f28b2537bed2a56491fb08f11
to kernel version 2.6.32. The gentoo bug report can be found at
https://bugs.gentoo.org/show_bug.cgi?id=301091. Thanks to Matt Carlson for his
assistance and working me to fix a regression caused by the initial patch. The
original description is as follows:
The 5906 has trouble with fragments that are less than 8 bytes in size. This
patch works around the problem by pivoting the 5906's transmit routine to
tg3_start_xmit_dma_bug() and introducing a new SHORT_DMA_BUG flag that enables
code to detect and react to the problematic condition.
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/tg3.c | 21 ++++++++++++++++-----
drivers/net/tg3.h | 3 +++
2 files changed, 19 insertions(+), 5 deletions(-)
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -5392,7 +5392,7 @@ static netdev_tx_t tg3_start_xmit_dma_bu
mss = 0;
if ((mss = skb_shinfo(skb)->gso_size) != 0) {
struct iphdr *iph;
- int tcp_opt_len, ip_tcp_len, hdr_len;
+ u32 tcp_opt_len, ip_tcp_len, hdr_len;
if (skb_header_cloned(skb) &&
pskb_expand_head(skb, 0, 0, GFP_ATOMIC)) {
@@ -5423,8 +5423,10 @@ static netdev_tx_t tg3_start_xmit_dma_bu
IPPROTO_TCP,
0);
- if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO) ||
- (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705)) {
+ if (tp->tg3_flags2 & TG3_FLG2_HW_TSO_2)
+ mss |= hdr_len << 9;
+ else if ((tp->tg3_flags2 & TG3_FLG2_HW_TSO_1) ||
+ GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5705) {
if (tcp_opt_len || iph->ihl > 5) {
int tsflags;
@@ -5459,6 +5461,9 @@ static netdev_tx_t tg3_start_xmit_dma_bu
would_hit_hwbug = 0;
+ if ((tp->tg3_flags3 & TG3_FLG3_SHORT_DMA_BUG) && len <= 8)
+ would_hit_hwbug = 1;
+
if (tp->tg3_flags3 & TG3_FLG3_5701_DMA_BUG)
would_hit_hwbug = 1;
else if (tg3_4g_overflow_test(mapping, len))
@@ -5482,6 +5487,10 @@ static netdev_tx_t tg3_start_xmit_dma_bu
tnapi->tx_buffers[entry].skb = NULL;
+ if ((tp->tg3_flags3 & TG3_FLG3_SHORT_DMA_BUG) &&
+ len <= 8)
+ would_hit_hwbug = 1;
+
if (tg3_4g_overflow_test(mapping, len))
would_hit_hwbug = 1;
@@ -12608,6 +12617,9 @@ static int __devinit tg3_get_invariants(
}
}
+ if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
+ tp->tg3_flags3 |= TG3_FLG3_SHORT_DMA_BUG;
+
tp->irq_max = 1;
#ifdef TG3_NAPI
@@ -13975,8 +13987,7 @@ static int __devinit tg3_init_one(struct
goto err_out_iounmap;
}
- if ((tp->tg3_flags3 & TG3_FLG3_5755_PLUS) ||
- GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5906)
+ if (tp->tg3_flags3 & TG3_FLG3_5755_PLUS)
dev->netdev_ops = &tg3_netdev_ops;
else
dev->netdev_ops = &tg3_netdev_ops_dma_bug;
--- a/drivers/net/tg3.h
+++ b/drivers/net/tg3.h
@@ -2759,6 +2759,9 @@ struct tg3 {
#define TG3_FLG3_TOGGLE_10_100_L1PLLPD 0x00008000
#define TG3_FLG3_PHY_IS_FET 0x00010000
#define TG3_FLG3_ENABLE_RSS 0x00020000
+#define TG3_FLG3_4G_DMA_BNDRY_BUG 0x00080000
+#define TG3_FLG3_40BIT_DMA_LIMIT_BUG 0x00100000
+#define TG3_FLG3_SHORT_DMA_BUG 0x00200000
struct timer_list timer;
u16 timer_counter;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [008/116] ALSA: hda - Fix input source elements of secondary ADCs on Realtek
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (6 preceding siblings ...)
2010-03-30 22:54 ` [007/116] tg3: Fix 5906 transmit hangs Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [009/116] ALSA: hda: enable MSI for Gateway M-6866 Greg KH
` (107 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Takashi Iwai,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 5311114d4867113c00f78829d4ce14be458ec925 upstream.
Since alc_auto_create_input_ctls() doesn't set the elements for the
secondary ADCs, "Input Source" elemtns for these also get empty, resulting
in buggy outputs of alsactl like:
control.14 {
comment.access 'read write'
comment.type ENUMERATED
comment.count 1
iface MIXER
name 'Input Source'
index 1
value 0
}
This patch fixes alc_mux_enum_*() (and others) to fall back to the
first entry if the secondary input mux is empty.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/patch_realtek.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -400,6 +400,8 @@ static int alc_mux_enum_info(struct snd_
unsigned int mux_idx = snd_ctl_get_ioffidx(kcontrol, &uinfo->id);
if (mux_idx >= spec->num_mux_defs)
mux_idx = 0;
+ if (!spec->input_mux[mux_idx].num_items && mux_idx > 0)
+ mux_idx = 0;
return snd_hda_input_mux_info(&spec->input_mux[mux_idx], uinfo);
}
@@ -428,6 +430,8 @@ static int alc_mux_enum_put(struct snd_k
mux_idx = adc_idx >= spec->num_mux_defs ? 0 : adc_idx;
imux = &spec->input_mux[mux_idx];
+ if (!imux->num_items && mux_idx > 0)
+ imux = &spec->input_mux[0];
type = get_wcaps_type(get_wcaps(codec, nid));
if (type == AC_WID_AUD_MIX) {
@@ -9743,6 +9747,8 @@ static void alc882_auto_init_input_src(s
continue;
mux_idx = c >= spec->num_mux_defs ? 0 : c;
imux = &spec->input_mux[mux_idx];
+ if (!imux->num_items && mux_idx > 0)
+ imux = &spec->input_mux[0];
for (idx = 0; idx < conns; idx++) {
/* if the current connection is the selected one,
* unmute it as default - otherwise mute it
^ permalink raw reply [flat|nested] 432+ messages in thread
* [009/116] ALSA: hda: enable MSI for Gateway M-6866
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (7 preceding siblings ...)
2010-03-30 22:54 ` [008/116] ALSA: hda - Fix input source elements of secondary ADCs on Realtek Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [010/116] timekeeping: Prevent oops when GENERIC_TIME=n Greg KH
` (106 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Takashi Iwai, Daniel T Chen,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
BugLink: https://bugs.launchpad.net/bugs/538918
The OR has verified that explicitly enabling MSI is necessary for audio
to be audible by default.
This patch is only applicable to 2.6.32.y; in 2.6.33, MSI is enabled by
default.
Reported-by: Sam Townsend <stownsend42@sbcglobal.net>
Tested-by: Sam Townsend <stownsend42@sbcglobal.net>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/hda_intel.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2317,6 +2317,7 @@ static void __devinit check_probe_mask(s
static struct snd_pci_quirk msi_white_list[] __devinitdata = {
SND_PCI_QUIRK(0x103c, 0x30f7, "HP Pavilion dv4t-1300", 1),
SND_PCI_QUIRK(0x103c, 0x3607, "HP Compa CQ40", 1),
+ SND_PCI_QUIRK(0x107b, 0x0380, "Gateway M-6866", 1),
{}
};
^ permalink raw reply [flat|nested] 432+ messages in thread
* [010/116] timekeeping: Prevent oops when GENERIC_TIME=n
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (8 preceding siblings ...)
2010-03-30 22:54 ` [009/116] ALSA: hda: enable MSI for Gateway M-6866 Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [011/116] Input: alps - add support for the touchpad on Toshiba Tecra A11-11L Greg KH
` (105 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, John Stultz,
Martin Schwidefsky, Thomas Gleixner, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: john stultz <johnstul@us.ibm.com>
commit ad6759fbf35d104dbf573cd6f4c6784ad6823f7e upstream.
Aaro Koskinen reported an issue in kernel.org bugzilla #15366, where
on non-GENERIC_TIME systems, accessing
/sys/devices/system/clocksource/clocksource0/current_clocksource
results in an oops.
It seems the timekeeper/clocksource rework missed initializing the
curr_clocksource value in the !GENERIC_TIME case.
Thanks to Aaro for reporting and diagnosing the issue as well as
testing the fix!
Reported-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
LKML-Reference: <1267475683.4216.61.camel@localhost.localdomain>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/time/clocksource.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -515,6 +515,10 @@ static inline void clocksource_select(vo
*/
static int __init clocksource_done_booting(void)
{
+ mutex_lock(&clocksource_mutex);
+ curr_clocksource = clocksource_default_clock();
+ mutex_unlock(&clocksource_mutex);
+
finished_booting = 1;
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [011/116] Input: alps - add support for the touchpad on Toshiba Tecra A11-11L
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (9 preceding siblings ...)
2010-03-30 22:54 ` [010/116] timekeeping: Prevent oops when GENERIC_TIME=n Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [012/116] Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table Greg KH
` (104 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas BÀchler,
Dmitry Torokhov, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 868 bytes --]
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Bächler <thomas@archlinux.org>
commit eb8bff85c5bd5caef7c374ff32b86545029efb56 upstream.
Signed-off-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/input/mouse/alps.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -62,6 +62,8 @@ static const struct alps_model_info alps
{ { 0x62, 0x02, 0x14 }, 0xcf, 0xcf,
ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
{ { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 }, /* Dell Vostro 1400 */
+ { { 0x52, 0x01, 0x14 }, 0xff, 0xff,
+ ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED }, /* Toshiba Tecra A11-11L */
};
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [012/116] Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (10 preceding siblings ...)
2010-03-30 22:54 ` [011/116] Input: alps - add support for the touchpad on Toshiba Tecra A11-11L Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [013/116] i2c-i801: Dont use the block buffer for I2C block writes Greg KH
` (103 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Christoph Fritz,
Dmitry Torokhov, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christoph Fritz <chf.fritz@googlemail.com>
commit 31968ecf584330b51a25b7bf881c2b632a02a3fb upstream.
ALDI/MEDION netbook E1222 needs to be in the reset quirk list for
its touchpad's proper function.
Reported-by: Michael Fischer <mifi@gmx.de>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/input/serio/i8042-x86ia64io.h | 7 +++++++
1 file changed, 7 insertions(+)
--- a/drivers/input/serio/i8042-x86ia64io.h
+++ b/drivers/input/serio/i8042-x86ia64io.h
@@ -442,6 +442,13 @@ static const struct dmi_system_id __init
},
},
{
+ /* Medion Akoya E1222 */
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "E122X"),
+ },
+ },
+ {
/* Mivvy M310 */
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "VIOOO"),
^ permalink raw reply [flat|nested] 432+ messages in thread
* [013/116] i2c-i801: Dont use the block buffer for I2C block writes
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (11 preceding siblings ...)
2010-03-30 22:54 ` [012/116] Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [014/116] ath5k: dont use external sleep clock in AP mode Greg KH
` (102 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Delvare, Oleg Ryjkov,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jean Delvare <khali@linux-fr.org>
commit c074c39d62306efa5ba7c69c1a1531bc7333d252 upstream.
Experience has shown that the block buffer can only be used for SMBus
(not I2C) block transactions, even though the datasheet doesn't
mention this limitation.
Reported-by: Felix Rubinstein <felixru@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Oleg Ryjkov <oryjkov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/i2c/busses/i2c-i801.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/i2c/busses/i2c-i801.c
+++ b/drivers/i2c/busses/i2c-i801.c
@@ -415,9 +415,11 @@ static int i801_block_transaction(union
data->block[0] = 32; /* max for SMBus block reads */
}
+ /* Experience has shown that the block buffer can only be used for
+ SMBus (not I2C) block transactions, even though the datasheet
+ doesn't mention this limitation. */
if ((i801_features & FEATURE_BLOCK_BUFFER)
- && !(command == I2C_SMBUS_I2C_BLOCK_DATA
- && read_write == I2C_SMBUS_READ)
+ && command != I2C_SMBUS_I2C_BLOCK_DATA
&& i801_set_block_buffer_mode() == 0)
result = i801_block_transaction_by_block(data, read_write,
hwpec);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [014/116] ath5k: dont use external sleep clock in AP mode
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (12 preceding siblings ...)
2010-03-30 22:54 ` [013/116] i2c-i801: Dont use the block buffer for I2C block writes Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [015/116] ath5k: fix setup for CAB queue Greg KH
` (101 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bob Copeland, linux-wireless,
linville, mb, ath5k-devel, Nick Kossifidis, Luis Rodriguez,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bob Copeland <me@bobcopeland.com>
commit 5d6ce628f986d1a3c523cbb0a5a52095c48cc332 upstream
When using the external sleep clock in AP mode, the
TSF increments too quickly, causing beacon interval
to be much lower than it is supposed to be, resulting
in lots of beacon-not-ready interrupts.
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=14802.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Cc: Luis Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath5k/reset.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath5k/reset.c
+++ b/drivers/net/wireless/ath/ath5k/reset.c
@@ -1382,8 +1382,9 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
* Set clocks to 32KHz operation and use an
* external 32KHz crystal when sleeping if one
* exists */
- if (ah->ah_version == AR5K_AR5212)
- ath5k_hw_set_sleep_clock(ah, true);
+ if (ah->ah_version == AR5K_AR5212 &&
+ ah->ah_op_mode != NL80211_IFTYPE_AP)
+ ath5k_hw_set_sleep_clock(ah, true);
/*
* Disable beacons and reset the register
^ permalink raw reply [flat|nested] 432+ messages in thread
* [015/116] ath5k: fix setup for CAB queue
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (13 preceding siblings ...)
2010-03-30 22:54 ` [014/116] ath5k: dont use external sleep clock in AP mode Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [016/116] ring-buffer: Move disabled check into preempt disable section Greg KH
` (100 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bob Copeland,
Nick Kossifidis, John W. Linville, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bob Copeland <me@bobcopeland.com>
commit a951ae2176b982574ffa197455db6c89359fd5eb upstream.
The beacon sent gating doesn't seem to work with any combination
of flags. Thus, buffered frames tend to stay buffered forever,
using up tx descriptors.
Instead, use the DBA gating and hold transmission of the buffered
frames until 80% of the beacon interval has elapsed using the ready
time. This fixes the following error in AP mode:
ath5k phy0: no further txbuf available, dropping packet
Add a comment to acknowledge that this isn't the best solution.
Signed-off-by: Bob Copeland <me@bobcopeland.com>
Acked-by: Nick Kossifidis <mickflemm@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/ath5k.h | 2 +-
drivers/net/wireless/ath/ath5k/base.c | 22 +++++++++++++++++++---
drivers/net/wireless/ath/ath5k/qcu.c | 5 +++--
3 files changed, 23 insertions(+), 6 deletions(-)
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -540,7 +540,7 @@ struct ath5k_txq_info {
u32 tqi_cbr_period; /* Constant bit rate period */
u32 tqi_cbr_overflow_limit;
u32 tqi_burst_time;
- u32 tqi_ready_time; /* Not used */
+ u32 tqi_ready_time; /* Time queue waits after an event */
};
/*
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -1511,7 +1511,8 @@ ath5k_beaconq_config(struct ath5k_softc
ret = ath5k_hw_get_tx_queueprops(ah, sc->bhalq, &qi);
if (ret)
- return ret;
+ goto err;
+
if (sc->opmode == NL80211_IFTYPE_AP ||
sc->opmode == NL80211_IFTYPE_MESH_POINT) {
/*
@@ -1538,10 +1539,25 @@ ath5k_beaconq_config(struct ath5k_softc
if (ret) {
ATH5K_ERR(sc, "%s: unable to update parameters for beacon "
"hardware queue!\n", __func__);
- return ret;
+ goto err;
}
+ ret = ath5k_hw_reset_tx_queue(ah, sc->bhalq); /* push to h/w */
+ if (ret)
+ goto err;
+
+ /* reconfigure cabq with ready time to 80% of beacon_interval */
+ ret = ath5k_hw_get_tx_queueprops(ah, AR5K_TX_QUEUE_ID_CAB, &qi);
+ if (ret)
+ goto err;
+
+ qi.tqi_ready_time = (sc->bintval * 80) / 100;
+ ret = ath5k_hw_set_tx_queueprops(ah, AR5K_TX_QUEUE_ID_CAB, &qi);
+ if (ret)
+ goto err;
- return ath5k_hw_reset_tx_queue(ah, sc->bhalq); /* push to h/w */;
+ ret = ath5k_hw_reset_tx_queue(ah, AR5K_TX_QUEUE_ID_CAB);
+err:
+ return ret;
}
static void
--- a/drivers/net/wireless/ath/ath5k/qcu.c
+++ b/drivers/net/wireless/ath/ath5k/qcu.c
@@ -408,12 +408,13 @@ int ath5k_hw_reset_tx_queue(struct ath5k
break;
case AR5K_TX_QUEUE_CAB:
+ /* XXX: use BCN_SENT_GT, if we can figure out how */
AR5K_REG_ENABLE_BITS(ah, AR5K_QUEUE_MISC(queue),
- AR5K_QCU_MISC_FRSHED_BCN_SENT_GT |
+ AR5K_QCU_MISC_FRSHED_DBA_GT |
AR5K_QCU_MISC_CBREXP_DIS |
AR5K_QCU_MISC_CBREXP_BCN_DIS);
- ath5k_hw_reg_write(ah, ((AR5K_TUNE_BEACON_INTERVAL -
+ ath5k_hw_reg_write(ah, ((tq->tqi_ready_time -
(AR5K_TUNE_SW_BEACON_RESP -
AR5K_TUNE_DMA_BEACON_RESP) -
AR5K_TUNE_ADDITIONAL_SWBA_BACKOFF) * 1024) |
^ permalink raw reply [flat|nested] 432+ messages in thread
* [016/116] ring-buffer: Move disabled check into preempt disable section
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (14 preceding siblings ...)
2010-03-30 22:54 ` [015/116] ath5k: fix setup for CAB queue Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [017/116] function-graph: Init curr_ret_stack with ret_stack Greg KH
` (99 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Lai Jiangshan,
Steven Rostedt, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Lai Jiangshan <laijs@cn.fujitsu.com>
commit 52fbe9cde7fdb5c6fac196d7ebd2d92d05ef3cd4 upstream.
The ring buffer resizing and resetting relies on a schedule RCU
action. The buffers are disabled, a synchronize_sched() is called
and then the resize or reset takes place.
But this only works if the disabling of the buffers are within the
preempt disabled section, otherwise a window exists that the buffers
can be written to while a reset or resize takes place.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
LKML-Reference: <4B949E43.2010906@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/ring_buffer.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/kernel/trace/ring_buffer.c
+++ b/kernel/trace/ring_buffer.c
@@ -2237,12 +2237,12 @@ ring_buffer_lock_reserve(struct ring_buf
if (ring_buffer_flags != RB_BUFFERS_ON)
return NULL;
- if (atomic_read(&buffer->record_disabled))
- return NULL;
-
/* If we are tracing schedule, we don't want to recurse */
resched = ftrace_preempt_disable();
+ if (atomic_read(&buffer->record_disabled))
+ goto out_nocheck;
+
if (trace_recursive_lock())
goto out_nocheck;
@@ -2474,11 +2474,11 @@ int ring_buffer_write(struct ring_buffer
if (ring_buffer_flags != RB_BUFFERS_ON)
return -EBUSY;
- if (atomic_read(&buffer->record_disabled))
- return -EBUSY;
-
resched = ftrace_preempt_disable();
+ if (atomic_read(&buffer->record_disabled))
+ goto out;
+
cpu = raw_smp_processor_id();
if (!cpumask_test_cpu(cpu, buffer->cpumask))
^ permalink raw reply [flat|nested] 432+ messages in thread
* [017/116] function-graph: Init curr_ret_stack with ret_stack
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (15 preceding siblings ...)
2010-03-30 22:54 ` [016/116] ring-buffer: Move disabled check into preempt disable section Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [018/116] Bluetooth: Fix sleeping function in RFCOMM within invalid context Greg KH
` (98 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Steven Rostedt,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Steven Rostedt <srostedt@redhat.com>
commit ea14eb714041d40fcc5180b5a586034503650149 upstream.
If the graph tracer is active, and a task is forked but the allocating of
the processes graph stack fails, it can cause crash later on.
This is due to the temporary stack being NULL, but the curr_ret_stack
variable is copied from the parent. If it is not -1, then in
ftrace_graph_probe_sched_switch() the following:
for (index = next->curr_ret_stack; index >= 0; index--)
next->ret_stack[index].calltime += timestamp;
Will cause a kernel OOPS.
Found with Li Zefan's ftrace_stress_test.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/ftrace.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -3258,6 +3258,7 @@ void ftrace_graph_init_task(struct task_
{
/* Make sure we do not use the parent ret_stack */
t->ret_stack = NULL;
+ t->curr_ret_stack = -1;
if (ftrace_graph_active) {
struct ftrace_ret_stack *ret_stack;
@@ -3267,7 +3268,6 @@ void ftrace_graph_init_task(struct task_
GFP_KERNEL);
if (!ret_stack)
return;
- t->curr_ret_stack = -1;
atomic_set(&t->tracing_graph_pause, 0);
atomic_set(&t->trace_overrun, 0);
t->ftrace_timestamp = 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [018/116] Bluetooth: Fix sleeping function in RFCOMM within invalid context
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (16 preceding siblings ...)
2010-03-30 22:54 ` [017/116] function-graph: Init curr_ret_stack with ret_stack Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [019/116] tracing: Use same local variable when resetting the ring buffer Greg KH
` (97 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Marcel Holtmann,
Chase Douglas, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marcel Holtmann <marcel@holtmann.org>
commit 485f1eff73a7b932fd3abb0dfcf804e1a1f59025 upstream.
With the commit 9e726b17422bade75fba94e625cd35fd1353e682 the
rfcomm_session_put() gets accidentially called from a timeout
callback and results in this:
BUG: sleeping function called from invalid context at net/core/sock.c:1897
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper
Pid: 0, comm: swapper Tainted: P 2.6.32 #31
Call Trace:
<IRQ> [<ffffffff81036455>] __might_sleep+0xf8/0xfa
[<ffffffff8138ef1d>] lock_sock_nested+0x29/0xc4
[<ffffffffa03921b3>] lock_sock+0xb/0xd [l2cap]
[<ffffffffa03948e6>] l2cap_sock_shutdown+0x1c/0x76 [l2cap]
[<ffffffff8106adea>] ? clockevents_program_event+0x75/0x7e
[<ffffffff8106bea2>] ? tick_dev_program_event+0x37/0xa5
[<ffffffffa0394967>] l2cap_sock_release+0x27/0x67 [l2cap]
[<ffffffff8138c971>] sock_release+0x1a/0x67
[<ffffffffa03d2492>] rfcomm_session_del+0x34/0x53 [rfcomm]
[<ffffffffa03d24c5>] rfcomm_session_put+0x14/0x16 [rfcomm]
[<ffffffffa03d28b4>] rfcomm_session_timeout+0xe/0x1a [rfcomm]
[<ffffffff810554a8>] run_timer_softirq+0x1e2/0x29a
[<ffffffffa03d28a6>] ? rfcomm_session_timeout+0x0/0x1a [rfcomm]
[<ffffffff8104e0f6>] __do_softirq+0xfe/0x1c5
[<ffffffff8100e8ce>] ? timer_interrupt+0x1a/0x21
[<ffffffff8100cc4c>] call_softirq+0x1c/0x28
[<ffffffff8100e05b>] do_softirq+0x33/0x6b
[<ffffffff8104daf6>] irq_exit+0x36/0x85
[<ffffffff8100d7a9>] do_IRQ+0xa6/0xbd
[<ffffffff8100c493>] ret_from_intr+0x0/0xa
<EOI> [<ffffffff812585b3>] ? acpi_idle_enter_bm+0x269/0x294
[<ffffffff812585a9>] ? acpi_idle_enter_bm+0x25f/0x294
[<ffffffff81373ddc>] ? cpuidle_idle_call+0x97/0x107
[<ffffffff8100aca0>] ? cpu_idle+0x53/0xaa
[<ffffffff81429006>] ? rest_init+0x7a/0x7c
[<ffffffff8177bc8c>] ? start_kernel+0x389/0x394
[<ffffffff8177b29c>] ? x86_64_start_reservations+0xac/0xb0
[<ffffffff8177b384>] ? x86_64_start_kernel+0xe4/0xeb
To fix this, the rfcomm_session_put() needs to be moved out of
rfcomm_session_timeout() into rfcomm_process_sessions(). In that
context it is perfectly fine to sleep and disconnect the socket.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Tested-by: David John <davidjon@xenontk.org>
Cc: Chase Douglas <chase.douglas@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/bluetooth/rfcomm/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -251,7 +251,6 @@ static void rfcomm_session_timeout(unsig
BT_DBG("session %p state %ld", s, s->state);
set_bit(RFCOMM_TIMED_OUT, &s->flags);
- rfcomm_session_put(s);
rfcomm_schedule(RFCOMM_SCHED_TIMEO);
}
@@ -1917,6 +1916,7 @@ static inline void rfcomm_process_sessio
if (test_and_clear_bit(RFCOMM_TIMED_OUT, &s->flags)) {
s->state = BT_DISCONN;
rfcomm_send_disc(s, 0);
+ rfcomm_session_put(s);
continue;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [019/116] tracing: Use same local variable when resetting the ring buffer
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (17 preceding siblings ...)
2010-03-30 22:54 ` [018/116] Bluetooth: Fix sleeping function in RFCOMM within invalid context Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [020/116] tracing: Disable buffer switching when starting or stopping trace Greg KH
` (96 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Steven Rostedt,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Steven Rostedt <srostedt@redhat.com>
commit 283740c619d211e34572cc93c8cdba92ccbdb9cc upstream.
In the ftrace code that resets the ring buffer it references the
buffer with a local variable, but then uses the tr->buffer as the
parameter to reset. If the wakeup tracer is running, which can
switch the tr->buffer with the max saved buffer, this can break
the requirement of disabling the buffer before the reset.
buffer = tr->buffer;
ring_buffer_record_disable(buffer);
synchronize_sched();
__tracing_reset(tr->buffer, cpu);
If the tr->buffer is swapped, then the reset is not happening to the
buffer that was disabled. This will cause the ring buffer to fail.
Found with Li Zefan's ftrace_stress_test.
Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/trace.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -748,10 +748,10 @@ out:
mutex_unlock(&trace_types_lock);
}
-static void __tracing_reset(struct trace_array *tr, int cpu)
+static void __tracing_reset(struct ring_buffer *buffer, int cpu)
{
ftrace_disable_cpu();
- ring_buffer_reset_cpu(tr->buffer, cpu);
+ ring_buffer_reset_cpu(buffer, cpu);
ftrace_enable_cpu();
}
@@ -763,7 +763,7 @@ void tracing_reset(struct trace_array *t
/* Make sure all commits have finished */
synchronize_sched();
- __tracing_reset(tr, cpu);
+ __tracing_reset(buffer, cpu);
ring_buffer_record_enable(buffer);
}
@@ -781,7 +781,7 @@ void tracing_reset_online_cpus(struct tr
tr->time_start = ftrace_now(tr->cpu);
for_each_online_cpu(cpu)
- __tracing_reset(tr, cpu);
+ __tracing_reset(buffer, cpu);
ring_buffer_record_enable(buffer);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [020/116] tracing: Disable buffer switching when starting or stopping trace
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (18 preceding siblings ...)
2010-03-30 22:54 ` [019/116] tracing: Use same local variable when resetting the ring buffer Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:54 ` [021/116] tracing: Do not record user stack trace from NMI context Greg KH
` (95 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Steven Rostedt,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Steven Rostedt <srostedt@redhat.com>
commit a2f8071428ed9a0f06865f417c962421c9a6b488 upstream.
When the trace iterator is read, tracing_start() and tracing_stop()
is called to stop tracing while the iterator is processing the trace
output.
These functions disable both the standard buffer and the max latency
buffer. But if the wakeup tracer is running, it can switch these
buffers between the two disables:
buffer = global_trace.buffer;
if (buffer)
ring_buffer_record_disable(buffer);
<<<--------- swap happens here
buffer = max_tr.buffer;
if (buffer)
ring_buffer_record_disable(buffer);
What happens is that we disabled the same buffer twice. On tracing_start()
we can enable the same buffer twice. All ring_buffer_record_disable()
must be matched with a ring_buffer_record_enable() or the buffer
can be disable permanently, or enable prematurely, and cause a bug
where a reset happens while a trace is commiting.
This patch protects these two by taking the ftrace_max_lock to prevent
a switch from occurring.
Found with Li Zefan's ftrace_stress_test.
Reported-by: Lai Jiangshan <laijs@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/trace.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -858,6 +858,8 @@ void tracing_start(void)
goto out;
}
+ /* Prevent the buffers from switching */
+ __raw_spin_lock(&ftrace_max_lock);
buffer = global_trace.buffer;
if (buffer)
@@ -867,6 +869,8 @@ void tracing_start(void)
if (buffer)
ring_buffer_record_enable(buffer);
+ __raw_spin_unlock(&ftrace_max_lock);
+
ftrace_start();
out:
spin_unlock_irqrestore(&tracing_start_lock, flags);
@@ -888,6 +892,9 @@ void tracing_stop(void)
if (trace_stop_count++)
goto out;
+ /* Prevent the buffers from switching */
+ __raw_spin_lock(&ftrace_max_lock);
+
buffer = global_trace.buffer;
if (buffer)
ring_buffer_record_disable(buffer);
@@ -896,6 +903,8 @@ void tracing_stop(void)
if (buffer)
ring_buffer_record_disable(buffer);
+ __raw_spin_unlock(&ftrace_max_lock);
+
out:
spin_unlock_irqrestore(&tracing_start_lock, flags);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [021/116] tracing: Do not record user stack trace from NMI context
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (19 preceding siblings ...)
2010-03-30 22:54 ` [020/116] tracing: Disable buffer switching when starting or stopping trace Greg KH
@ 2010-03-30 22:54 ` Greg KH
2010-03-30 22:55 ` [022/116] PCI: unconditionally clear AER uncorr status register during cleanup Greg KH
` (94 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:54 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Steven Rostedt,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Steven Rostedt <srostedt@redhat.com>
commit b6345879ccbd9b92864fbd7eb8ac48acdb4d6b15 upstream.
A bug was found with Li Zefan's ftrace_stress_test that caused applications
to segfault during the test.
Placing a tracing_off() in the segfault code, and examining several
traces, I found that the following was always the case. The lock tracer
was enabled (lockdep being required) and userstack was enabled. Testing
this out, I just enabled the two, but that was not good enough. I needed
to run something else that could trigger it. Running a load like hackbench
did not work, but executing a new program would. The following would
trigger the segfault within seconds:
# echo 1 > /debug/tracing/options/userstacktrace
# echo 1 > /debug/tracing/events/lock/enable
# while :; do ls > /dev/null ; done
Enabling the function graph tracer and looking at what was happening
I finally noticed that all cashes happened just after an NMI.
1) | copy_user_handle_tail() {
1) | bad_area_nosemaphore() {
1) | __bad_area_nosemaphore() {
1) | no_context() {
1) | fixup_exception() {
1) 0.319 us | search_exception_tables();
1) 0.873 us | }
[...]
1) 0.314 us | __rcu_read_unlock();
1) 0.325 us | native_apic_mem_write();
1) 0.943 us | }
1) 0.304 us | rcu_nmi_exit();
[...]
1) 0.479 us | find_vma();
1) | bad_area() {
1) | __bad_area() {
After capturing several traces of failures, all of them happened
after an NMI. Curious about this, I added a trace_printk() to the NMI
handler to read the regs->ip to see where the NMI happened. In which I
found out it was here:
ffffffff8135b660 <page_fault>:
ffffffff8135b660: 48 83 ec 78 sub $0x78,%rsp
ffffffff8135b664: e8 97 01 00 00 callq ffffffff8135b800 <error_entry>
What was happening is that the NMI would happen at the place that a page
fault occurred. It would call rcu_read_lock() which was traced by
the lock events, and the user_stack_trace would run. This would trigger
a page fault inside the NMI. I do not see where the CR2 register is
saved or restored in NMI handling. This means that it would corrupt
the page fault handling that the NMI interrupted.
The reason the while loop of ls helped trigger the bug, was that
each execution of ls would cause lots of pages to be faulted in, and
increase the chances of the race happening.
The simple solution is to not allow user stack traces in NMI context.
After this patch, I ran the above "ls" test for a couple of hours
without any issues. Without this patch, the bug would trigger in less
than a minute.
Reported-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/trace/trace.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -1171,6 +1171,13 @@ ftrace_trace_userstack(struct ring_buffe
if (!(trace_flags & TRACE_ITER_USERSTACKTRACE))
return;
+ /*
+ * NMIs can not handle page faults, even with fix ups.
+ * The save user stack can (and often does) fault.
+ */
+ if (unlikely(in_nmi()))
+ return;
+
event = trace_buffer_lock_reserve(buffer, TRACE_USER_STACK,
sizeof(*entry), flags, pc);
if (!event)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [022/116] PCI: unconditionally clear AER uncorr status register during cleanup
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (20 preceding siblings ...)
2010-03-30 22:54 ` [021/116] tracing: Do not record user stack trace from NMI context Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [023/116] drm/edid: Unify detailed block parsing between base and extension blocks Greg KH
` (93 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andrew Patterson,
Jesse Barnes, Alex Chiang, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andrew Patterson <andrew.patterson@hp.com>
commit 6cdfd995a65a52e05b99e3a72a9b979abe73b312 upstream.
The current implementation of pci_cleanup_aer_uncorrect_error_status
only clears either fatal or non-fatal error status bits depending
on the state of the I/O channel. This implementation will then often
leave some bits set after PCI error recovery completes. The uncleared bit
settings will then be falsely reported the next time an AER interrupt is
generated for that hierarchy. An easy way to illustrate this issue is to
use the aer-inject module to simultaneously inject both an uncorrectable
non-fatal and uncorrectable fatal error. One of the errors will not be
cleared.
This patch resolves this issue by unconditionally clearing all bits in
the AER uncorrectable status register. All settings and corrective action
strategies are saved and determined before
pci_cleanup_aer_uncorrect_error_status is called, so this change should not
affect errory handling functionality.
Signed-off-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Cc: Alex Chiang <achiang@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pcie/aer/aerdrv_core.c | 10 +++-------
1 file changed, 3 insertions(+), 7 deletions(-)
--- a/drivers/pci/pcie/aer/aerdrv_core.c
+++ b/drivers/pci/pcie/aer/aerdrv_core.c
@@ -78,19 +78,15 @@ EXPORT_SYMBOL_GPL(pci_disable_pcie_error
int pci_cleanup_aer_uncorrect_error_status(struct pci_dev *dev)
{
int pos;
- u32 status, mask;
+ u32 status;
pos = pci_find_ext_capability(dev, PCI_EXT_CAP_ID_ERR);
if (!pos)
return -EIO;
pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, &status);
- pci_read_config_dword(dev, pos + PCI_ERR_UNCOR_SEVER, &mask);
- if (dev->error_state == pci_channel_io_normal)
- status &= ~mask; /* Clear corresponding nonfatal bits */
- else
- status &= mask; /* Clear corresponding fatal bits */
- pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status);
+ if (status)
+ pci_write_config_dword(dev, pos + PCI_ERR_UNCOR_STATUS, status);
return 0;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [023/116] drm/edid: Unify detailed block parsing between base and extension blocks
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (21 preceding siblings ...)
2010-03-30 22:55 ` [022/116] PCI: unconditionally clear AER uncorr status register during cleanup Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [024/116] efifb: fix framebuffer handoff Greg KH
` (92 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Adam Jackson, Dave Airlie,
maximilian attems, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Adam Jackson <ajax@redhat.com>
commit 9cf00977da092096c7a983276dad8b3002d23a99 upstream.
Also fix an embarassing bug in standard timing subblock parsing that
would result in an infinite loop.
Signed-off-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/drm_edid.c | 163 ++++++++++++++++-----------------------------
1 file changed, 61 insertions(+), 102 deletions(-)
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -834,8 +834,57 @@ static int add_standard_modes(struct drm
return modes;
}
+static int add_detailed_modes(struct drm_connector *connector,
+ struct detailed_timing *timing,
+ struct edid *edid, u32 quirks, int preferred)
+{
+ int i, modes = 0;
+ struct detailed_non_pixel *data = &timing->data.other_data;
+ int timing_level = standard_timing_level(edid);
+ struct drm_display_mode *newmode;
+ struct drm_device *dev = connector->dev;
+
+ if (timing->pixel_clock) {
+ newmode = drm_mode_detailed(dev, edid, timing, quirks);
+ if (!newmode)
+ return 0;
+
+ if (preferred)
+ newmode->type |= DRM_MODE_TYPE_PREFERRED;
+
+ drm_mode_probed_add(connector, newmode);
+ return 1;
+ }
+
+ /* other timing types */
+ switch (data->type) {
+ case EDID_DETAIL_MONITOR_RANGE:
+ /* Get monitor range data */
+ break;
+ case EDID_DETAIL_STD_MODES:
+ /* Six modes per detailed section */
+ for (i = 0; i < 6; i++) {
+ struct std_timing *std;
+ struct drm_display_mode *newmode;
+
+ std = &data->data.timings[i];
+ newmode = drm_mode_std(dev, std, edid->revision,
+ timing_level);
+ if (newmode) {
+ drm_mode_probed_add(connector, newmode);
+ modes++;
+ }
+ }
+ break;
+ default:
+ break;
+ }
+
+ return modes;
+}
+
/**
- * add_detailed_modes - get detailed mode info from EDID data
+ * add_detailed_info - get detailed mode info from EDID data
* @connector: attached connector
* @edid: EDID block to scan
* @quirks: quirks to apply
@@ -846,67 +895,24 @@ static int add_standard_modes(struct drm
static int add_detailed_info(struct drm_connector *connector,
struct edid *edid, u32 quirks)
{
- struct drm_device *dev = connector->dev;
- int i, j, modes = 0;
- int timing_level;
-
- timing_level = standard_timing_level(edid);
+ int i, modes = 0;
for (i = 0; i < EDID_DETAILED_TIMINGS; i++) {
struct detailed_timing *timing = &edid->detailed_timings[i];
- struct detailed_non_pixel *data = &timing->data.other_data;
- struct drm_display_mode *newmode;
+ int preferred = (i == 0) && (edid->features & DRM_EDID_FEATURE_PREFERRED_TIMING);
- /* X server check is version 1.1 or higher */
- if (edid->version == 1 && edid->revision >= 1 &&
- !timing->pixel_clock) {
- /* Other timing or info */
- switch (data->type) {
- case EDID_DETAIL_MONITOR_SERIAL:
- break;
- case EDID_DETAIL_MONITOR_STRING:
- break;
- case EDID_DETAIL_MONITOR_RANGE:
- /* Get monitor range data */
- break;
- case EDID_DETAIL_MONITOR_NAME:
- break;
- case EDID_DETAIL_MONITOR_CPDATA:
- break;
- case EDID_DETAIL_STD_MODES:
- for (j = 0; j < 6; i++) {
- struct std_timing *std;
- struct drm_display_mode *newmode;
-
- std = &data->data.timings[j];
- newmode = drm_mode_std(dev, std,
- edid->revision,
- timing_level);
- if (newmode) {
- drm_mode_probed_add(connector, newmode);
- modes++;
- }
- }
- break;
- default:
- break;
- }
- } else {
- newmode = drm_mode_detailed(dev, edid, timing, quirks);
- if (!newmode)
- continue;
-
- /* First detailed mode is preferred */
- if (i == 0 && (edid->features & DRM_EDID_FEATURE_PREFERRED_TIMING))
- newmode->type |= DRM_MODE_TYPE_PREFERRED;
- drm_mode_probed_add(connector, newmode);
+ /* In 1.0, only timings are allowed */
+ if (!timing->pixel_clock && edid->version == 1 &&
+ edid->revision == 0)
+ continue;
- modes++;
- }
+ modes += add_detailed_modes(connector, timing, edid, quirks,
+ preferred);
}
return modes;
}
+
/**
* add_detailed_mode_eedid - get detailed mode info from addtional timing
* EDID block
@@ -920,12 +926,9 @@ static int add_detailed_info(struct drm_
static int add_detailed_info_eedid(struct drm_connector *connector,
struct edid *edid, u32 quirks)
{
- struct drm_device *dev = connector->dev;
- int i, j, modes = 0;
+ int i, modes = 0;
char *edid_ext = NULL;
struct detailed_timing *timing;
- struct detailed_non_pixel *data;
- struct drm_display_mode *newmode;
int edid_ext_num;
int start_offset, end_offset;
int timing_level;
@@ -976,51 +979,7 @@ static int add_detailed_info_eedid(struc
for (i = start_offset; i < end_offset;
i += sizeof(struct detailed_timing)) {
timing = (struct detailed_timing *)(edid_ext + i);
- data = &timing->data.other_data;
- /* Detailed mode timing */
- if (timing->pixel_clock) {
- newmode = drm_mode_detailed(dev, edid, timing, quirks);
- if (!newmode)
- continue;
-
- drm_mode_probed_add(connector, newmode);
-
- modes++;
- continue;
- }
-
- /* Other timing or info */
- switch (data->type) {
- case EDID_DETAIL_MONITOR_SERIAL:
- break;
- case EDID_DETAIL_MONITOR_STRING:
- break;
- case EDID_DETAIL_MONITOR_RANGE:
- /* Get monitor range data */
- break;
- case EDID_DETAIL_MONITOR_NAME:
- break;
- case EDID_DETAIL_MONITOR_CPDATA:
- break;
- case EDID_DETAIL_STD_MODES:
- /* Five modes per detailed section */
- for (j = 0; j < 5; i++) {
- struct std_timing *std;
- struct drm_display_mode *newmode;
-
- std = &data->data.timings[j];
- newmode = drm_mode_std(dev, std,
- edid->revision,
- timing_level);
- if (newmode) {
- drm_mode_probed_add(connector, newmode);
- modes++;
- }
- }
- break;
- default:
- break;
- }
+ modes += add_detailed_modes(connector, timing, edid, quirks, 0);
}
return modes;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [024/116] efifb: fix framebuffer handoff
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (22 preceding siblings ...)
2010-03-30 22:55 ` [023/116] drm/edid: Unify detailed block parsing between base and extension blocks Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [025/116] coredump: suppress uid comparison test if core output files are pipes Greg KH
` (91 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Marcin Slusarz, Peter Jones,
Huang Ying, Dave Airlie, Rafael J. Wysocki, maximilian attems,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marcin Slusarz <marcin.slusarz@gmail.com>
commit 89f3f2199084a160a3a45fa6d9af235696321758 upstream.
Commit 4410f3910947dcea8672280b3adecd53cec4e85e ("fbdev: add support for
handoff from firmware to hw framebuffers") didn't add fb_destroy
operation to efifb. Fix it and change aperture_size to match size
passed to request_mem_region.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=15151
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Reported-by: Alex Zhavnerchik <alex.vizor@gmail.com>
Tested-by: Alex Zhavnerchik <alex.vizor@gmail.com>
Acked-by: Peter Jones <pjones@redhat.com>
Cc: Huang Ying <ying.huang@intel.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/video/efifb.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -161,8 +161,17 @@ static int efifb_setcolreg(unsigned regn
return 0;
}
+static void efifb_destroy(struct fb_info *info)
+{
+ if (info->screen_base)
+ iounmap(info->screen_base);
+ release_mem_region(info->aperture_base, info->aperture_size);
+ framebuffer_release(info);
+}
+
static struct fb_ops efifb_ops = {
.owner = THIS_MODULE,
+ .fb_destroy = efifb_destroy,
.fb_setcolreg = efifb_setcolreg,
.fb_fillrect = cfb_fillrect,
.fb_copyarea = cfb_copyarea,
@@ -281,7 +290,7 @@ static int __init efifb_probe(struct pla
info->par = NULL;
info->aperture_base = efifb_fix.smem_start;
- info->aperture_size = size_total;
+ info->aperture_size = size_remap;
info->screen_base = ioremap(efifb_fix.smem_start, efifb_fix.smem_len);
if (!info->screen_base) {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [025/116] coredump: suppress uid comparison test if core output files are pipes
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (23 preceding siblings ...)
2010-03-30 22:55 ` [024/116] efifb: fix framebuffer handoff Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [026/116] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
` (90 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Neil Horman, Andi Kleen,
Oleg Nesterov, Al Viro, Ingo Molnar, maximilian attems,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Neil Horman <nhorman@tuxdriver.com>
commit 76595f79d76fbe6267a51b3a866a028d150f06d4 upstream.
Modify uid check in do_coredump so as to not apply it in the case of
pipes.
This just got noticed in testing. The end of do_coredump validates the
uid of the inode for the created file against the uid of the crashing
process to ensure that no one can pre-create a core file with different
ownership and grab the information contained in the core when they
shouldn' tbe able to. This causes failures when using pipes for a core
dumps if the crashing process is not root, which is the uid of the pipe
when it is created.
The fix is simple. Since the check for matching uid's isn't relevant for
pipes (a process can't create a pipe that the uermodehelper code will open
anyway), we can just just skip it in the event ispipe is non-zero
Reverts a pipe-affecting change which was accidentally made in
: commit c46f739dd39db3b07ab5deb4e3ec81e1c04a91af
: Author: Ingo Molnar <mingo@elte.hu>
: AuthorDate: Wed Nov 28 13:59:18 2007 +0100
: Commit: Linus Torvalds <torvalds@woody.linux-foundation.org>
: CommitDate: Wed Nov 28 10:58:01 2007 -0800
:
: vfs: coredumping fix
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/exec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1913,8 +1913,9 @@ void do_coredump(long signr, int exit_co
/*
* Dont allow local users get cute and trick others to coredump
* into their pre-created files:
+ * Note, this is not relevant for pipes
*/
- if (inode->i_uid != current_fsuid())
+ if (!ispipe && (inode->i_uid != current_fsuid()))
goto close_fail;
if (!file->f_op)
goto close_fail;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [026/116] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (24 preceding siblings ...)
2010-03-30 22:55 ` [025/116] coredump: suppress uid comparison test if core output files are pipes Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [027/116] hrtimer: Tune hrtimer_interrupt hang logic Greg KH
` (89 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Francesco Lavra,
Mauro Carvalho Chehab, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Francesco Lavra <francescolavra@interfree.it>
commit 19f48cb105b7fa18d0dcab435919a3a29b7a7c4c upstream.
this patch fixes a memory leak which occurs when an em28xx card with DVB
extension is unplugged or its DVB extension driver is unloaded. In
dvb_fini(), dev->dvb must be freed before being set to NULL, as is done
in dvb_init() in case of error.
Note that this bug is also present in the latest stable kernel release.
Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/media/video/em28xx/em28xx-dvb.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -610,6 +610,7 @@ static int dvb_fini(struct em28xx *dev)
if (dev->dvb) {
unregister_dvb(dev->dvb);
+ kfree(dev->dvb);
dev->dvb = NULL;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [027/116] hrtimer: Tune hrtimer_interrupt hang logic
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (25 preceding siblings ...)
2010-03-30 22:55 ` [026/116] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [028/116] x86, apic: Dont use logical-flat mode when CPU hotplug may exceed 8 CPUs Greg KH
` (88 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas Gleixner, kvm,
Jeremy Fitzhardinge, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
commit 41d2e494937715d3150e5c75d01f0e75ae899337 upstream.
The hrtimer_interrupt hang logic adjusts min_delta_ns based on the
execution time of the hrtimer callbacks.
This is error-prone for virtual machines, where a guest vcpu can be
scheduled out during the execution of the callbacks (and the callbacks
themselves can do operations that translate to blocking operations in
the hypervisor), which in can lead to large min_delta_ns rendering the
system unusable.
Replace the current heuristics with something more reliable. Allow the
interrupt code to try 3 times to catch up with the lost time. If that
fails use the total time spent in the interrupt handler to defer the
next timer interrupt so the system can catch up with other things
which got delayed. Limit that deferment to 100ms.
The retry events and the maximum time spent in the interrupt handler
are recorded and exposed via /proc/timer_list
Inspired by a patch from Marcelo.
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm@vger.kernel.org
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/hrtimer.h | 13 ++++--
kernel/hrtimer.c | 96 +++++++++++++++++++++++++++--------------------
kernel/time/timer_list.c | 5 +-
3 files changed, 70 insertions(+), 44 deletions(-)
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -162,10 +162,11 @@ struct hrtimer_clock_base {
* @expires_next: absolute time of the next event which was scheduled
* via clock_set_next_event()
* @hres_active: State of high resolution mode
- * @check_clocks: Indictator, when set evaluate time source and clock
- * event devices whether high resolution mode can be
- * activated.
- * @nr_events: Total number of timer interrupt events
+ * @hang_detected: The last hrtimer interrupt detected a hang
+ * @nr_events: Total number of hrtimer interrupt events
+ * @nr_retries: Total number of hrtimer interrupt retries
+ * @nr_hangs: Total number of hrtimer interrupt hangs
+ * @max_hang_time: Maximum time spent in hrtimer_interrupt
*/
struct hrtimer_cpu_base {
spinlock_t lock;
@@ -173,7 +174,11 @@ struct hrtimer_cpu_base {
#ifdef CONFIG_HIGH_RES_TIMERS
ktime_t expires_next;
int hres_active;
+ int hang_detected;
unsigned long nr_events;
+ unsigned long nr_retries;
+ unsigned long nr_hangs;
+ ktime_t max_hang_time;
#endif
};
--- a/kernel/hrtimer.c
+++ b/kernel/hrtimer.c
@@ -557,7 +557,7 @@ hrtimer_force_reprogram(struct hrtimer_c
static int hrtimer_reprogram(struct hrtimer *timer,
struct hrtimer_clock_base *base)
{
- ktime_t *expires_next = &__get_cpu_var(hrtimer_bases).expires_next;
+ struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases);
ktime_t expires = ktime_sub(hrtimer_get_expires(timer), base->offset);
int res;
@@ -582,7 +582,16 @@ static int hrtimer_reprogram(struct hrti
if (expires.tv64 < 0)
return -ETIME;
- if (expires.tv64 >= expires_next->tv64)
+ if (expires.tv64 >= cpu_base->expires_next.tv64)
+ return 0;
+
+ /*
+ * If a hang was detected in the last timer interrupt then we
+ * do not schedule a timer which is earlier than the expiry
+ * which we enforced in the hang detection. We want the system
+ * to make progress.
+ */
+ if (cpu_base->hang_detected)
return 0;
/*
@@ -590,7 +599,7 @@ static int hrtimer_reprogram(struct hrti
*/
res = tick_program_event(expires, 0);
if (!IS_ERR_VALUE(res))
- *expires_next = expires;
+ cpu_base->expires_next = expires;
return res;
}
@@ -1217,29 +1226,6 @@ static void __run_hrtimer(struct hrtimer
#ifdef CONFIG_HIGH_RES_TIMERS
-static int force_clock_reprogram;
-
-/*
- * After 5 iteration's attempts, we consider that hrtimer_interrupt()
- * is hanging, which could happen with something that slows the interrupt
- * such as the tracing. Then we force the clock reprogramming for each future
- * hrtimer interrupts to avoid infinite loops and use the min_delta_ns
- * threshold that we will overwrite.
- * The next tick event will be scheduled to 3 times we currently spend on
- * hrtimer_interrupt(). This gives a good compromise, the cpus will spend
- * 1/4 of their time to process the hrtimer interrupts. This is enough to
- * let it running without serious starvation.
- */
-
-static inline void
-hrtimer_interrupt_hanging(struct clock_event_device *dev,
- ktime_t try_time)
-{
- force_clock_reprogram = 1;
- dev->min_delta_ns = (unsigned long)try_time.tv64 * 3;
- printk(KERN_WARNING "hrtimer: interrupt too slow, "
- "forcing clock min delta to %lu ns\n", dev->min_delta_ns);
-}
/*
* High resolution timer interrupt
* Called with interrupts disabled
@@ -1248,21 +1234,15 @@ void hrtimer_interrupt(struct clock_even
{
struct hrtimer_cpu_base *cpu_base = &__get_cpu_var(hrtimer_bases);
struct hrtimer_clock_base *base;
- ktime_t expires_next, now;
- int nr_retries = 0;
- int i;
+ ktime_t expires_next, now, entry_time, delta;
+ int i, retries = 0;
BUG_ON(!cpu_base->hres_active);
cpu_base->nr_events++;
dev->next_event.tv64 = KTIME_MAX;
- retry:
- /* 5 retries is enough to notice a hang */
- if (!(++nr_retries % 5))
- hrtimer_interrupt_hanging(dev, ktime_sub(ktime_get(), now));
-
- now = ktime_get();
-
+ entry_time = now = ktime_get();
+retry:
expires_next.tv64 = KTIME_MAX;
spin_lock(&cpu_base->lock);
@@ -1324,10 +1304,48 @@ void hrtimer_interrupt(struct clock_even
spin_unlock(&cpu_base->lock);
/* Reprogramming necessary ? */
- if (expires_next.tv64 != KTIME_MAX) {
- if (tick_program_event(expires_next, force_clock_reprogram))
- goto retry;
+ if (expires_next.tv64 == KTIME_MAX ||
+ !tick_program_event(expires_next, 0)) {
+ cpu_base->hang_detected = 0;
+ return;
}
+
+ /*
+ * The next timer was already expired due to:
+ * - tracing
+ * - long lasting callbacks
+ * - being scheduled away when running in a VM
+ *
+ * We need to prevent that we loop forever in the hrtimer
+ * interrupt routine. We give it 3 attempts to avoid
+ * overreacting on some spurious event.
+ */
+ now = ktime_get();
+ cpu_base->nr_retries++;
+ if (++retries < 3)
+ goto retry;
+ /*
+ * Give the system a chance to do something else than looping
+ * here. We stored the entry time, so we know exactly how long
+ * we spent here. We schedule the next event this amount of
+ * time away.
+ */
+ cpu_base->nr_hangs++;
+ cpu_base->hang_detected = 1;
+ delta = ktime_sub(now, entry_time);
+ if (delta.tv64 > cpu_base->max_hang_time.tv64)
+ cpu_base->max_hang_time = delta;
+ /*
+ * Limit it to a sensible value as we enforce a longer
+ * delay. Give the CPU at least 100ms to catch up.
+ */
+ if (delta.tv64 > 100 * NSEC_PER_MSEC)
+ expires_next = ktime_add_ns(now, 100 * NSEC_PER_MSEC);
+ else
+ expires_next = ktime_add(now, delta);
+ tick_program_event(expires_next, 1);
+ printk_once(KERN_WARNING "hrtimer: interrupt took %llu ns\n",
+ ktime_to_ns(delta));
}
/*
--- a/kernel/time/timer_list.c
+++ b/kernel/time/timer_list.c
@@ -150,6 +150,9 @@ static void print_cpu(struct seq_file *m
P_ns(expires_next);
P(hres_active);
P(nr_events);
+ P(nr_retries);
+ P(nr_hangs);
+ P_ns(max_hang_time);
#endif
#undef P
#undef P_ns
@@ -252,7 +255,7 @@ static int timer_list_show(struct seq_fi
u64 now = ktime_to_ns(ktime_get());
int cpu;
- SEQ_printf(m, "Timer List Version: v0.4\n");
+ SEQ_printf(m, "Timer List Version: v0.5\n");
SEQ_printf(m, "HRTIMER_MAX_CLOCK_BASES: %d\n", HRTIMER_MAX_CLOCK_BASES);
SEQ_printf(m, "now at %Ld nsecs\n", (unsigned long long)now);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [028/116] x86, apic: Dont use logical-flat mode when CPU hotplug may exceed 8 CPUs
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (26 preceding siblings ...)
2010-03-30 22:55 ` [027/116] hrtimer: Tune hrtimer_interrupt hang logic Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [029/116] [SCSI] mvsas: add support for Adaptec ASC-1045/1405 SAS/SATA HBA Greg KH
` (87 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable, Greg KH
Cc: stable-review, torvalds, akpm, alan, shaohui.zheng, Yinghai Lu,
H. Peter Anvin, Suresh Siddha, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Suresh Siddha <suresh.b.siddha@intel.com>
commit 681ee44d40d7c93b42118320e4620d07d8704fd6 upstream
We need to fall back from logical-flat APIC mode to physical-flat mode
when we have more than 8 CPUs. However, in the presence of CPU
hotplug(with bios listing not enabled but possible cpus as disabled cpus in
MADT), we have to consider the number of possible CPUs rather than
the number of current CPUs; otherwise we may cross the 8-CPU boundary
when CPUs are added later.
32bit apic code can use more cleanups (like the removal of vendor checks in
32bit default_setup_apic_routing()) and more unifications with 64bit code.
Yinghai has some patches in works already. This patch addresses the boot issue
that is reported in the virtualization guest context.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Shaohui Zheng <shaohui.zheng@intel.com>
Reviewed-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/acpi/boot.c | 5 -----
arch/x86/kernel/apic/apic.c | 14 --------------
arch/x86/kernel/apic/probe_32.c | 27 ++++++++++++++++++++++++++-
arch/x86/kernel/apic/probe_64.c | 13 ++-----------
arch/x86/kernel/mpparse.c | 7 -------
arch/x86/kernel/smpboot.c | 2 --
6 files changed, 28 insertions(+), 40 deletions(-)
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -1191,9 +1191,6 @@ static void __init acpi_process_madt(voi
if (!error) {
acpi_lapic = 1;
-#ifdef CONFIG_X86_BIGSMP
- generic_bigsmp_probe();
-#endif
/*
* Parse MADT IO-APIC entries
*/
@@ -1203,8 +1200,6 @@ static void __init acpi_process_madt(voi
acpi_ioapic = 1;
smp_found_config = 1;
- if (apic->setup_apic_routing)
- apic->setup_apic_routing();
}
}
if (error == -EINVAL) {
--- a/arch/x86/kernel/apic/apic.c
+++ b/arch/x86/kernel/apic/apic.c
@@ -1665,9 +1665,7 @@ int __init APIC_init_uniprocessor(void)
#endif
enable_IR_x2apic();
-#ifdef CONFIG_X86_64
default_setup_apic_routing();
-#endif
verify_local_APIC();
connect_bsp_APIC();
@@ -1915,18 +1913,6 @@ void __cpuinit generic_processor_info(in
if (apicid > max_physical_apicid)
max_physical_apicid = apicid;
-#ifdef CONFIG_X86_32
- switch (boot_cpu_data.x86_vendor) {
- case X86_VENDOR_INTEL:
- if (num_processors > 8)
- def_to_bigsmp = 1;
- break;
- case X86_VENDOR_AMD:
- if (max_physical_apicid >= 8)
- def_to_bigsmp = 1;
- }
-#endif
-
#if defined(CONFIG_SMP) || defined(CONFIG_X86_64)
early_per_cpu(x86_cpu_to_apicid, cpu) = apicid;
early_per_cpu(x86_bios_cpu_apicid, cpu) = apicid;
--- a/arch/x86/kernel/apic/probe_32.c
+++ b/arch/x86/kernel/apic/probe_32.c
@@ -54,6 +54,31 @@ late_initcall(print_ipi_mode);
void default_setup_apic_routing(void)
{
+ int version = apic_version[boot_cpu_physical_apicid];
+
+ if (num_possible_cpus() > 8) {
+ switch (boot_cpu_data.x86_vendor) {
+ case X86_VENDOR_INTEL:
+ if (!APIC_XAPIC(version)) {
+ def_to_bigsmp = 0;
+ break;
+ }
+ /* If P4 and above fall through */
+ case X86_VENDOR_AMD:
+ def_to_bigsmp = 1;
+ }
+ }
+
+#ifdef CONFIG_X86_BIGSMP
+ generic_bigsmp_probe();
+#endif
+
+ if (apic->setup_apic_routing)
+ apic->setup_apic_routing();
+}
+
+void setup_apic_flat_routing(void)
+{
#ifdef CONFIG_X86_IO_APIC
printk(KERN_INFO
"Enabling APIC mode: Flat. Using %d I/O APICs\n",
@@ -103,7 +128,7 @@ struct apic apic_default = {
.init_apic_ldr = default_init_apic_ldr,
.ioapic_phys_id_map = default_ioapic_phys_id_map,
- .setup_apic_routing = default_setup_apic_routing,
+ .setup_apic_routing = setup_apic_flat_routing,
.multi_timer_check = NULL,
.apicid_to_node = default_apicid_to_node,
.cpu_to_logical_apicid = default_cpu_to_logical_apicid,
--- a/arch/x86/kernel/apic/probe_64.c
+++ b/arch/x86/kernel/apic/probe_64.c
@@ -67,17 +67,8 @@ void __init default_setup_apic_routing(v
}
#endif
- if (apic == &apic_flat) {
- switch (boot_cpu_data.x86_vendor) {
- case X86_VENDOR_INTEL:
- if (num_processors > 8)
- apic = &apic_physflat;
- break;
- case X86_VENDOR_AMD:
- if (max_physical_apicid >= 8)
- apic = &apic_physflat;
- }
- }
+ if (apic == &apic_flat && num_possible_cpus() > 8)
+ apic = &apic_physflat;
printk(KERN_INFO "Setting APIC routing to %s\n", apic->name);
--- a/arch/x86/kernel/mpparse.c
+++ b/arch/x86/kernel/mpparse.c
@@ -359,13 +359,6 @@ static int __init smp_read_mpc(struct mp
x86_init.mpparse.mpc_record(1);
}
-#ifdef CONFIG_X86_BIGSMP
- generic_bigsmp_probe();
-#endif
-
- if (apic->setup_apic_routing)
- apic->setup_apic_routing();
-
if (!num_processors)
printk(KERN_ERR "MPTABLE: no processors registered!\n");
return num_processors;
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -1066,9 +1066,7 @@ void __init native_smp_prepare_cpus(unsi
set_cpu_sibling_map(0);
enable_IR_x2apic();
-#ifdef CONFIG_X86_64
default_setup_apic_routing();
-#endif
if (smp_sanity_check(max_cpus) < 0) {
printk(KERN_INFO "SMP disabled\n");
^ permalink raw reply [flat|nested] 432+ messages in thread
* [029/116] [SCSI] mvsas: add support for Adaptec ASC-1045/1405 SAS/SATA HBA
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (27 preceding siblings ...)
2010-03-30 22:55 ` [028/116] x86, apic: Dont use logical-flat mode when CPU hotplug may exceed 8 CPUs Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [030/116] pci: add support for 82576NS serdes to existing SR-IOV quirk Greg KH
` (86 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Srinivas, Andy Yan,
James Bottomley, Thomas Voegtle, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Srinivas <satyasrinivasp@hcl.in>
commit 7ec4ad0125db0222e397508c190b01c8f2b5f7cd upstream.
This is support for Adaptec ASC-1045/1405 SAS/SATA HBA on mvsas, which
is based on Marvell 88SE6440 chipset.
Signed-off-by: Srinivas <satyasrinivasp@hcl.in>
Cc: Andy Yan <ayan@marvell.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Cc: Thomas Voegtle <tv@lio96.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/scsi/mvsas/mv_init.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/scsi/mvsas/mv_init.c
+++ b/drivers/scsi/mvsas/mv_init.c
@@ -657,6 +657,7 @@ static struct pci_device_id __devinitdat
{ PCI_VDEVICE(MARVELL, 0x9180), chip_9180 },
{ PCI_VDEVICE(ARECA, PCI_DEVICE_ID_ARECA_1300), chip_1300 },
{ PCI_VDEVICE(ARECA, PCI_DEVICE_ID_ARECA_1320), chip_1320 },
+ { PCI_VDEVICE(ADAPTEC2, 0x0450), chip_6440 },
{ } /* terminate list */
};
^ permalink raw reply [flat|nested] 432+ messages in thread
* [030/116] pci: add support for 82576NS serdes to existing SR-IOV quirk
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (28 preceding siblings ...)
2010-03-30 22:55 ` [029/116] [SCSI] mvsas: add support for Adaptec ASC-1045/1405 SAS/SATA HBA Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [031/116] sched: Mark boot-cpu active before smp_init() Greg KH
` (85 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alexander Duyck,
Jeff Kirsher, David S. Miller, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alexander Duyck <alexander.h.duyck@intel.com>
commit 7a0deb6bcda98c2a764cb87f1441eef920fd3663 upstream.
This patch adds support for the 82576NS Serdes adapter to the existing pci
quirk for 82576 parts.
Signed-off-by: Alexander Duyck <alexander.h.duyck@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/pci/quirks.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2513,6 +2513,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x10e8, quirk_i82576_sriov);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x150a, quirk_i82576_sriov);
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x150d, quirk_i82576_sriov);
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x1518, quirk_i82576_sriov);
#endif /* CONFIG_PCI_IOV */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [031/116] sched: Mark boot-cpu active before smp_init()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (29 preceding siblings ...)
2010-03-30 22:55 ` [030/116] pci: add support for 82576NS serdes to existing SR-IOV quirk Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [032/116] [PATCH] sparc64: Make prom entry spinlock NMI safe Greg KH
` (84 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Peter Zijlstra,
Mike Galbraith, Ingo Molnar, Christoph Biedl, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
commit 933b0618d8b2a59c7a0742e43836544e02f1e9bd upstream.
A UP machine has 1 active cpu, not having the boot-cpu in the
active map when starting the scheduler confuses things.
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
LKML-Reference: <20091216170517.423469527@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Biedl <linux-kernel.bfrz@manchmal.in-ulm.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
init/main.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
--- a/init/main.c
+++ b/init/main.c
@@ -369,12 +369,6 @@ static void __init smp_init(void)
{
unsigned int cpu;
- /*
- * Set up the current CPU as possible to migrate to.
- * The other ones will be done by cpu_up/cpu_down()
- */
- set_cpu_active(smp_processor_id(), true);
-
/* FIXME: This should be done in userspace --RR */
for_each_present_cpu(cpu) {
if (num_online_cpus() >= setup_max_cpus)
@@ -486,6 +480,7 @@ static void __init boot_cpu_init(void)
int cpu = smp_processor_id();
/* Mark the boot cpu "present", "online" etc for SMP and UP case */
set_cpu_online(cpu, true);
+ set_cpu_active(cpu, true);
set_cpu_present(cpu, true);
set_cpu_possible(cpu, true);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [032/116] [PATCH] sparc64: Make prom entry spinlock NMI safe.
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (30 preceding siblings ...)
2010-03-30 22:55 ` [031/116] sched: Mark boot-cpu active before smp_init() Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [033/116] sysctl: require CAP_SYS_RAWIO to set mmap_min_addr Greg KH
` (83 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: David S. Miller <davem@davemloft.net>
[ Upstream commit 8a4fd1e4922413cfdfa6c51a59efb720d904a5eb ]
If we do something like try to print to the OF console from an NMI
while we're already in OpenFirmware, we'll deadlock on the spinlock.
Use a raw spinlock and disable NMIs when we take it.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sparc/prom/p1275.c | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
--- a/arch/sparc/prom/p1275.c
+++ b/arch/sparc/prom/p1275.c
@@ -32,8 +32,7 @@ extern void prom_cif_interface(void);
extern void prom_cif_callback(void);
/*
- * This provides SMP safety on the p1275buf. prom_callback() drops this lock
- * to allow recursuve acquisition.
+ * This provides SMP safety on the p1275buf.
*/
DEFINE_SPINLOCK(prom_entry_lock);
@@ -47,7 +46,9 @@ long p1275_cmd(const char *service, long
p = p1275buf.prom_buffer;
- spin_lock_irqsave(&prom_entry_lock, flags);
+ raw_local_save_flags(flags);
+ raw_local_irq_restore(PIL_NMI);
+ spin_lock(&prom_entry_lock);
p1275buf.prom_args[0] = (unsigned long)p; /* service */
strcpy (p, service);
@@ -139,7 +140,8 @@ long p1275_cmd(const char *service, long
va_end(list);
x = p1275buf.prom_args [nargs + 3];
- spin_unlock_irqrestore(&prom_entry_lock, flags);
+ spin_unlock(&prom_entry_lock);
+ raw_local_irq_restore(flags);
return x;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [033/116] sysctl: require CAP_SYS_RAWIO to set mmap_min_addr
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (31 preceding siblings ...)
2010-03-30 22:55 ` [032/116] [PATCH] sparc64: Make prom entry spinlock NMI safe Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [034/116] e1000e: enable new 82567V-3 device Greg KH
` (82 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Kees Cook, Serge Hallyn,
James Morris, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Kees Cook <kees.cook@canonical.com>
commit 0e1a6ef2dea88101b056b6d9984f3325c5efced3 upstream.
Currently the mmap_min_addr value can only be bypassed during mmap when
the task has CAP_SYS_RAWIO. However, the mmap_min_addr sysctl value itself
can be adjusted to 0 if euid == 0, allowing a bypass without CAP_SYS_RAWIO.
This patch adds a check for the capability before allowing mmap_min_addr to
be changed.
Signed-off-by: Kees Cook <kees.cook@canonical.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Signed-off-by: James Morris <jmorris@namei.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
security/min_addr.c | 3 +++
1 file changed, 3 insertions(+)
--- a/security/min_addr.c
+++ b/security/min_addr.c
@@ -33,6 +33,9 @@ int mmap_min_addr_handler(struct ctl_tab
{
int ret;
+ if (!capable(CAP_SYS_RAWIO))
+ return -EPERM;
+
ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
update_mmap_min_addr();
^ permalink raw reply [flat|nested] 432+ messages in thread
* [034/116] e1000e: enable new 82567V-3 device
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (32 preceding siblings ...)
2010-03-30 22:55 ` [033/116] sysctl: require CAP_SYS_RAWIO to set mmap_min_addr Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [035/116] ixgbe: add support for 82599 KR device 0x1517 Greg KH
` (81 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bruce Allan, Jeff Kirsher,
David S. Miller, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bruce Allan <bruce.w.allan@intel.com>
commit 9e135a2e6266eba276f33c404a2478499bc07ff5 upstream.
This new PCI device ID is for a new combination of MAC and PHY both of
which already have supporting code in the driver, just not yet in this
combination. During validation of the device, an intermittent issue was
discovered with waking it from a suspended state which can be resolved with
the pre-existing workaround to disable gigabit speed prior to suspending.
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/hw.h | 1 +
drivers/net/e1000e/ich8lan.c | 1 +
drivers/net/e1000e/netdev.c | 1 +
3 files changed, 3 insertions(+)
--- a/drivers/net/e1000e/hw.h
+++ b/drivers/net/e1000e/hw.h
@@ -356,6 +356,7 @@ enum e1e_registers {
#define E1000_DEV_ID_80003ES2LAN_COPPER_SPT 0x10BA
#define E1000_DEV_ID_80003ES2LAN_SERDES_SPT 0x10BB
+#define E1000_DEV_ID_ICH8_82567V_3 0x1501
#define E1000_DEV_ID_ICH8_IGP_M_AMT 0x1049
#define E1000_DEV_ID_ICH8_IGP_AMT 0x104A
#define E1000_DEV_ID_ICH8_IGP_C 0x104B
--- a/drivers/net/e1000e/ich8lan.c
+++ b/drivers/net/e1000e/ich8lan.c
@@ -3209,6 +3209,7 @@ void e1000e_disable_gig_wol_ich8lan(stru
u32 phy_ctrl;
switch (hw->mac.type) {
+ case e1000_ich8lan:
case e1000_ich9lan:
case e1000_ich10lan:
case e1000_pchlan:
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -5360,6 +5360,7 @@ static struct pci_device_id e1000_pci_tb
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_C), board_ich8lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_M), board_ich8lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_IGP_M_AMT), board_ich8lan },
+ { PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH8_82567V_3), board_ich8lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE), board_ich9lan },
{ PCI_VDEVICE(INTEL, E1000_DEV_ID_ICH9_IFE_G), board_ich9lan },
^ permalink raw reply [flat|nested] 432+ messages in thread
* [035/116] ixgbe: add support for 82599 KR device 0x1517
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (33 preceding siblings ...)
2010-03-30 22:55 ` [034/116] e1000e: enable new 82567V-3 device Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [036/116] Input: wacom - ensure the device is initialized properly upon resume Greg KH
` (80 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Don Skidmore,
Peter P Waskiewicz Jr, Jeff Kirsher, David S. Miller,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Don Skidmore <donald.c.skidmore@intel.com>
commit 74757d49016a8b06ca028196886641d7aeb78de5 upstream.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Acked-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@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/ixgbe/ixgbe_82599.c | 1 +
drivers/net/ixgbe/ixgbe_main.c | 2 ++
drivers/net/ixgbe/ixgbe_type.h | 1 +
3 files changed, 4 insertions(+)
--- a/drivers/net/ixgbe/ixgbe_82599.c
+++ b/drivers/net/ixgbe/ixgbe_82599.c
@@ -332,6 +332,7 @@ static enum ixgbe_media_type ixgbe_get_m
case IXGBE_DEV_ID_82599_KX4:
case IXGBE_DEV_ID_82599_KX4_MEZZ:
case IXGBE_DEV_ID_82599_COMBO_BACKPLANE:
+ case IXGBE_DEV_ID_82599_KR:
case IXGBE_DEV_ID_82599_XAUI_LOM:
/* Default device ID is mezzanine card KX/KX4 */
media_type = ixgbe_media_type_backplane;
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -96,6 +96,8 @@ static struct pci_device_id ixgbe_pci_tb
board_82599 },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_XAUI_LOM),
board_82599 },
+ {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_KR),
+ board_82599 },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_SFP),
board_82599 },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ),
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -50,6 +50,7 @@
#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4
#define IXGBE_DEV_ID_82599_KX4 0x10F7
#define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514
+#define IXGBE_DEV_ID_82599_KR 0x1517
#define IXGBE_DEV_ID_82599_CX4 0x10F9
#define IXGBE_DEV_ID_82599_SFP 0x10FB
#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC
^ permalink raw reply [flat|nested] 432+ messages in thread
* [036/116] Input: wacom - ensure the device is initialized properly upon resume
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (34 preceding siblings ...)
2010-03-30 22:55 ` [035/116] ixgbe: add support for 82599 KR device 0x1517 Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [037/116] ath9k: fix lockdep warning when unloading module Greg KH
` (79 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ping Cheng, Dmitry Torokhov,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ping Cheng <pingc@wacom.com>
commit 232f5693e5c9483e222528ef81979e42ea2f2908 upstream.
Call wacom_query_tablet_data() from wacom_resume() so the device will be
switched to Wacom mode upon resume. Devices that require this are: regular
tablets and two finger touch devices.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/input/tablet/wacom.h | 7 ++++---
drivers/input/tablet/wacom_sys.c | 7 ++++---
2 files changed, 8 insertions(+), 6 deletions(-)
--- a/drivers/input/tablet/wacom.h
+++ b/drivers/input/tablet/wacom.h
@@ -1,7 +1,7 @@
/*
* drivers/input/tablet/wacom.h
*
- * USB Wacom Graphire and Wacom Intuos tablet support
+ * USB Wacom tablet support
*
* Copyright (c) 2000-2004 Vojtech Pavlik <vojtech@ucw.cz>
* Copyright (c) 2000 Andreas Bach Aaen <abach@stofanet.dk>
@@ -69,6 +69,7 @@
* v1.49 (pc) - Added support for USB Tablet PC (0x90, 0x93, and 0x9A)
* v1.50 (pc) - Fixed a TabletPC touch bug in 2.6.28
* v1.51 (pc) - Added support for Intuos4
+ * v1.52 (pc) - Query Wacom data upon system resume
*/
/*
@@ -89,9 +90,9 @@
/*
* Version Information
*/
-#define DRIVER_VERSION "v1.51"
+#define DRIVER_VERSION "v1.52"
#define DRIVER_AUTHOR "Vojtech Pavlik <vojtech@ucw.cz>"
-#define DRIVER_DESC "USB Wacom Graphire and Wacom Intuos tablet driver"
+#define DRIVER_DESC "USB Wacom tablet driver"
#define DRIVER_LICENSE "GPL"
MODULE_AUTHOR(DRIVER_AUTHOR);
--- a/drivers/input/tablet/wacom_sys.c
+++ b/drivers/input/tablet/wacom_sys.c
@@ -1,7 +1,7 @@
/*
* drivers/input/tablet/wacom_sys.c
*
- * USB Wacom Graphire and Wacom Intuos tablet support - system specific code
+ * USB Wacom tablet support - system specific code
*/
/*
@@ -562,9 +562,10 @@ static int wacom_resume(struct usb_inter
int rv;
mutex_lock(&wacom->lock);
- if (wacom->open)
+ if (wacom->open) {
rv = usb_submit_urb(wacom->irq, GFP_NOIO);
- else
+ wacom_query_tablet_data(intf);
+ } else
rv = 0;
mutex_unlock(&wacom->lock);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [037/116] ath9k: fix lockdep warning when unloading module
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (35 preceding siblings ...)
2010-03-30 22:55 ` [036/116] Input: wacom - ensure the device is initialized properly upon resume Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [038/116] mqueue: fix mq_open() file descriptor leak on user-space processes Greg KH
` (78 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ming Lei, John W. Linville,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ming Lei <tom.leiming@gmail.com>
commit a9f042cbe5284f34ccff15f3084477e11b39b17b upstream.
Since txq->axq_lock may be hold in softirq context, it must be
acquired with spin_lock_bh() instead of spin_lock() if softieq is
enabled.
The patch fixes the lockdep warning below when unloading ath9k modules.
=================================
[ INFO: inconsistent lock state ]
2.6.33-wl #12
---------------------------------
inconsistent {IN-SOFTIRQ-W} -> {SOFTIRQ-ON-W} usage.
rmmod/3642 [HC0[0]:SC0[0]:HE1:SE1] takes:
(&(&txq->axq_lock)->rlock){+.?...}, at: [<ffffffffa03568c3>] ath_tx_node_cleanup+0x62/0x180 [ath9k]
{IN-SOFTIRQ-W} state was registered at:
[<ffffffff8107577d>] __lock_acquire+0x2f6/0xd35
[<ffffffff81076289>] lock_acquire+0xcd/0xf1
[<ffffffff813a7486>] _raw_spin_lock_bh+0x3b/0x6e
[<ffffffffa0356b49>] spin_lock_bh+0xe/0x10 [ath9k]
[<ffffffffa0358ec7>] ath_tx_tasklet+0xcd/0x391 [ath9k]
[<ffffffffa0354f5f>] ath9k_tasklet+0x70/0xc8 [ath9k]
[<ffffffff8104e601>] tasklet_action+0x8c/0xf4
[<ffffffff8104f459>] __do_softirq+0xf8/0x1cd
[<ffffffff8100ab1c>] call_softirq+0x1c/0x30
[<ffffffff8100c2cf>] do_softirq+0x4b/0xa3
[<ffffffff8104f045>] irq_exit+0x4a/0x8c
[<ffffffff813acccc>] do_IRQ+0xac/0xc3
[<ffffffff813a7d53>] ret_from_intr+0x0/0x16
[<ffffffff81302d52>] cpuidle_idle_call+0x9e/0xf8
[<ffffffff81008be7>] cpu_idle+0x62/0x9d
[<ffffffff81391c1a>] rest_init+0x7e/0x80
[<ffffffff818bbd38>] start_kernel+0x3e8/0x3f3
[<ffffffff818bb2bc>] x86_64_start_reservations+0xa7/0xab
[<ffffffff818bb3b8>] x86_64_start_kernel+0xf8/0x107
irq event stamp: 42037
hardirqs last enabled at (42037): [<ffffffff813a7b21>] _raw_spin_unlock_irqrestore+0x47/0x56
hardirqs last disabled at (42036): [<ffffffff813a72f4>] _raw_spin_lock_irqsave+0x2b/0x88
softirqs last enabled at (42000): [<ffffffffa0353ea6>] spin_unlock_bh+0xe/0x10 [ath9k]
softirqs last disabled at (41998): [<ffffffff813a7463>] _raw_spin_lock_bh+0x18/0x6e
other info that might help us debug this:
4 locks held by rmmod/3642:
#0: (rtnl_mutex){+.+.+.}, at: [<ffffffff8132c10d>] rtnl_lock+0x17/0x19
#1: (&wdev->mtx){+.+.+.}, at: [<ffffffffa01e53f2>] cfg80211_netdev_notifier_call+0x28d/0x46d [cfg80211]
#2: (&ifmgd->mtx){+.+.+.}, at: [<ffffffffa0260834>] ieee80211_mgd_deauth+0x3f/0x17e [mac80211]
#3: (&local->sta_mtx){+.+.+.}, at: [<ffffffffa025a381>] sta_info_destroy_addr+0x2b/0x5e [mac80211]
stack backtrace:
Pid: 3642, comm: rmmod Not tainted 2.6.33-wl #12
Call Trace:
[<ffffffff81074469>] valid_state+0x178/0x18b
[<ffffffff81014f94>] ? save_stack_trace+0x2f/0x4c
[<ffffffff81074e08>] ? check_usage_backwards+0x0/0x88
[<ffffffff8107458f>] mark_lock+0x113/0x230
[<ffffffff810757f1>] __lock_acquire+0x36a/0xd35
[<ffffffff8101018d>] ? native_sched_clock+0x2d/0x5f
[<ffffffffa03568c3>] ? ath_tx_node_cleanup+0x62/0x180 [ath9k]
[<ffffffff81076289>] lock_acquire+0xcd/0xf1
[<ffffffffa03568c3>] ? ath_tx_node_cleanup+0x62/0x180 [ath9k]
[<ffffffff810732eb>] ? trace_hardirqs_off+0xd/0xf
[<ffffffff813a7193>] _raw_spin_lock+0x36/0x69
[<ffffffffa03568c3>] ? ath_tx_node_cleanup+0x62/0x180 [ath9k]
[<ffffffffa03568c3>] ath_tx_node_cleanup+0x62/0x180 [ath9k]
[<ffffffff810749ed>] ? trace_hardirqs_on+0xd/0xf
[<ffffffffa0353950>] ath9k_sta_remove+0x22/0x26 [ath9k]
[<ffffffffa025a08f>] __sta_info_destroy+0x1ad/0x38c [mac80211]
[<ffffffffa025a394>] sta_info_destroy_addr+0x3e/0x5e [mac80211]
[<ffffffffa02605d6>] ieee80211_set_disassoc+0x175/0x180 [mac80211]
[<ffffffffa026084d>] ieee80211_mgd_deauth+0x58/0x17e [mac80211]
[<ffffffff813a60c1>] ? __mutex_lock_common+0x37f/0x3a4
[<ffffffffa01e53f2>] ? cfg80211_netdev_notifier_call+0x28d/0x46d [cfg80211]
[<ffffffffa026786e>] ieee80211_deauth+0x1e/0x20 [mac80211]
[<ffffffffa01f47f9>] __cfg80211_mlme_deauth+0x130/0x13f [cfg80211]
[<ffffffffa01e53f2>] ? cfg80211_netdev_notifier_call+0x28d/0x46d [cfg80211]
[<ffffffff810732eb>] ? trace_hardirqs_off+0xd/0xf
[<ffffffffa01f7eee>] __cfg80211_disconnect+0x111/0x189 [cfg80211]
[<ffffffffa01e5433>] cfg80211_netdev_notifier_call+0x2ce/0x46d [cfg80211]
[<ffffffff813aa9ea>] notifier_call_chain+0x37/0x63
[<ffffffff81068c98>] raw_notifier_call_chain+0x14/0x16
[<ffffffff81322e97>] call_netdevice_notifiers+0x1b/0x1d
[<ffffffff8132386d>] dev_close+0x6a/0xa6
[<ffffffff8132395f>] rollback_registered_many+0xb6/0x2f4
[<ffffffff81323bb8>] unregister_netdevice_many+0x1b/0x66
[<ffffffffa026494f>] ieee80211_remove_interfaces+0xc5/0xd0 [mac80211]
[<ffffffffa02580a2>] ieee80211_unregister_hw+0x47/0xe8 [mac80211]
[<ffffffffa035290e>] ath9k_deinit_device+0x7a/0x9b [ath9k]
[<ffffffffa035bc26>] ath_pci_remove+0x38/0x76 [ath9k]
[<ffffffff8120940a>] pci_device_remove+0x2d/0x51
[<ffffffff8129d797>] __device_release_driver+0x7b/0xd1
[<ffffffff8129d885>] driver_detach+0x98/0xbe
[<ffffffff8129ca7a>] bus_remove_driver+0x94/0xb7
[<ffffffff8129ddd6>] driver_unregister+0x6c/0x74
[<ffffffff812096d2>] pci_unregister_driver+0x46/0xad
[<ffffffffa035bae1>] ath_pci_exit+0x15/0x17 [ath9k]
[<ffffffffa035e1a2>] ath9k_exit+0xe/0x2f [ath9k]
[<ffffffff8108050a>] sys_delete_module+0x1c7/0x236
[<ffffffff813a7df5>] ? retint_swapgs+0x13/0x1b
[<ffffffff810749b5>] ? trace_hardirqs_on_caller+0x119/0x144
[<ffffffff8109b9f6>] ? audit_syscall_entry+0x11e/0x14a
[<ffffffff81009bb2>] system_call_fastpath+0x16/0x1b
wlan1: deauthenticating from 00:23:cd:e1:f9:b2 by local choice (reason=3)
PM: Removing info for No Bus:wlan1
cfg80211: Calling CRDA to update world regulatory domain
PM: Removing info for No Bus:rfkill2
PM: Removing info for No Bus:phy1
ath9k 0000:16:00.0: PCI INT A disabled
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/xmit.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2210,7 +2210,7 @@ void ath_tx_node_cleanup(struct ath_soft
if (ATH_TXQ_SETUP(sc, i)) {
txq = &sc->tx.txq[i];
- spin_lock(&txq->axq_lock);
+ spin_lock_bh(&txq->axq_lock);
list_for_each_entry_safe(ac,
ac_tmp, &txq->axq_acq, list) {
@@ -2231,7 +2231,7 @@ void ath_tx_node_cleanup(struct ath_soft
}
}
- spin_unlock(&txq->axq_lock);
+ spin_unlock_bh(&txq->axq_lock);
}
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [038/116] mqueue: fix mq_open() file descriptor leak on user-space processes
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (36 preceding siblings ...)
2010-03-30 22:55 ` [037/116] ath9k: fix lockdep warning when unloading module Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [039/116] virtio: fix out of range array access Greg KH
` (77 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan,
André Goddard Rosa, Al Viro, Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 967 bytes --]
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: André Goddard Rosa <andre.goddard@gmail.com>
commit 4294a8eedb17bbc45e1e7447c2a4d05332943248 upstream.
We leak fd on lookup_one_len() failure
Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
ipc/mqueue.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/ipc/mqueue.c
+++ b/ipc/mqueue.c
@@ -706,7 +706,7 @@ SYSCALL_DEFINE4(mq_open, const char __us
dentry = lookup_one_len(name, ipc_ns->mq_mnt->mnt_root, strlen(name));
if (IS_ERR(dentry)) {
error = PTR_ERR(dentry);
- goto out_err;
+ goto out_putfd;
}
mntget(ipc_ns->mq_mnt);
@@ -744,7 +744,6 @@ out:
mntput(ipc_ns->mq_mnt);
out_putfd:
put_unused_fd(fd);
-out_err:
fd = error;
out_upsem:
mutex_unlock(&ipc_ns->mq_mnt->mnt_root->d_inode->i_mutex);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [039/116] virtio: fix out of range array access
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (37 preceding siblings ...)
2010-03-30 22:55 ` [038/116] mqueue: fix mq_open() file descriptor leak on user-space processes Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [040/116] x86: set_personality_ia32() misses force_personality32 Greg KH
` (76 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Michael S. Tsirkin,
Anthony Liguori, Shirley Ma, Amit Shah, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael S. Tsirkin <mst@redhat.com>
commit 3119815912a220bdac943dfbdfee640414c0c611 upstream.
I have observed the following error on virtio-net module unload:
------------[ cut here ]------------
WARNING: at kernel/irq/manage.c:858 __free_irq+0xa0/0x14c()
Hardware name: Bochs
Trying to free already-free IRQ 0
Modules linked in: virtio_net(-) virtio_blk virtio_pci virtio_ring
virtio af_packet e1000 shpchp aacraid uhci_hcd ohci_hcd ehci_hcd [last
unloaded: scsi_wait_scan]
Pid: 1957, comm: rmmod Not tainted 2.6.33-rc8-vhost #24
Call Trace:
[<ffffffff8103e195>] warn_slowpath_common+0x7c/0x94
[<ffffffff8103e204>] warn_slowpath_fmt+0x41/0x43
[<ffffffff810a7a36>] ? __free_pages+0x5a/0x70
[<ffffffff8107cc00>] __free_irq+0xa0/0x14c
[<ffffffff8107cceb>] free_irq+0x3f/0x65
[<ffffffffa0081424>] vp_del_vqs+0x81/0xb1 [virtio_pci]
[<ffffffffa0091d29>] virtnet_remove+0xda/0x10b [virtio_net]
[<ffffffffa0075200>] virtio_dev_remove+0x22/0x4a [virtio]
[<ffffffff812709ee>] __device_release_driver+0x66/0xac
[<ffffffff81270ab7>] driver_detach+0x83/0xa9
[<ffffffff8126fc66>] bus_remove_driver+0x91/0xb4
[<ffffffff81270fcf>] driver_unregister+0x6c/0x74
[<ffffffffa0075418>] unregister_virtio_driver+0xe/0x10 [virtio]
[<ffffffffa0091c4d>] fini+0x15/0x17 [virtio_net]
[<ffffffff8106997b>] sys_delete_module+0x1c3/0x230
[<ffffffff81007465>] ? old_ich_force_enable_hpet+0x117/0x164
[<ffffffff813bb720>] ? do_page_fault+0x29c/0x2cc
[<ffffffff81028e58>] sysenter_dispatch+0x7/0x27
---[ end trace 15e88e4c576cc62b ]---
The bug is in virtio-pci: we use msix_vector as array index to get irq
entry, but some vqs do not have a dedicated vector so this causes an out
of bounds access. By chance, we seem to often get 0 value, which
results in this error.
Fix by verifying that vector is legal before using it as index.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Anthony Liguori <aliguori@us.ibm.com>
Acked-by: Shirley Ma <xma@us.ibm.com>
Acked-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/virtio/virtio_pci.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/virtio/virtio_pci.c
+++ b/drivers/virtio/virtio_pci.c
@@ -473,7 +473,8 @@ static void vp_del_vqs(struct virtio_dev
list_for_each_entry_safe(vq, n, &vdev->vqs, list) {
info = vq->priv;
- if (vp_dev->per_vq_vectors)
+ if (vp_dev->per_vq_vectors &&
+ info->msix_vector != VIRTIO_MSI_NO_VECTOR)
free_irq(vp_dev->msix_entries[info->msix_vector].vector,
vq);
vp_del_vq(vq);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [040/116] x86: set_personality_ia32() misses force_personality32
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (38 preceding siblings ...)
2010-03-30 22:55 ` [039/116] virtio: fix out of range array access Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [041/116] sched: Fix SCHED_MC regression caused by change in sched cpu_power Greg KH
` (75 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Oleg Nesterov,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Oleg Nesterov <oleg@redhat.com>
commit 1252f238db48ec419f40c1bdf30fda649860eed9 upstream.
05d43ed8a "x86: get rid of the insane TIF_ABI_PENDING bit" forgot about
force_personality32. Fix.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/process_64.c | 1 +
1 file changed, 1 insertion(+)
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -546,6 +546,7 @@ void set_personality_ia32(void)
/* Make sure to be in 32bit mode */
set_thread_flag(TIF_IA32);
+ current->personality |= force_personality32;
/* Prepare the first "return" to user space */
current_thread_info()->status |= TS_COMPAT;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [041/116] sched: Fix SCHED_MC regression caused by change in sched cpu_power
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (39 preceding siblings ...)
2010-03-30 22:55 ` [040/116] x86: set_personality_ia32() misses force_personality32 Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [042/116] readahead: add blk_run_backing_dev Greg KH
` (74 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable, Greg KH
Cc: stable-review, torvalds, akpm, alan, Ma Ling, Zhang, Yanmin,
Suresh Siddha, Ingo Molnar, Peter Zijlstra
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Suresh Siddha <suresh.b.siddha@intel.com>
commit dd5feea14a7de4edbd9f36db1a2db785de91b88d upstream
On platforms like dual socket quad-core platform, the scheduler load
balancer is not detecting the load imbalances in certain scenarios. This
is leading to scenarios like where one socket is completely busy (with
all the 4 cores running with 4 tasks) and leaving another socket
completely idle. This causes performance issues as those 4 tasks share
the memory controller, last-level cache bandwidth etc. Also we won't be
taking advantage of turbo-mode as much as we would like, etc.
Some of the comparisons in the scheduler load balancing code are
comparing the "weighted cpu load that is scaled wrt sched_group's
cpu_power" with the "weighted average load per task that is not scaled
wrt sched_group's cpu_power". While this has probably been broken for a
longer time (for multi socket numa nodes etc), the problem got aggrevated
via this recent change:
|
| commit f93e65c186ab3c05ce2068733ca10e34fd00125e
| Author: Peter Zijlstra <a.p.zijlstra@chello.nl>
| Date: Tue Sep 1 10:34:32 2009 +0200
|
| sched: Restore __cpu_power to a straight sum of power
|
Also with this change, the sched group cpu power alone no longer reflects
the group capacity that is needed to implement MC, MT performance
(default) and power-savings (user-selectable) policies.
We need to use the computed group capacity (sgs.group_capacity, that is
computed using the SD_PREFER_SIBLING logic in update_sd_lb_stats()) to
find out if the group with the max load is above its capacity and how
much load to move etc.
Reported-by: Ma Ling <ling.ma@intel.com>
Initial-Analysis-by: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
[ -v2: build fix ]
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1266970432.11588.22.camel@sbs-t61.sc.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
kernel/sched.c | 76 ++++++++++++++++++++++++++++++++-------------------------
1 file changed, 43 insertions(+), 33 deletions(-)
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -3402,6 +3402,7 @@ struct sd_lb_stats {
unsigned long max_load;
unsigned long busiest_load_per_task;
unsigned long busiest_nr_running;
+ unsigned long busiest_group_capacity;
int group_imb; /* Is there imbalance in this sd */
#if defined(CONFIG_SCHED_MC) || defined(CONFIG_SCHED_SMT)
@@ -3721,8 +3722,7 @@ static inline void update_sg_lb_stats(st
unsigned long load, max_cpu_load, min_cpu_load;
int i;
unsigned int balance_cpu = -1, first_idle_cpu = 0;
- unsigned long sum_avg_load_per_task;
- unsigned long avg_load_per_task;
+ unsigned long avg_load_per_task = 0;
if (local_group) {
balance_cpu = group_first_cpu(group);
@@ -3731,7 +3731,6 @@ static inline void update_sg_lb_stats(st
}
/* Tally up the load of all CPUs in the group */
- sum_avg_load_per_task = avg_load_per_task = 0;
max_cpu_load = 0;
min_cpu_load = ~0UL;
@@ -3761,7 +3760,6 @@ static inline void update_sg_lb_stats(st
sgs->sum_nr_running += rq->nr_running;
sgs->sum_weighted_load += weighted_cpuload(i);
- sum_avg_load_per_task += cpu_avg_load_per_task(i);
}
/*
@@ -3779,7 +3777,6 @@ static inline void update_sg_lb_stats(st
/* Adjust by relative CPU power of the group */
sgs->avg_load = (sgs->group_load * SCHED_LOAD_SCALE) / group->cpu_power;
-
/*
* Consider the group unbalanced when the imbalance is larger
* than the average weight of two tasks.
@@ -3789,8 +3786,8 @@ static inline void update_sg_lb_stats(st
* normalized nr_running number somewhere that negates
* the hierarchy?
*/
- avg_load_per_task = (sum_avg_load_per_task * SCHED_LOAD_SCALE) /
- group->cpu_power;
+ if (sgs->sum_nr_running)
+ avg_load_per_task = sgs->sum_weighted_load / sgs->sum_nr_running;
if ((max_cpu_load - min_cpu_load) > 2*avg_load_per_task)
sgs->group_imb = 1;
@@ -3859,6 +3856,7 @@ static inline void update_sd_lb_stats(st
sds->max_load = sgs.avg_load;
sds->busiest = group;
sds->busiest_nr_running = sgs.sum_nr_running;
+ sds->busiest_group_capacity = sgs.group_capacity;
sds->busiest_load_per_task = sgs.sum_weighted_load;
sds->group_imb = sgs.group_imb;
}
@@ -3881,6 +3879,7 @@ static inline void fix_small_imbalance(s
{
unsigned long tmp, pwr_now = 0, pwr_move = 0;
unsigned int imbn = 2;
+ unsigned long scaled_busy_load_per_task;
if (sds->this_nr_running) {
sds->this_load_per_task /= sds->this_nr_running;
@@ -3891,8 +3890,12 @@ static inline void fix_small_imbalance(s
sds->this_load_per_task =
cpu_avg_load_per_task(this_cpu);
- if (sds->max_load - sds->this_load + sds->busiest_load_per_task >=
- sds->busiest_load_per_task * imbn) {
+ scaled_busy_load_per_task = sds->busiest_load_per_task
+ * SCHED_LOAD_SCALE;
+ scaled_busy_load_per_task /= sds->busiest->cpu_power;
+
+ if (sds->max_load - sds->this_load + scaled_busy_load_per_task >=
+ (scaled_busy_load_per_task * imbn)) {
*imbalance = sds->busiest_load_per_task;
return;
}
@@ -3943,7 +3946,14 @@ static inline void fix_small_imbalance(s
static inline void calculate_imbalance(struct sd_lb_stats *sds, int this_cpu,
unsigned long *imbalance)
{
- unsigned long max_pull;
+ unsigned long max_pull, load_above_capacity = ~0UL;
+
+ sds->busiest_load_per_task /= sds->busiest_nr_running;
+ if (sds->group_imb) {
+ sds->busiest_load_per_task =
+ min(sds->busiest_load_per_task, sds->avg_load);
+ }
+
/*
* In the presence of smp nice balancing, certain scenarios can have
* max load less than avg load(as we skip the groups at or below
@@ -3954,9 +3964,29 @@ static inline void calculate_imbalance(s
return fix_small_imbalance(sds, this_cpu, imbalance);
}
- /* Don't want to pull so many tasks that a group would go idle */
- max_pull = min(sds->max_load - sds->avg_load,
- sds->max_load - sds->busiest_load_per_task);
+ if (!sds->group_imb) {
+ /*
+ * Don't want to pull so many tasks that a group would go idle.
+ */
+ load_above_capacity = (sds->busiest_nr_running -
+ sds->busiest_group_capacity);
+
+ load_above_capacity *= (SCHED_LOAD_SCALE * SCHED_LOAD_SCALE);
+
+ load_above_capacity /= sds->busiest->cpu_power;
+ }
+
+ /*
+ * We're trying to get all the cpus to the average_load, so we don't
+ * want to push ourselves above the average load, nor do we wish to
+ * reduce the max loaded cpu below the average load. At the same time,
+ * we also don't want to reduce the group load below the group capacity
+ * (so that we can implement power-savings policies etc). Thus we look
+ * for the minimum possible imbalance.
+ * Be careful of negative numbers as they'll appear as very large values
+ * with unsigned longs.
+ */
+ max_pull = min(sds->max_load - sds->avg_load, load_above_capacity);
/* How much load to actually move to equalise the imbalance */
*imbalance = min(max_pull * sds->busiest->cpu_power,
@@ -4024,7 +4054,6 @@ find_busiest_group(struct sched_domain *
* 4) This group is more busy than the avg busieness at this
* sched_domain.
* 5) The imbalance is within the specified limit.
- * 6) Any rebalance would lead to ping-pong
*/
if (balance && !(*balance))
goto ret;
@@ -4043,25 +4072,6 @@ find_busiest_group(struct sched_domain *
if (100 * sds.max_load <= sd->imbalance_pct * sds.this_load)
goto out_balanced;
- sds.busiest_load_per_task /= sds.busiest_nr_running;
- if (sds.group_imb)
- sds.busiest_load_per_task =
- min(sds.busiest_load_per_task, sds.avg_load);
-
- /*
- * We're trying to get all the cpus to the average_load, so we don't
- * want to push ourselves above the average load, nor do we wish to
- * reduce the max loaded cpu below the average load, as either of these
- * actions would just result in more rebalancing later, and ping-pong
- * tasks around. Thus we look for the minimum possible imbalance.
- * Negative imbalances (*we* are more loaded than anyone else) will
- * be counted as no imbalance for these purposes -- we can't fix that
- * by pulling tasks to us. Be careful of negative numbers as they'll
- * appear as very large values with unsigned longs.
- */
- if (sds.max_load <= sds.busiest_load_per_task)
- goto out_balanced;
-
/* Looks like there is an imbalance. Compute it */
calculate_imbalance(&sds, this_cpu, imbalance);
return sds.busiest;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [042/116] readahead: add blk_run_backing_dev
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (40 preceding siblings ...)
2010-03-30 22:55 ` [041/116] sched: Fix SCHED_MC regression caused by change in sched cpu_power Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [043/116] ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212 Greg KH
` (73 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Hisashi Hifumi, Wu Fengguang,
Jens Axboe, KOSAKI Motohiro, Bart Van Assche,
Vladislav Bolkhovitin, Randy Dunlap, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
commit 65a80b4c61f5b5f6eb0f5669c8fb120893bfb388 upstream.
I added blk_run_backing_dev on page_cache_async_readahead so readahead I/O
is unpluged to improve throughput on especially RAID environment.
The normal case is, if page N become uptodate at time T(N), then T(N) <=
T(N+1) holds. With RAID (and NFS to some degree), there is no strict
ordering, the data arrival time depends on runtime status of individual
disks, which breaks that formula. So in do_generic_file_read(), just
after submitting the async readahead IO request, the current page may well
be uptodate, so the page won't be locked, and the block device won't be
implicitly unplugged:
if (PageReadahead(page))
page_cache_async_readahead()
if (!PageUptodate(page))
goto page_not_up_to_date;
//...
page_not_up_to_date:
lock_page_killable(page);
Therefore explicit unplugging can help.
Following is the test result with dd.
#dd if=testdir/testfile of=/dev/null bs=16384
-2.6.30-rc6
1048576+0 records in
1048576+0 records out
17179869184 bytes (17 GB) copied, 224.182 seconds, 76.6 MB/s
-2.6.30-rc6-patched
1048576+0 records in
1048576+0 records out
17179869184 bytes (17 GB) copied, 206.465 seconds, 83.2 MB/s
(7Disks RAID-0 Array)
-2.6.30-rc6
1054976+0 records in
1054976+0 records out
17284726784 bytes (17 GB) copied, 212.233 seconds, 81.4 MB/s
-2.6.30-rc6-patched
1054976+0 records out
17284726784 bytes (17 GB) copied, 198.878 seconds, 86.9 MB/s
(7Disks RAID-5 Array)
The patch was found to improve performance with the SCST scsi target
driver. See
http://sourceforge.net/mailarchive/forum.php?thread_name=a0272b440906030714g67eabc5k8f847fb1e538cc62%40mail.gmail.com&forum_name=scst-devel
[akpm@linux-foundation.org: unbust comment layout]
[akpm@linux-foundation.org: "fix" CONFIG_BLOCK=n]
Signed-off-by: Hisashi Hifumi <hifumi.hisashi@oss.ntt.co.jp>
Acked-by: Wu Fengguang <fengguang.wu@intel.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Tested-by: Ronald <intercommit@gmail.com>
Cc: Bart Van Assche <bart.vanassche@gmail.com>
Cc: Vladislav Bolkhovitin <vst@vlnb.net>
Cc: Randy Dunlap <randy.dunlap@oracle.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>
---
mm/readahead.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
--- a/mm/readahead.c
+++ b/mm/readahead.c
@@ -553,5 +553,17 @@ page_cache_async_readahead(struct addres
/* do read-ahead */
ondemand_readahead(mapping, ra, filp, true, offset, req_size);
+
+#ifdef CONFIG_BLOCK
+ /*
+ * Normally the current page is !uptodate and lock_page() will be
+ * immediately called to implicitly unplug the device. However this
+ * is not always true for RAID conifgurations, where data arrives
+ * not strictly in their submission order. In this case we need to
+ * explicitly kick off the IO.
+ */
+ if (PageUptodate(page))
+ blk_run_backing_dev(mapping->backing_dev_info, NULL);
+#endif
}
EXPORT_SYMBOL_GPL(page_cache_async_readahead);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [043/116] ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (41 preceding siblings ...)
2010-03-30 22:55 ` [042/116] readahead: add blk_run_backing_dev Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [044/116] ALSA: hda - Disable MSI for Nvidia controller Greg KH
` (72 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit 572c0e3c73341755f3e7dfaaef6b26df12bd709c upstream.
BugLink: https://bugs.launchpad.net/bugs/538895
The OR has verified that both position_fix=1 and model=6stack-dig are
necessary to have capture function properly. (The existing 3stack-6ch
model quirk seems to be incorrect.)
Reported-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Tested-by: Reuben Bailey <reuben.e.bailey@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/hda_intel.c | 1 +
sound/pci/hda/patch_realtek.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2230,6 +2230,7 @@ static struct snd_pci_quirk position_fix
SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB),
+ SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB),
{}
};
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -8921,7 +8921,7 @@ static struct snd_pci_quirk alc882_cfg_t
SND_PCI_QUIRK(0x8086, 0x0022, "DX58SO", ALC889_INTEL),
SND_PCI_QUIRK(0x8086, 0x0021, "Intel IbexPeak", ALC889A_INTEL),
SND_PCI_QUIRK(0x8086, 0x3b56, "Intel IbexPeak", ALC889A_INTEL),
- SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC883_3ST_6ch),
+ SND_PCI_QUIRK(0x8086, 0xd601, "D102GGC", ALC882_6ST_DIG),
{}
};
^ permalink raw reply [flat|nested] 432+ messages in thread
* [044/116] ALSA: hda - Disable MSI for Nvidia controller
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (42 preceding siblings ...)
2010-03-30 22:55 ` [043/116] ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212 Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [045/116] ALSA: hda - Fix secondary ADC of ALC260 basic model Greg KH
` (71 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Takashi Iwai,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 80c43ed724797627d8f86855248c497a6161a214 upstream.
Judging from the member of enable_msi white-list, Nvidia controller
seems to cause troubles with MSI enabled, e.g. boot hang up or other
serious issue may come up. It's safer to disable MSI as default for
Nvidia controllers again for now.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/hda_intel.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2335,6 +2335,13 @@ static void __devinit check_msi(struct a
"hda_intel: msi for device %04x:%04x set to %d\n",
q->subvendor, q->subdevice, q->value);
chip->msi = q->value;
+ return;
+ }
+
+ /* NVidia chipsets seem to cause troubles with MSI */
+ if (chip->driver_type == AZX_DRIVER_NVIDIA) {
+ printk(KERN_INFO "hda_intel: Disable MSI for Nvidia chipset\n");
+ chip->msi = 0;
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [045/116] ALSA: hda - Fix secondary ADC of ALC260 basic model
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (43 preceding siblings ...)
2010-03-30 22:55 ` [044/116] ALSA: hda - Disable MSI for Nvidia controller Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [046/116] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki) Greg KH
` (70 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Takashi Iwai,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 9c4cc0bdede1c39bde60a0d5d9251aac71fbe719 upstream.
Fix adc_nids[] for ALC260 basic model to match with num_adc_nids.
Otherwise you get an invalid NID in the secondary "Input Source" mixer
element.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/patch_realtek.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6281,7 +6281,7 @@ static struct alc_config_preset alc260_p
.num_dacs = ARRAY_SIZE(alc260_dac_nids),
.dac_nids = alc260_dac_nids,
.num_adc_nids = ARRAY_SIZE(alc260_dual_adc_nids),
- .adc_nids = alc260_adc_nids,
+ .adc_nids = alc260_dual_adc_nids,
.num_channel_mode = ARRAY_SIZE(alc260_modes),
.channel_mode = alc260_modes,
.input_mux = &alc260_capture_source,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [046/116] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki)
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (44 preceding siblings ...)
2010-03-30 22:55 ` [045/116] ALSA: hda - Fix secondary ADC of ALC260 basic model Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [047/116] ALSA: cmipci: work around invalid PCM pointer Greg KH
` (69 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit 025f206c9e0f96cc41567b01c07fb852d8900da1 upstream.
BugLink: https://launchpad.net/bugs/420578
The OR has verified that his hardware distorts because of the 0 dB
offset not corresponding to the highest PCM level. Fix this by capping
said PCM level to 0 dB similarly to what we do for CX20549 (Venice).
Reported-by: Mike Pontillo <pontillo@gmail.com>
Tested-by: Mike Pontillo <pontillo@gmail.com>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/patch_conexant.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/sound/pci/hda/patch_conexant.c
+++ b/sound/pci/hda/patch_conexant.c
@@ -1581,6 +1581,21 @@ static int patch_cxt5047(struct hda_code
#endif
}
spec->vmaster_nid = 0x13;
+
+ switch (codec->subsystem_id >> 16) {
+ case 0x103c:
+ /* HP laptops have really bad sound over 0 dB on NID 0x10.
+ * Fix max PCM level to 0 dB (originally it has 0x1e steps
+ * with 0 dB offset 0x17)
+ */
+ snd_hda_override_amp_caps(codec, 0x10, HDA_INPUT,
+ (0x17 << AC_AMPCAP_OFFSET_SHIFT) |
+ (0x17 << AC_AMPCAP_NUM_STEPS_SHIFT) |
+ (0x05 << AC_AMPCAP_STEP_SIZE_SHIFT) |
+ (1 << AC_AMPCAP_MUTE_SHIFT));
+ break;
+ }
+
return 0;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [047/116] ALSA: cmipci: work around invalid PCM pointer
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (45 preceding siblings ...)
2010-03-30 22:55 ` [046/116] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki) Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [048/116] gigaset: correct clearing of at_state strings on RING Greg KH
` (68 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch,
Takashi Iwai, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit 1c583063a5c769fe2ec604752e383972c69e6d9b upstream.
When the CMI8738 FRAME2 register is read, the chip sometimes (probably
when wrapping around) returns an invalid value that would be outside the
programmed DMA buffer. This leads to an inconsistent PCM pointer that is
likely to result in an underrun.
To work around this, read the register multiple times until we get a
valid value; the error state seems to be very short-lived.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-and-tested-by: Matija Nalis <mnalis-alsadev@voyager.hr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/cmipci.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
--- a/sound/pci/cmipci.c
+++ b/sound/pci/cmipci.c
@@ -941,13 +941,21 @@ static snd_pcm_uframes_t snd_cmipci_pcm_
struct snd_pcm_substream *substream)
{
size_t ptr;
- unsigned int reg;
+ unsigned int reg, rem, tries;
+
if (!rec->running)
return 0;
#if 1 // this seems better..
reg = rec->ch ? CM_REG_CH1_FRAME2 : CM_REG_CH0_FRAME2;
- ptr = rec->dma_size - (snd_cmipci_read_w(cm, reg) + 1);
- ptr >>= rec->shift;
+ for (tries = 0; tries < 3; tries++) {
+ rem = snd_cmipci_read_w(cm, reg);
+ if (rem < rec->dma_size)
+ goto ok;
+ }
+ printk(KERN_ERR "cmipci: invalid PCM pointer: %#x\n", rem);
+ return SNDRV_PCM_POS_XRUN;
+ok:
+ ptr = (rec->dma_size - (rem + 1)) >> rec->shift;
#else
reg = rec->ch ? CM_REG_CH1_FRAME1 : CM_REG_CH0_FRAME1;
ptr = snd_cmipci_read(cm, reg) - rec->offset;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [048/116] gigaset: correct clearing of at_state strings on RING
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (46 preceding siblings ...)
2010-03-30 22:55 ` [047/116] ALSA: cmipci: work around invalid PCM pointer Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [049/116] gigaset: prune use of tty_buffer_request_room Greg KH
` (67 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tilman Schmidt, Karsten Keil,
David S. Miller, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
commit 3a0a3a6b92edf181f849ebd8417122392ba73a96 upstream.
In RING handling, clear the table of received parameter strings in
a loop like everywhere else, instead of by enumeration which had
already gotten out of sync.
Impact: minor bugfix
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/isdn/gigaset/ev-layer.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
--- a/drivers/isdn/gigaset/ev-layer.c
+++ b/drivers/isdn/gigaset/ev-layer.c
@@ -1243,14 +1243,10 @@ static void do_action(int action, struct
* note that bcs may be NULL if no B channel is free
*/
at_state2->ConState = 700;
- kfree(at_state2->str_var[STR_NMBR]);
- at_state2->str_var[STR_NMBR] = NULL;
- kfree(at_state2->str_var[STR_ZCPN]);
- at_state2->str_var[STR_ZCPN] = NULL;
- kfree(at_state2->str_var[STR_ZBC]);
- at_state2->str_var[STR_ZBC] = NULL;
- kfree(at_state2->str_var[STR_ZHLC]);
- at_state2->str_var[STR_ZHLC] = NULL;
+ for (i = 0; i < STR_NUM; ++i) {
+ kfree(at_state2->str_var[i]);
+ at_state2->str_var[i] = NULL;
+ }
at_state2->int_var[VAR_ZCTP] = -1;
spin_lock_irqsave(&cs->lock, flags);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [049/116] gigaset: prune use of tty_buffer_request_room
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (47 preceding siblings ...)
2010-03-30 22:55 ` [048/116] gigaset: correct clearing of at_state strings on RING Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [050/116] perf: Make the install relative to DESTDIR if specified Greg KH
` (66 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tilman Schmidt, Karsten Keil,
David S. Miller, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tilman Schmidt <tilman@imap.cc>
commit 873a69a358a6b393fd8d9d92e193ec8895cac4d7 upstream.
Calling tty_buffer_request_room() before tty_insert_flip_string()
is unnecessary, costs CPU and for big buffers can mess up the
multi-page allocation avoidance.
Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Acked-by: Karsten Keil <keil@b1-systems.de>
CC: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/isdn/gigaset/interface.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/isdn/gigaset/interface.c
+++ b/drivers/isdn/gigaset/interface.c
@@ -635,7 +635,6 @@ void gigaset_if_receive(struct cardstate
if ((tty = cs->tty) == NULL)
gig_dbg(DEBUG_ANY, "receive on closed device");
else {
- tty_buffer_request_room(tty, len);
tty_insert_flip_string(tty, buffer, len);
tty_flip_buffer_push(tty);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [050/116] perf: Make the install relative to DESTDIR if specified
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (48 preceding siblings ...)
2010-03-30 22:55 ` [049/116] gigaset: prune use of tty_buffer_request_room Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [051/116] perf_event: Fix oops triggered by cpu offline/online Greg KH
` (65 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, John Kacur, Peter Zijlstra,
Paul Mackerras, Arnaldo Carvalho de Melo, Frederic Weisbecker,
Tom Zanussi, Kyle McMartin, Ingo Molnar, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: John Kacur <jkacur@redhat.com>
commit 7ae5f21361fea11f58c398701da635f778635d13 upstream.
Without this change, the install path is relative to
prefix/DESTDIR where prefix is automatically set to $HOME.
This can produce unexpected results. For example:
make -C tools/perf DESTDIR=/home/jkacur/tmp install-man
creates the directory: /home/jkacur/home/jkacur/tmp/share/...
instead of the expected: /home/jkacur/tmp/share/...
Signed-off-by: John Kacur <jkacur@redhat.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Tom Zanussi <tzanussi@gmail.com>
Cc: Kyle McMartin <kyle@redhat.com>
LKML-Reference: <1268312220-12880-1-git-send-email-jkacur@redhat.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
tools/perf/Documentation/Makefile | 4 +++-
tools/perf/Makefile | 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
--- a/tools/perf/Documentation/Makefile
+++ b/tools/perf/Documentation/Makefile
@@ -24,7 +24,10 @@ DOC_MAN1=$(patsubst %.txt,%.1,$(MAN1_TXT
DOC_MAN5=$(patsubst %.txt,%.5,$(MAN5_TXT))
DOC_MAN7=$(patsubst %.txt,%.7,$(MAN7_TXT))
+# Make the path relative to DESTDIR, not prefix
+ifndef DESTDIR
prefix?=$(HOME)
+endif
bindir?=$(prefix)/bin
htmldir?=$(prefix)/share/doc/perf-doc
pdfdir?=$(prefix)/share/doc/perf-doc
@@ -32,7 +35,6 @@ mandir?=$(prefix)/share/man
man1dir=$(mandir)/man1
man5dir=$(mandir)/man5
man7dir=$(mandir)/man7
-# DESTDIR=
ASCIIDOC=asciidoc
ASCIIDOC_EXTRA = --unsafe
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -218,7 +218,10 @@ STRIP ?= strip
# runtime figures out where they are based on the path to the executable.
# This can help installing the suite in a relocatable way.
+# Make the path relative to DESTDIR, not to prefix
+ifndef DESTDIR
prefix = $(HOME)
+endif
bindir_relative = bin
bindir = $(prefix)/$(bindir_relative)
mandir = share/man
@@ -235,7 +238,6 @@ sysconfdir = $(prefix)/etc
ETC_PERFCONFIG = etc/perfconfig
endif
lib = lib
-# DESTDIR=
export prefix bindir sharedir sysconfdir
^ permalink raw reply [flat|nested] 432+ messages in thread
* [051/116] perf_event: Fix oops triggered by cpu offline/online
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (49 preceding siblings ...)
2010-03-30 22:55 ` [050/116] perf: Make the install relative to DESTDIR if specified Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [052/116] tmpfs: fix oops on mounts with mpol=default Greg KH
` (64 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Paul Mackerras,
Peter Zijlstra, Ingo Molnar, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Paul Mackerras <paulus@samba.org>
commit 220b140b52ab6cc133f674a7ffec8fa792054f25 upstream.
Anton Blanchard found that he could reliably make the kernel hit a
BUG_ON in the slab allocator by taking a cpu offline and then online
while a system-wide perf record session was running.
The reason is that when the cpu comes up, we completely reinitialize
the ctx field of the struct perf_cpu_context for the cpu. If there is
a system-wide perf record session running, then there will be a struct
perf_event that has a reference to the context, so its refcount will
be 2. (The perf_event has been removed from the context's group_entry
and event_entry lists by perf_event_exit_cpu(), but that doesn't
remove the perf_event's reference to the context and doesn't decrement
the context's refcount.)
When the cpu comes up, perf_event_init_cpu() gets called, and it calls
__perf_event_init_context() on the cpu's context. That resets the
refcount to 1. Then when the perf record session finishes and the
perf_event is closed, the refcount gets decremented to 0 and the
context gets kfreed after an RCU grace period. Since the context
wasn't kmalloced -- it's part of a per-cpu variable -- bad things
happen.
In fact we don't need to completely reinitialize the context when the
cpu comes up. It's sufficient to initialize the context once at boot,
but we need to do it for all possible cpus.
This moves the context initialization to happen at boot time. With
this, we don't trash the refcount and the context never gets kfreed,
and we don't hit the BUG_ON.
Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Tested-by: Anton Blanchard <anton@samba.org>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/perf_event.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
--- a/kernel/perf_event.c
+++ b/kernel/perf_event.c
@@ -4981,12 +4981,22 @@ int perf_event_init_task(struct task_str
return ret;
}
+static void __init perf_event_init_all_cpus(void)
+{
+ int cpu;
+ struct perf_cpu_context *cpuctx;
+
+ for_each_possible_cpu(cpu) {
+ cpuctx = &per_cpu(perf_cpu_context, cpu);
+ __perf_event_init_context(&cpuctx->ctx, NULL);
+ }
+}
+
static void __cpuinit perf_event_init_cpu(int cpu)
{
struct perf_cpu_context *cpuctx;
cpuctx = &per_cpu(perf_cpu_context, cpu);
- __perf_event_init_context(&cpuctx->ctx, NULL);
spin_lock(&perf_resource_lock);
cpuctx->max_pertask = perf_max_events - perf_reserved_percpu;
@@ -5057,6 +5067,7 @@ static struct notifier_block __cpuinitda
void __init perf_event_init(void)
{
+ perf_event_init_all_cpus();
perf_cpu_notify(&perf_cpu_nb, (unsigned long)CPU_UP_PREPARE,
(void *)(long)smp_processor_id());
perf_cpu_notify(&perf_cpu_nb, (unsigned long)CPU_ONLINE,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [052/116] tmpfs: fix oops on mounts with mpol=default
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (50 preceding siblings ...)
2010-03-30 22:55 ` [051/116] perf_event: Fix oops triggered by cpu offline/online Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [053/116] tmpfs: mpol=bind:0 dont cause mount error Greg KH
` (63 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ravikiran Thirumalai,
KOSAKI Motohiro, Christoph Lameter, Mel Gorman, Lee Schermerhorn,
Hugh Dickins, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ravikiran G Thirumalai <kiran@scalex86.org>
commit 413b43deab8377819aba1dbad2abf0c15d59b491 upstream.
Fix an 'oops' when a tmpfs mount point is mounted with the mpol=default
mempolicy.
Upon remounting a tmpfs mount point with 'mpol=default' option, the mount
code crashed with a null pointer dereference. The initial problem report
was on 2.6.27, but the problem exists in mainline 2.6.34-rc as well. On
examining the code, we see that mpol_new returns NULL if default mempolicy
was requested. This 'NULL' mempolicy is accessed to store the node mask
resulting in oops.
The following patch fixes it.
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2142,10 +2142,15 @@ int mpol_parse_str(char *str, struct mem
goto out;
mode = MPOL_PREFERRED;
break;
-
+ case MPOL_DEFAULT:
+ /*
+ * Insist on a empty nodelist
+ */
+ if (!nodelist)
+ err = 0;
+ goto out;
/*
* case MPOL_BIND: mpol_new() enforces non-empty nodemask.
- * case MPOL_DEFAULT: mpol_new() enforces empty nodemask, ignores flags.
*/
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [053/116] tmpfs: mpol=bind:0 dont cause mount error.
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (51 preceding siblings ...)
2010-03-30 22:55 ` [052/116] tmpfs: fix oops on mounts with mpol=default Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [054/116] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
` (62 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit d69b2e63e9172afb4d07c305601b79a55509ac4c upstream.
Currently, following mount operation cause mount error.
% mount -t tmpfs -ompol=bind:0 none /tmp
Because commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) corrupted MPOL_BIND parse code.
This patch restore the needed one.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2149,9 +2149,13 @@ int mpol_parse_str(char *str, struct mem
if (!nodelist)
err = 0;
goto out;
- /*
- * case MPOL_BIND: mpol_new() enforces non-empty nodemask.
- */
+ case MPOL_BIND:
+ /*
+ * Insist on a nodelist
+ */
+ if (!nodelist)
+ goto out;
+ err = 0;
}
mode_flags = 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [054/116] tmpfs: handle MPOL_LOCAL mount option properly
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (52 preceding siblings ...)
2010-03-30 22:55 ` [053/116] tmpfs: mpol=bind:0 dont cause mount error Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [055/116] tmpfs: cleanup mpol_parse_str() Greg KH
` (61 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 12821f5fb942e795f8009ece14bde868893bd811 upstream.
commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) added mpol=local mount option. but its feature is broken
since it was born. because such code always return 1 (i.e. mount
failure).
This patch fixes it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 1 +
1 file changed, 1 insertion(+)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2141,6 +2141,7 @@ int mpol_parse_str(char *str, struct mem
if (nodelist)
goto out;
mode = MPOL_PREFERRED;
+ err = 0;
break;
case MPOL_DEFAULT:
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [055/116] tmpfs: cleanup mpol_parse_str()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (53 preceding siblings ...)
2010-03-30 22:55 ` [054/116] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [056/116] doc: add the documentation for mpol=local Greg KH
` (60 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 926f2ae04f183098cf9a30521776fb2759c8afeb upstream.
mpol_parse_str() made lots 'err' variable related bug. Because it is ugly
and reviewing unfriendly.
This patch simplifies it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2122,8 +2122,8 @@ int mpol_parse_str(char *str, struct mem
char *rest = nodelist;
while (isdigit(*rest))
rest++;
- if (!*rest)
- err = 0;
+ if (*rest)
+ goto out;
}
break;
case MPOL_INTERLEAVE:
@@ -2132,7 +2132,6 @@ int mpol_parse_str(char *str, struct mem
*/
if (!nodelist)
nodes = node_states[N_HIGH_MEMORY];
- err = 0;
break;
case MPOL_LOCAL:
/*
@@ -2141,7 +2140,6 @@ int mpol_parse_str(char *str, struct mem
if (nodelist)
goto out;
mode = MPOL_PREFERRED;
- err = 0;
break;
case MPOL_DEFAULT:
/*
@@ -2156,7 +2154,6 @@ int mpol_parse_str(char *str, struct mem
*/
if (!nodelist)
goto out;
- err = 0;
}
mode_flags = 0;
@@ -2170,13 +2167,14 @@ int mpol_parse_str(char *str, struct mem
else if (!strcmp(flags, "relative"))
mode_flags |= MPOL_F_RELATIVE_NODES;
else
- err = 1;
+ goto out;
}
new = mpol_new(mode, mode_flags, &nodes);
if (IS_ERR(new))
- err = 1;
- else {
+ goto out;
+
+ {
int ret;
NODEMASK_SCRATCH(scratch);
if (scratch) {
@@ -2187,13 +2185,15 @@ int mpol_parse_str(char *str, struct mem
ret = -ENOMEM;
NODEMASK_SCRATCH_FREE(scratch);
if (ret) {
- err = 1;
mpol_put(new);
- } else if (no_context) {
- /* save for contextualization */
- new->w.user_nodemask = nodes;
+ goto out;
}
}
+ err = 0;
+ if (no_context) {
+ /* save for contextualization */
+ new->w.user_nodemask = nodes;
+ }
out:
/* Restore string for error message */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [056/116] doc: add the documentation for mpol=local
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (54 preceding siblings ...)
2010-03-30 22:55 ` [055/116] tmpfs: cleanup mpol_parse_str() Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [057/116] SCSI: scsi_transport_fc: Fix synchronization issue while deleting vport Greg KH
` (59 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 5574169613b40b85d6f4c67208fa4846b897a0a1 upstream.
commit 3f226aa1c (mempolicy: support mpol=local tmpfs mount option) added
new mpol=local mount option. but it didn't add a documentation.
This patch does it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
Documentation/filesystems/tmpfs.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/Documentation/filesystems/tmpfs.txt
+++ b/Documentation/filesystems/tmpfs.txt
@@ -82,11 +82,13 @@ tmpfs has a mount option to set the NUMA
all files in that instance (if CONFIG_NUMA is enabled) - which can be
adjusted on the fly via 'mount -o remount ...'
-mpol=default prefers to allocate memory from the local node
+mpol=default use the process allocation policy
+ (see set_mempolicy(2))
mpol=prefer:Node prefers to allocate memory from the given Node
mpol=bind:NodeList allocates memory only from nodes in NodeList
mpol=interleave prefers to allocate from each node in turn
mpol=interleave:NodeList allocates from each node of NodeList in turn
+mpol=local prefers to allocate memory from the local node
NodeList format is a comma-separated list of decimal numbers and ranges,
a range being two hyphen-separated decimal numbers, the smallest and
@@ -134,3 +136,5 @@ Author:
Christoph Rohland <cr@sap.com>, 1.12.01
Updated:
Hugh Dickins, 4 June 2007
+Updated:
+ KOSAKI Motohiro, 16 Mar 2010
^ permalink raw reply [flat|nested] 432+ messages in thread
* [057/116] SCSI: scsi_transport_fc: Fix synchronization issue while deleting vport
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (55 preceding siblings ...)
2010-03-30 22:55 ` [056/116] doc: add the documentation for mpol=local Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [058/116] NFSv4: Dont ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode() Greg KH
` (58 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Gal Rosen, James Smart,
James Bottomley, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Gal Rosen <galr@storwize.com>
commit 0d9dc7c8b9b7fa0f53647423b41056ee1beed735 upstream.
The issue occur while deleting 60 virtual ports through the sys
interface /sys/class/fc_vports/vport-X/vport_delete. It happen while in
a mistake each request sent twice for the same vport. This interface is
asynchronous, entering the delete request into a work queue, allowing
more than one request to enter to the delete work queue. The result is a
NULL pointer. The first request already delete the vport, while the
second request got a pointer to the vport before the device destroyed.
Re-create vport later cause system freeze.
Solution: Check vport flags before entering the request to the work queue.
[jejb: fixed int<->long problem on spinlock flags variable]
Signed-off-by: Gal Rosen <galr@storwize.com>
Acked-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/scsi/scsi_transport_fc.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
--- a/drivers/scsi/scsi_transport_fc.c
+++ b/drivers/scsi/scsi_transport_fc.c
@@ -1215,6 +1215,15 @@ store_fc_vport_delete(struct device *dev
{
struct fc_vport *vport = transport_class_to_vport(dev);
struct Scsi_Host *shost = vport_to_shost(vport);
+ unsigned long flags;
+
+ spin_lock_irqsave(shost->host_lock, flags);
+ if (vport->flags & (FC_VPORT_DEL | FC_VPORT_CREATING)) {
+ spin_unlock_irqrestore(shost->host_lock, flags);
+ return -EBUSY;
+ }
+ vport->flags |= FC_VPORT_DELETING;
+ spin_unlock_irqrestore(shost->host_lock, flags);
fc_queue_work(shost, &vport->vport_delete_work);
return count;
@@ -1804,6 +1813,9 @@ store_fc_host_vport_delete(struct device
list_for_each_entry(vport, &fc_host->vports, peers) {
if ((vport->channel == 0) &&
(vport->port_name == wwpn) && (vport->node_name == wwnn)) {
+ if (vport->flags & (FC_VPORT_DEL | FC_VPORT_CREATING))
+ break;
+ vport->flags |= FC_VPORT_DELETING;
match = 1;
break;
}
@@ -3328,18 +3340,6 @@ fc_vport_terminate(struct fc_vport *vpor
unsigned long flags;
int stat;
- spin_lock_irqsave(shost->host_lock, flags);
- if (vport->flags & FC_VPORT_CREATING) {
- spin_unlock_irqrestore(shost->host_lock, flags);
- return -EBUSY;
- }
- if (vport->flags & (FC_VPORT_DEL)) {
- spin_unlock_irqrestore(shost->host_lock, flags);
- return -EALREADY;
- }
- vport->flags |= FC_VPORT_DELETING;
- spin_unlock_irqrestore(shost->host_lock, flags);
-
if (i->f->vport_delete)
stat = i->f->vport_delete(vport);
else
^ permalink raw reply [flat|nested] 432+ messages in thread
* [058/116] NFSv4: Dont ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (56 preceding siblings ...)
2010-03-30 22:55 ` [057/116] SCSI: scsi_transport_fc: Fix synchronization issue while deleting vport Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [059/116] NFS: Avoid a deadlock in nfs_release_page Greg KH
` (57 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Trond Myklebust,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit b4d2314bb88b07e5a04e6c75b442a1dfcd60e340 upstream.
If the NFS_INO_REVAL_FORCED flag is set, that means that we don't yet have
an up to date attribute cache. Even if we hold a delegation, we must
put a GETATTR on the wire.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nfs/delegation.h | 6 ++++++
fs/nfs/dir.c | 2 +-
fs/nfs/inode.c | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
--- a/fs/nfs/delegation.h
+++ b/fs/nfs/delegation.h
@@ -68,4 +68,10 @@ static inline int nfs_inode_return_deleg
}
#endif
+static inline int nfs_have_delegated_attributes(struct inode *inode)
+{
+ return nfs_have_delegation(inode, FMODE_READ) &&
+ !(NFS_I(inode)->cache_validity & NFS_INO_REVAL_FORCED);
+}
+
#endif
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1797,7 +1797,7 @@ static int nfs_access_get_cached(struct
cache = nfs_access_search_rbtree(inode, cred);
if (cache == NULL)
goto out;
- if (!nfs_have_delegation(inode, FMODE_READ) &&
+ if (!nfs_have_delegated_attributes(inode) &&
!time_in_range_open(jiffies, cache->jiffies, cache->jiffies + nfsi->attrtimeo))
goto out_stale;
res->jiffies = cache->jiffies;
--- a/fs/nfs/inode.c
+++ b/fs/nfs/inode.c
@@ -759,7 +759,7 @@ int nfs_attribute_timeout(struct inode *
{
struct nfs_inode *nfsi = NFS_I(inode);
- if (nfs_have_delegation(inode, FMODE_READ))
+ if (nfs_have_delegated_attributes(inode))
return 0;
return !time_in_range_open(jiffies, nfsi->read_cache_jiffies, nfsi->read_cache_jiffies + nfsi->attrtimeo);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [059/116] NFS: Avoid a deadlock in nfs_release_page
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (57 preceding siblings ...)
2010-03-30 22:55 ` [058/116] NFSv4: Dont ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode() Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [060/116] NFS: Prevent another deadlock in nfs_release_page() Greg KH
` (56 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Trond Myklebust,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit bb6fbc4548b9ae7ebbd06ef72f00229df259d217 upstream.
J.R. Okajima reports the following deadlock:
INFO: task kswapd0:305 blocked for more than 120 seconds.
"echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
kswapd0 D 0000000000000001 0 305 2 0x00000000
ffff88001f21d4f0 0000000000000046 ffff88001fdea680 ffff88001f21c000
ffff88001f21dfd8 ffff88001f21c000 ffff88001f21dfd8 ffff88001f21dfd8
ffff88001fdea040 0000000000014c00 0000000000000001 ffff88001fdea040
Call Trace:
[<ffffffff8146155d>] io_schedule+0x4d/0x70
[<ffffffff810d2be5>] sync_page+0x65/0xa0
[<ffffffff81461b12>] __wait_on_bit_lock+0x52/0xb0
[<ffffffff810d2b80>] ? sync_page+0x0/0xa0
[<ffffffff810d2b64>] __lock_page+0x64/0x70
[<ffffffff81070ce0>] ? wake_bit_function+0x0/0x40
[<ffffffff810df1d4>] truncate_inode_pages_range+0x344/0x4a0
[<ffffffff810df340>] truncate_inode_pages+0x10/0x20
[<ffffffff8112cbfe>] generic_delete_inode+0x15e/0x190
[<ffffffff8112cc8d>] generic_drop_inode+0x5d/0x80
[<ffffffff8112bb88>] iput+0x78/0x80
[<ffffffff811bc908>] nfs_dentry_iput+0x38/0x50
[<ffffffff811285f4>] dentry_iput+0x84/0x110
[<ffffffff811286ae>] d_kill+0x2e/0x60
[<ffffffff8112912a>] dput+0x7a/0x170
[<ffffffff8111e925>] path_put+0x15/0x40
[<ffffffff811c3a44>] __put_nfs_open_context+0xa4/0xb0
[<ffffffff811cb5d0>] ? nfs_free_request+0x0/0x50
[<ffffffff811c3b0b>] put_nfs_open_context+0xb/0x10
[<ffffffff811cb5f9>] nfs_free_request+0x29/0x50
[<ffffffff81234b7e>] kref_put+0x8e/0xe0
[<ffffffff811cb594>] nfs_release_request+0x14/0x20
[<ffffffff811cf769>] nfs_find_and_lock_request+0x89/0xa0
[<ffffffff811d1180>] nfs_wb_page+0x80/0x110
[<ffffffff811c0770>] nfs_release_page+0x70/0x90
[<ffffffff810d18ee>] try_to_release_page+0x5e/0x80
[<ffffffff810e1178>] shrink_page_list+0x638/0x860
[<ffffffff810e19de>] shrink_zone+0x63e/0xc40
We can fix this by making the call to put_nfs_open_context() happen when we
actually remove the write request from the inode (which is done by the
nfsiod thread in this case).
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nfs/pagelist.c | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
--- a/fs/nfs/pagelist.c
+++ b/fs/nfs/pagelist.c
@@ -112,12 +112,10 @@ void nfs_unlock_request(struct nfs_page
*/
int nfs_set_page_tag_locked(struct nfs_page *req)
{
- struct nfs_inode *nfsi = NFS_I(req->wb_context->path.dentry->d_inode);
-
if (!nfs_lock_request_dontget(req))
return 0;
if (req->wb_page != NULL)
- radix_tree_tag_set(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
+ radix_tree_tag_set(&NFS_I(req->wb_context->path.dentry->d_inode)->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
return 1;
}
@@ -126,10 +124,10 @@ int nfs_set_page_tag_locked(struct nfs_p
*/
void nfs_clear_page_tag_locked(struct nfs_page *req)
{
- struct inode *inode = req->wb_context->path.dentry->d_inode;
- struct nfs_inode *nfsi = NFS_I(inode);
-
if (req->wb_page != NULL) {
+ struct inode *inode = req->wb_context->path.dentry->d_inode;
+ struct nfs_inode *nfsi = NFS_I(inode);
+
spin_lock(&inode->i_lock);
radix_tree_tag_clear(&nfsi->nfs_page_tree, req->wb_index, NFS_PAGE_TAG_LOCKED);
nfs_unlock_request(req);
@@ -142,16 +140,22 @@ void nfs_clear_page_tag_locked(struct nf
* nfs_clear_request - Free up all resources allocated to the request
* @req:
*
- * Release page resources associated with a write request after it
- * has completed.
+ * Release page and open context resources associated with a read/write
+ * request after it has completed.
*/
void nfs_clear_request(struct nfs_page *req)
{
struct page *page = req->wb_page;
+ struct nfs_open_context *ctx = req->wb_context;
+
if (page != NULL) {
page_cache_release(page);
req->wb_page = NULL;
}
+ if (ctx != NULL) {
+ put_nfs_open_context(ctx);
+ req->wb_context = NULL;
+ }
}
@@ -165,9 +169,8 @@ static void nfs_free_request(struct kref
{
struct nfs_page *req = container_of(kref, struct nfs_page, wb_kref);
- /* Release struct file or cached credential */
+ /* Release struct file and open context */
nfs_clear_request(req);
- put_nfs_open_context(req->wb_context);
nfs_page_free(req);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [060/116] NFS: Prevent another deadlock in nfs_release_page()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (58 preceding siblings ...)
2010-03-30 22:55 ` [059/116] NFS: Avoid a deadlock in nfs_release_page Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [061/116] tty: Keep the default buffering to sub-page units Greg KH
` (55 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Trond Myklebust,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit d812e575822a2b7ab1a7cadae2571505ec6ec2bd upstream.
We should not attempt to free the page if __GFP_FS is not set. Otherwise we
can deadlock as per
http://bugzilla.kernel.org/show_bug.cgi?id=15578
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nfs/file.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -486,7 +486,8 @@ static int nfs_release_page(struct page
{
dfprintk(PAGECACHE, "NFS: release_page(%p)\n", page);
- if (gfp & __GFP_WAIT)
+ /* Only do I/O if gfp is a superset of GFP_KERNEL */
+ if ((gfp & GFP_KERNEL) == GFP_KERNEL)
nfs_wb_page(page->mapping->host, page);
/* If PagePrivate() is set, then the page is not freeable */
if (PagePrivate(page))
^ permalink raw reply [flat|nested] 432+ messages in thread
* [061/116] tty: Keep the default buffering to sub-page units
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (59 preceding siblings ...)
2010-03-30 22:55 ` [060/116] NFS: Prevent another deadlock in nfs_release_page() Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [062/116] tty: Take a 256 byte padding into account when buffering below " Greg KH
` (54 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Cox, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Cox <alan@linux.intel.com>
commit d9661adfb8e53a7647360140af3b92284cbe52d4 upstream.
We allocate during interrupts so while our buffering is normally diced up
small anyway on some hardware at speed we can pressure the VM excessively
for page pairs. We don't really need big buffers to be linear so don't try
so hard.
In order to make this work well we will tidy up excess callers to request_room,
which cannot itself enforce this break up.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/tty_buffer.c | 6 ++++--
include/linux/tty.h | 10 ++++++++++
2 files changed, 14 insertions(+), 2 deletions(-)
--- a/drivers/char/tty_buffer.c
+++ b/drivers/char/tty_buffer.c
@@ -247,7 +247,8 @@ int tty_insert_flip_string(struct tty_st
{
int copied = 0;
do {
- int space = tty_buffer_request_room(tty, size - copied);
+ int goal = min(size - copied, TTY_BUFFER_PAGE);
+ int space = tty_buffer_request_room(tty, goal);
struct tty_buffer *tb = tty->buf.tail;
/* If there is no space then tb may be NULL */
if (unlikely(space == 0))
@@ -283,7 +284,8 @@ int tty_insert_flip_string_flags(struct
{
int copied = 0;
do {
- int space = tty_buffer_request_room(tty, size - copied);
+ int goal = min(size - copied, TTY_BUFFER_PAGE);
+ int space = tty_buffer_request_room(tty, goal);
struct tty_buffer *tb = tty->buf.tail;
/* If there is no space then tb may be NULL */
if (unlikely(space == 0))
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -68,6 +68,16 @@ struct tty_buffer {
unsigned long data[0];
};
+/*
+ * We default to dicing tty buffer allocations to this many characters
+ * in order to avoid multiple page allocations. We assume tty_buffer itself
+ * is under 256 bytes. See tty_buffer_find for the allocation logic this
+ * must match
+ */
+
+#define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2)
+
+
struct tty_bufhead {
struct delayed_work work;
spinlock_t lock;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [062/116] tty: Take a 256 byte padding into account when buffering below sub-page units
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (60 preceding siblings ...)
2010-03-30 22:55 ` [061/116] tty: Keep the default buffering to sub-page units Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [063/116] USB: fix usbfs regression Greg KH
` (53 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mel Gorman,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mel Gorman <mel@csn.ul.ie>
commit 352fa6ad16b89f8ffd1a93b4419b1a8f2259feab upstream.
The TTY layer takes some care to ensure that only sub-page allocations
are made with interrupts disabled. It does this by setting a goal of
"TTY_BUFFER_PAGE" to allocate. Unfortunately, while TTY_BUFFER_PAGE takes the
size of tty_buffer into account, it fails to account that tty_buffer_find()
rounds the buffer size out to the next 256 byte boundary before adding on
the size of the tty_buffer.
This patch adjusts the TTY_BUFFER_PAGE calculation to take into account the
size of the tty_buffer and the padding. Once applied, tty_buffer_alloc()
should not require high-order allocations.
Signed-off-by: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/tty.h | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/include/linux/tty.h
+++ b/include/linux/tty.h
@@ -70,12 +70,13 @@ struct tty_buffer {
/*
* We default to dicing tty buffer allocations to this many characters
- * in order to avoid multiple page allocations. We assume tty_buffer itself
- * is under 256 bytes. See tty_buffer_find for the allocation logic this
- * must match
+ * in order to avoid multiple page allocations. We know the size of
+ * tty_buffer itself but it must also be taken into account that the
+ * the buffer is 256 byte aligned. See tty_buffer_find for the allocation
+ * logic this must match
*/
-#define TTY_BUFFER_PAGE ((PAGE_SIZE - 256) / 2)
+#define TTY_BUFFER_PAGE (((PAGE_SIZE - sizeof(struct tty_buffer)) / 2) & ~0xFF)
struct tty_bufhead {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [063/116] USB: fix usbfs regression
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (61 preceding siblings ...)
2010-03-30 22:55 ` [062/116] tty: Take a 256 byte padding into account when buffering below " Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [064/116] USB: EHCI: fix ITD list order Greg KH
` (52 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit 7152b592593b9d48b33f8997b1dfd6df9143f7ec upstream.
This patch (as1352) fixes a bug in the way isochronous input data is
returned to userspace for usbfs transfers. The entire buffer must be
copied, not just the first actual_length bytes, because the individual
packets will be discontiguous if any of them are short.
Reported-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/devio.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1176,6 +1176,13 @@ static int proc_do_submiturb(struct dev_
free_async(as);
return -ENOMEM;
}
+ /* Isochronous input data may end up being discontiguous
+ * if some of the packets are short. Clear the buffer so
+ * that the gaps don't leak kernel data to userspace.
+ */
+ if (is_in && uurb->type == USBDEVFS_URB_TYPE_ISO)
+ memset(as->urb->transfer_buffer, 0,
+ uurb->buffer_length);
}
as->urb->dev = ps->dev;
as->urb->pipe = (uurb->type << 30) |
@@ -1312,10 +1319,14 @@ static int processcompl(struct async *as
void __user *addr = as->userurb;
unsigned int i;
- if (as->userbuffer && urb->actual_length)
- if (copy_to_user(as->userbuffer, urb->transfer_buffer,
- urb->actual_length))
+ if (as->userbuffer && urb->actual_length) {
+ if (urb->number_of_packets > 0) /* Isochronous */
+ i = urb->transfer_buffer_length;
+ else /* Non-Isoc */
+ i = urb->actual_length;
+ if (copy_to_user(as->userbuffer, urb->transfer_buffer, i))
goto err_out;
+ }
if (put_user(as->status, &userurb->status))
goto err_out;
if (put_user(urb->actual_length, &userurb->actual_length))
^ permalink raw reply [flat|nested] 432+ messages in thread
* [064/116] USB: EHCI: fix ITD list order
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (62 preceding siblings ...)
2010-03-30 22:55 ` [063/116] USB: fix usbfs regression Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [065/116] USB: EHCI: adjust ehci_iso_stream for changes in ehci_qh Greg KH
` (51 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit 92bc3648e6027384479852b770a542722fadee7c upstream.
When isochronous URBs are shorter than one frame and when more than one
ITD in a frame has been completed before the interrupt can be handled,
scan_periodic() completes the URBs in the order in which they are found
in the descriptor list. Therefore, the descriptor list must contain the
ITDs in the correct order, i.e., a new ITD must be linked in after any
previous ITDs of the same endpoint.
This should fix garbled capture data in the USB audio drivers.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Colin Fletcher <colin.m.fletcher@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/ehci-sched.c | 24 +++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1553,13 +1553,27 @@ itd_patch(
static inline void
itd_link (struct ehci_hcd *ehci, unsigned frame, struct ehci_itd *itd)
{
- /* always prepend ITD/SITD ... only QH tree is order-sensitive */
- itd->itd_next = ehci->pshadow [frame];
- itd->hw_next = ehci->periodic [frame];
- ehci->pshadow [frame].itd = itd;
+ union ehci_shadow *prev = &ehci->pshadow[frame];
+ __hc32 *hw_p = &ehci->periodic[frame];
+ union ehci_shadow here = *prev;
+ __hc32 type = 0;
+
+ /* skip any iso nodes which might belong to previous microframes */
+ while (here.ptr) {
+ type = Q_NEXT_TYPE(ehci, *hw_p);
+ if (type == cpu_to_hc32(ehci, Q_TYPE_QH))
+ break;
+ prev = periodic_next_shadow(ehci, prev, type);
+ hw_p = shadow_next_periodic(ehci, &here, type);
+ here = *prev;
+ }
+
+ itd->itd_next = here;
+ itd->hw_next = *hw_p;
+ prev->itd = itd;
itd->frame = frame;
wmb ();
- ehci->periodic[frame] = cpu_to_hc32(ehci, itd->itd_dma | Q_TYPE_ITD);
+ *hw_p = cpu_to_hc32(ehci, itd->itd_dma | Q_TYPE_ITD);
}
/* fit urb's itds into the selected schedule slot; activate as needed */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [065/116] USB: EHCI: adjust ehci_iso_stream for changes in ehci_qh
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (63 preceding siblings ...)
2010-03-30 22:55 ` [064/116] USB: EHCI: fix ITD list order Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [066/116] USB: qcserial: add new device ids Greg KH
` (50 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch, Alan Stern,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit 1082f57abfa26590b60c43f503afb24102a37016 upstream.
The EHCI driver stores in usb_host_endpoint.hcpriv a pointer to either
an ehci_qh or an ehci_iso_stream structure, and uses the contents of the
hw_info1 field to distinguish the two cases.
After ehci_qh was split into hw and sw parts, ehci_iso_stream must also
be adjusted so that it again looks like an ehci_qh structure.
This fixes a NULL pointer access in ehci_endpoint_disable() when it
tries to access qh->hw->hw_info1.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Reported-by: Colin Fletcher <colin.m.fletcher@googlemail.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/ehci-hcd.c | 2 +-
drivers/usb/host/ehci-sched.c | 4 ++--
drivers/usb/host/ehci.h | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -993,7 +993,7 @@ rescan:
/* endpoints can be iso streams. for now, we don't
* accelerate iso completions ... so spin a while.
*/
- if (qh->hw->hw_info1 == 0) {
+ if (qh->hw == NULL) {
ehci_vdbg (ehci, "iso delay\n");
goto idle_timeout;
}
--- a/drivers/usb/host/ehci-sched.c
+++ b/drivers/usb/host/ehci-sched.c
@@ -1121,8 +1121,8 @@ iso_stream_find (struct ehci_hcd *ehci,
urb->interval);
}
- /* if dev->ep [epnum] is a QH, info1.maxpacket is nonzero */
- } else if (unlikely (stream->hw_info1 != 0)) {
+ /* if dev->ep [epnum] is a QH, hw is set */
+ } else if (unlikely (stream->hw != NULL)) {
ehci_dbg (ehci, "dev %s ep%d%s, not iso??\n",
urb->dev->devpath, epnum,
usb_pipein(urb->pipe) ? "in" : "out");
--- a/drivers/usb/host/ehci.h
+++ b/drivers/usb/host/ehci.h
@@ -394,9 +394,8 @@ struct ehci_iso_sched {
* acts like a qh would, if EHCI had them for ISO.
*/
struct ehci_iso_stream {
- /* first two fields match QH, but info1 == 0 */
- __hc32 hw_next;
- __hc32 hw_info1;
+ /* first field matches ehci_hq, but is NULL */
+ struct ehci_qh_hw *hw;
u32 refcount;
u8 bEndpointAddress;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [066/116] USB: qcserial: add new device ids
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (64 preceding siblings ...)
2010-03-30 22:55 ` [065/116] USB: EHCI: adjust ehci_iso_stream for changes in ehci_qh Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [067/116] USB: xHCI: re-initialize cmd_completion Greg KH
` (49 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bernhard Rosenkraenzer,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bernhard Rosenkraenzer <br@blankpage.ch>
commit 0725e95ea56698774e893edb7e7276b1d6890954 upstream.
This patch adds various USB device IDs for Gobi 2000 devices, as found in the
drivers available at https://www.codeaurora.org/wiki/GOBI_Releases
Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/qcserial.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -47,6 +47,35 @@ static struct usb_device_id id_table[] =
{USB_DEVICE(0x05c6, 0x9221)}, /* Generic Gobi QDL device */
{USB_DEVICE(0x05c6, 0x9231)}, /* Generic Gobi QDL device */
{USB_DEVICE(0x1f45, 0x0001)}, /* Unknown Gobi QDL device */
+ {USB_DEVICE(0x413c, 0x8185)}, /* Dell Gobi 2000 QDL device (N0218, VU936) */
+ {USB_DEVICE(0x413c, 0x8186)}, /* Dell Gobi 2000 Modem device (N0218, VU936) */
+ {USB_DEVICE(0x05c6, 0x9224)}, /* Sony Gobi 2000 QDL device (N0279, VU730) */
+ {USB_DEVICE(0x05c6, 0x9225)}, /* Sony Gobi 2000 Modem device (N0279, VU730) */
+ {USB_DEVICE(0x05c6, 0x9244)}, /* Samsung Gobi 2000 QDL device (VL176) */
+ {USB_DEVICE(0x05c6, 0x9245)}, /* Samsung Gobi 2000 Modem device (VL176) */
+ {USB_DEVICE(0x03f0, 0x241d)}, /* HP Gobi 2000 QDL device (VP412) */
+ {USB_DEVICE(0x03f0, 0x251d)}, /* HP Gobi 2000 Modem device (VP412) */
+ {USB_DEVICE(0x05c6, 0x9214)}, /* Acer Gobi 2000 QDL device (VP413) */
+ {USB_DEVICE(0x05c6, 0x9215)}, /* Acer Gobi 2000 Modem device (VP413) */
+ {USB_DEVICE(0x05c6, 0x9264)}, /* Asus Gobi 2000 QDL device (VR305) */
+ {USB_DEVICE(0x05c6, 0x9265)}, /* Asus Gobi 2000 Modem device (VR305) */
+ {USB_DEVICE(0x05c6, 0x9234)}, /* Top Global Gobi 2000 QDL device (VR306) */
+ {USB_DEVICE(0x05c6, 0x9235)}, /* Top Global Gobi 2000 Modem device (VR306) */
+ {USB_DEVICE(0x05c6, 0x9274)}, /* iRex Technologies Gobi 2000 QDL device (VR307) */
+ {USB_DEVICE(0x05c6, 0x9275)}, /* iRex Technologies Gobi 2000 Modem device (VR307) */
+ {USB_DEVICE(0x1199, 0x9000)}, /* Sierra Wireless Gobi 2000 QDL device (VT773) */
+ {USB_DEVICE(0x1199, 0x9001)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9002)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9003)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9004)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9005)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9006)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9007)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9008)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x9009)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x1199, 0x900a)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
+ {USB_DEVICE(0x16d8, 0x8001)}, /* CMDTech Gobi 2000 QDL device (VU922) */
+ {USB_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */
{ } /* Terminating entry */
};
MODULE_DEVICE_TABLE(usb, id_table);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [067/116] USB: xHCI: re-initialize cmd_completion
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (65 preceding siblings ...)
2010-03-30 22:55 ` [066/116] USB: qcserial: add new device ids Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [068/116] USB: serial: ftdi: add CONTEC vendor and product id Greg KH
` (48 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andiry Xu, Sarah Sharp,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andiry Xu <andiry.xu@amd.com>
commit 1d68064a7d80da4a7334cab0356162e36229c1a1 upstream.
When a signal interrupts a Configure Endpoint command, the cmd_completion used
in xhci_configure_endpoint() is not re-initialized and the
wait_for_completion_interruptible_timeout() will return failure. Initialize
cmd_completion in xhci_configure_endpoint().
Signed-off-by: Andiry Xu <andiry.xu@amd.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-hcd.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/usb/host/xhci-hcd.c
+++ b/drivers/usb/host/xhci-hcd.c
@@ -1157,6 +1157,7 @@ static int xhci_configure_endpoint(struc
cmd_completion = &virt_dev->cmd_completion;
cmd_status = &virt_dev->cmd_status;
}
+ init_completion(cmd_completion);
if (!ctx_change)
ret = xhci_queue_configure_endpoint(xhci, in_ctx->dma,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [068/116] USB: serial: ftdi: add CONTEC vendor and product id
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (66 preceding siblings ...)
2010-03-30 22:55 ` [067/116] USB: xHCI: re-initialize cmd_completion Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [069/116] USB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH Greg KH
` (47 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel Sangorrin,
Andreas Mohr, Radek Liboska, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Sangorrin <daniel.sangorrin@gmail.com>
commit dee5658b482e9e2ac7d6205dc876fc11d4008138 upstream.
This is a patch to ftdi_sio_ids.h and ftdi_sio.c that adds identifiers for
CONTEC USB serial converter. I tested it with the device COM-1(USB)H
[akpm@linux-foundation.org: keep the VIDs sorted a bit]
Signed-off-by: Daniel Sangorrin <daniel.sangorrin@gmail.com>
Cc: Andreas Mohr <andi@lisas.de>
Cc: Radek Liboska <liboska@uochb.cas.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/ftdi_sio.c | 1 +
drivers/usb/serial/ftdi_sio_ids.h | 7 +++++++
2 files changed, 8 insertions(+)
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -658,6 +658,7 @@ static struct usb_device_id id_table_com
{ USB_DEVICE(EVOLUTION_VID, EVOLUTION_ER1_PID) },
{ USB_DEVICE(EVOLUTION_VID, EVO_HYBRID_PID) },
{ USB_DEVICE(EVOLUTION_VID, EVO_RCM4_PID) },
+ { USB_DEVICE(CONTEC_VID, CONTEC_COM1USBH_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_ARTEMIS_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16_PID) },
{ USB_DEVICE(FTDI_VID, FTDI_ATIK_ATK16C_PID) },
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -501,6 +501,13 @@
#define CONTEC_COM1USBH_PID 0x8311 /* COM-1(USB)H */
/*
+ * Contec products (http://www.contec.com)
+ * Submitted by Daniel Sangorrin
+ */
+#define CONTEC_VID 0x06CE /* Vendor ID */
+#define CONTEC_COM1USBH_PID 0x8311 /* COM-1(USB)H */
+
+/*
* Definitions for B&B Electronics products.
*/
#define BANDB_VID 0x0856 /* B&B Electronics Vendor ID */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [069/116] USB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (67 preceding siblings ...)
2010-03-30 22:55 ` [068/116] USB: serial: ftdi: add CONTEC vendor and product id Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [070/116] USB: option: move hardcoded PID to a macro in usb/serial/option Greg KH
` (46 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Nathaniel McCallum,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nathaniel McCallum <nathaniel@natemccallum.com>
commit eaff4cdc978f414cf7b5441a333de3070d80e9c7 upstream.
Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/option.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -288,7 +288,7 @@ static int option_resume(struct usb_ser
#define QUALCOMM_VENDOR_ID 0x05C6
-#define MAXON_VENDOR_ID 0x16d8
+#define CMOTECH_VENDOR_ID 0x16d8
#define TELIT_VENDOR_ID 0x1bc7
#define TELIT_PRODUCT_UC864E 0x1003
@@ -520,7 +520,7 @@ static struct usb_device_id option_ids[]
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
- { USB_DEVICE(MAXON_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
+ { USB_DEVICE(CMOTECH_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [070/116] USB: option: move hardcoded PID to a macro in usb/serial/option
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (68 preceding siblings ...)
2010-03-30 22:55 ` [069/116] USB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [071/116] USB: option: add support for a new CMOTECH device to usb/serial/option Greg KH
` (45 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Nathaniel McCallum,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nathaniel McCallum <nathaniel@natemccallum.com>
commit bb73ed2a268a29ab1b7d8cc50b5f248578e7e188 upstream.
Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/option.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -289,6 +289,7 @@ static int option_resume(struct usb_ser
#define QUALCOMM_VENDOR_ID 0x05C6
#define CMOTECH_VENDOR_ID 0x16d8
+#define CMOTECH_PRODUCT_6280 0x6280
#define TELIT_VENDOR_ID 0x1bc7
#define TELIT_PRODUCT_UC864E 0x1003
@@ -520,7 +521,7 @@ static struct usb_device_id option_ids[]
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
- { USB_DEVICE(CMOTECH_VENDOR_ID, 0x6280) }, /* BP3-USB & BP3-EXT HSDPA */
+ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [071/116] USB: option: add support for a new CMOTECH device to usb/serial/option
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (69 preceding siblings ...)
2010-03-30 22:55 ` [070/116] USB: option: move hardcoded PID to a macro in usb/serial/option Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [072/116] usb: r8a66597-hcd: fix removed from an attached hub Greg KH
` (44 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Nathaniel McCallum,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Nathaniel McCallum <nathaniel@natemccallum.com>
commit 3b04872aa75006e2a4adaaec21e9c9ede8b8ad9d upstream.
Signed-off-by: Nathaniel McCallum <nathaniel@natemccallum.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/option.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -289,6 +289,7 @@ static int option_resume(struct usb_ser
#define QUALCOMM_VENDOR_ID 0x05C6
#define CMOTECH_VENDOR_ID 0x16d8
+#define CMOTECH_PRODUCT_6008 0x6008
#define CMOTECH_PRODUCT_6280 0x6280
#define TELIT_VENDOR_ID 0x1bc7
@@ -522,6 +523,7 @@ static struct usb_device_id option_ids[]
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
+ { USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864G) },
{ USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [072/116] usb: r8a66597-hcd: fix removed from an attached hub
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (70 preceding siblings ...)
2010-03-30 22:55 ` [071/116] USB: option: add support for a new CMOTECH device to usb/serial/option Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [073/116] wl1251: fix potential crash Greg KH
` (43 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Yoshihiro Shimoda,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
commit d835933436ac0d1e8f5b35fe809fd4e767e55d6e upstream.
fix the problem that when a USB hub is attached to the r8a66597-hcd and
a device is removed from that hub, it's likely that a kernel panic follows.
Reported-by: Markus Pietrek <Markus.Pietrek@emtrion.de>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/r8a66597-hcd.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
--- a/drivers/usb/host/r8a66597-hcd.c
+++ b/drivers/usb/host/r8a66597-hcd.c
@@ -418,7 +418,7 @@ static u8 alloc_usb_address(struct r8a66
/* this function must be called with interrupt disabled */
static void free_usb_address(struct r8a66597 *r8a66597,
- struct r8a66597_device *dev)
+ struct r8a66597_device *dev, int reset)
{
int port;
@@ -430,7 +430,13 @@ static void free_usb_address(struct r8a6
dev->state = USB_STATE_DEFAULT;
r8a66597->address_map &= ~(1 << dev->address);
dev->address = 0;
- dev_set_drvdata(&dev->udev->dev, NULL);
+ /*
+ * Only when resetting USB, it is necessary to erase drvdata. When
+ * a usb device with usb hub is disconnect, "dev->udev" is already
+ * freed on usb_desconnect(). So we cannot access the data.
+ */
+ if (reset)
+ dev_set_drvdata(&dev->udev->dev, NULL);
list_del(&dev->device_list);
kfree(dev);
@@ -1067,7 +1073,7 @@ static void r8a66597_usb_disconnect(stru
struct r8a66597_device *dev = r8a66597->root_hub[port].dev;
disable_r8a66597_pipe_all(r8a66597, dev);
- free_usb_address(r8a66597, dev);
+ free_usb_address(r8a66597, dev, 0);
start_root_hub_sampling(r8a66597, port, 0);
}
@@ -2085,7 +2091,7 @@ static void update_usb_address_map(struc
spin_lock_irqsave(&r8a66597->lock, flags);
dev = get_r8a66597_device(r8a66597, addr);
disable_r8a66597_pipe_all(r8a66597, dev);
- free_usb_address(r8a66597, dev);
+ free_usb_address(r8a66597, dev, 0);
put_child_connect_map(r8a66597, addr);
spin_unlock_irqrestore(&r8a66597->lock, flags);
}
@@ -2228,7 +2234,7 @@ static int r8a66597_hub_control(struct u
rh->port |= (1 << USB_PORT_FEAT_RESET);
disable_r8a66597_pipe_all(r8a66597, dev);
- free_usb_address(r8a66597, dev);
+ free_usb_address(r8a66597, dev, 1);
r8a66597_mdfy(r8a66597, USBRST, USBRST | UACT,
get_dvstctr_reg(port));
^ permalink raw reply [flat|nested] 432+ messages in thread
* [073/116] wl1251: fix potential crash
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (71 preceding siblings ...)
2010-03-30 22:55 ` [072/116] usb: r8a66597-hcd: fix removed from an attached hub Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [074/116] jme: Fix VLAN memory leak Greg KH
` (42 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Grazvydas Ignotas,
Kalle Valo, John W. Linville, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Grazvydas Ignotas <notasas@gmail.com>
commit 3f60ebc9d6291863652d564bacc430629271e6a9 upstream.
In case debugfs does not init for some reason (or is disabled
on older kernels) driver does not allocate stats.fw_stats
structure, but tries to clear it later and trips on a NULL
pointer:
Unable to handle kernel NULL pointer dereference at virtual address
00000000
PC is at __memzero+0x24/0x80
Backtrace:
[<bf0ddb88>] (wl1251_debugfs_reset+0x0/0x30 [wl1251])
[<bf0d6a2c>] (wl1251_op_stop+0x0/0x12c [wl1251])
[<bf0bc228>] (ieee80211_stop_device+0x0/0x74 [mac80211])
[<bf0b0d10>] (ieee80211_stop+0x0/0x4ac [mac80211])
[<c02deeac>] (dev_close+0x0/0xb4)
[<c02deac0>] (dev_change_flags+0x0/0x184)
[<c031f478>] (devinet_ioctl+0x0/0x704)
[<c0320720>] (inet_ioctl+0x0/0x100)
Add a NULL pointer check to fix this.
Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Acked-by: Kalle Valo <kalle.valo@iki.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/wl12xx/wl1251_debugfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/net/wireless/wl12xx/wl1251_debugfs.c
+++ b/drivers/net/wireless/wl12xx/wl1251_debugfs.c
@@ -443,7 +443,8 @@ out:
void wl1251_debugfs_reset(struct wl1251 *wl)
{
- memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats));
+ if (wl->stats.fw_stats != NULL)
+ memset(wl->stats.fw_stats, 0, sizeof(*wl->stats.fw_stats));
wl->stats.retry_count = 0;
wl->stats.excessive_retries = 0;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [074/116] jme: Fix VLAN memory leak
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (72 preceding siblings ...)
2010-03-30 22:55 ` [073/116] wl1251: fix potential crash Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [075/116] jme: Protect vlgrp structure by pause RX actions Greg KH
` (41 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Guo-Fu Tseng,
David S. Miller, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Guo-Fu Tseng <cooldavid@cooldavid.org>
commit 17da69b8bfbe441a33a873ad5dd7d3d85800bf2b upstream.
Fix memory leak while receiving 8021q tagged packet which is not
registered by user.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/jme.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -946,6 +946,8 @@ jme_alloc_and_feed_skb(struct jme_adapte
jme->jme_vlan_rx(skb, jme->vlgrp,
le16_to_cpu(rxdesc->descwb.vlan));
NET_STAT(jme).rx_bytes += 4;
+ } else {
+ dev_kfree_skb(skb);
}
} else {
jme->jme_rx(skb);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [075/116] jme: Protect vlgrp structure by pause RX actions.
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (73 preceding siblings ...)
2010-03-30 22:55 ` [074/116] jme: Fix VLAN memory leak Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [076/116] edac, mce: Filter out invalid values Greg KH
` (40 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Guo-Fu Tseng,
David S. Miller, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Guo-Fu Tseng <cooldavid@cooldavid.org>
commit bf5e5360fd1df1ae429ebbd81838d7d0879797d1 upstream.
Temporary stop the RX IRQ, and disable (sync) tasklet or napi.
And restore it after finished the vlgrp pointer assignment.
Signed-off-by: Guo-Fu Tseng <cooldavid@cooldavid.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/jme.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
--- a/drivers/net/jme.c
+++ b/drivers/net/jme.c
@@ -2087,12 +2087,45 @@ jme_tx_timeout(struct net_device *netdev
jme_reset_link(jme);
}
+static inline void jme_pause_rx(struct jme_adapter *jme)
+{
+ atomic_dec(&jme->link_changing);
+
+ jme_set_rx_pcc(jme, PCC_OFF);
+ if (test_bit(JME_FLAG_POLL, &jme->flags)) {
+ JME_NAPI_DISABLE(jme);
+ } else {
+ tasklet_disable(&jme->rxclean_task);
+ tasklet_disable(&jme->rxempty_task);
+ }
+}
+
+static inline void jme_resume_rx(struct jme_adapter *jme)
+{
+ struct dynpcc_info *dpi = &(jme->dpi);
+
+ if (test_bit(JME_FLAG_POLL, &jme->flags)) {
+ JME_NAPI_ENABLE(jme);
+ } else {
+ tasklet_hi_enable(&jme->rxclean_task);
+ tasklet_hi_enable(&jme->rxempty_task);
+ }
+ dpi->cur = PCC_P1;
+ dpi->attempt = PCC_P1;
+ dpi->cnt = 0;
+ jme_set_rx_pcc(jme, PCC_P1);
+
+ atomic_inc(&jme->link_changing);
+}
+
static void
jme_vlan_rx_register(struct net_device *netdev, struct vlan_group *grp)
{
struct jme_adapter *jme = netdev_priv(netdev);
+ jme_pause_rx(jme);
jme->vlgrp = grp;
+ jme_resume_rx(jme);
}
static void
^ permalink raw reply [flat|nested] 432+ messages in thread
* [076/116] edac, mce: Filter out invalid values
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (74 preceding siblings ...)
2010-03-30 22:55 ` [075/116] jme: Protect vlgrp structure by pause RX actions Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [077/116] iwlwifi: use dma_alloc_coherent Greg KH
` (39 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Borislav Petkov,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Borislav Petkov <borislav.petkov@amd.com>
commit 5b89d2f9ace1970324facc68ca9b8fae19ce8096 upstream.
Print the CPU associated with the error only when the field is valid.
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/edac/edac_mce_amd.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/edac/edac_mce_amd.c
+++ b/drivers/edac/edac_mce_amd.c
@@ -311,9 +311,13 @@ void amd_decode_nb_mce(int node_id, stru
if (regs->nbsh & K8_NBSH_ERR_CPU_VAL)
pr_cont(", core: %u\n", (u8)(regs->nbsh & 0xf));
} else {
- pr_cont(", core: %d\n", ilog2((regs->nbsh & 0xf)));
- }
+ u8 assoc_cpus = regs->nbsh & 0xf;
+
+ if (assoc_cpus > 0)
+ pr_cont(", core: %d", fls(assoc_cpus) - 1);
+ pr_cont("\n");
+ }
pr_emerg("%s.\n", EXT_ERR_MSG(xec));
^ permalink raw reply [flat|nested] 432+ messages in thread
* [077/116] iwlwifi: use dma_alloc_coherent
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (75 preceding siblings ...)
2010-03-30 22:55 ` [076/116] edac, mce: Filter out invalid values Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [078/116] iwlwifi: Silence tfds_in_queue message Greg KH
` (38 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable, Greg KH
Cc: stable-review, torvalds, akpm, alan, Reinette Chatre,
Stanislaw Gruszka, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stanislaw Gruszka <sgruszka@redhat.com>
commit f36d04abe684f9e2b07c6ebe9f77ae20eb5c1e84 upstream.
Change pci_alloc_consistent() to dma_alloc_coherent() so we can use
GFP_KERNEL flag.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/iwlwifi/iwl-3945.c | 8 +++-----
drivers/net/wireless/iwlwifi/iwl-core.c | 12 ++++++------
drivers/net/wireless/iwlwifi/iwl-helpers.h | 7 ++++---
drivers/net/wireless/iwlwifi/iwl-rx.c | 21 +++++++++++----------
drivers/net/wireless/iwlwifi/iwl-tx.c | 23 ++++++++++++-----------
drivers/net/wireless/iwlwifi/iwl3945-base.c | 16 ++++++++--------
6 files changed, 44 insertions(+), 43 deletions(-)
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -2545,11 +2545,9 @@ int iwl3945_hw_set_hw_params(struct iwl_
memset((void *)&priv->hw_params, 0,
sizeof(struct iwl_hw_params));
- priv->shared_virt =
- pci_alloc_consistent(priv->pci_dev,
- sizeof(struct iwl3945_shared),
- &priv->shared_phys);
-
+ priv->shared_virt = dma_alloc_coherent(&priv->pci_dev->dev,
+ sizeof(struct iwl3945_shared),
+ &priv->shared_phys, GFP_KERNEL);
if (!priv->shared_virt) {
IWL_ERR(priv, "failed to allocate pci memory\n");
mutex_unlock(&priv->mutex);
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -1598,9 +1598,9 @@ EXPORT_SYMBOL(iwl_uninit_drv);
void iwl_free_isr_ict(struct iwl_priv *priv)
{
if (priv->ict_tbl_vir) {
- pci_free_consistent(priv->pci_dev, (sizeof(u32) * ICT_COUNT) +
- PAGE_SIZE, priv->ict_tbl_vir,
- priv->ict_tbl_dma);
+ dma_free_coherent(&priv->pci_dev->dev,
+ (sizeof(u32) * ICT_COUNT) + PAGE_SIZE,
+ priv->ict_tbl_vir, priv->ict_tbl_dma);
priv->ict_tbl_vir = NULL;
}
}
@@ -1616,9 +1616,9 @@ int iwl_alloc_isr_ict(struct iwl_priv *p
if (priv->cfg->use_isr_legacy)
return 0;
/* allocate shrared data table */
- priv->ict_tbl_vir = pci_alloc_consistent(priv->pci_dev, (sizeof(u32) *
- ICT_COUNT) + PAGE_SIZE,
- &priv->ict_tbl_dma);
+ priv->ict_tbl_vir = dma_alloc_coherent(&priv->pci_dev->dev,
+ (sizeof(u32) * ICT_COUNT) + PAGE_SIZE,
+ &priv->ict_tbl_dma, GFP_KERNEL);
if (!priv->ict_tbl_vir)
return -ENOMEM;
--- a/drivers/net/wireless/iwlwifi/iwl-helpers.h
+++ b/drivers/net/wireless/iwlwifi/iwl-helpers.h
@@ -80,8 +80,8 @@ static inline void iwl_free_fw_desc(stru
struct fw_desc *desc)
{
if (desc->v_addr)
- pci_free_consistent(pci_dev, desc->len,
- desc->v_addr, desc->p_addr);
+ dma_free_coherent(&pci_dev->dev, desc->len,
+ desc->v_addr, desc->p_addr);
desc->v_addr = NULL;
desc->len = 0;
}
@@ -89,7 +89,8 @@ static inline void iwl_free_fw_desc(stru
static inline int iwl_alloc_fw_desc(struct pci_dev *pci_dev,
struct fw_desc *desc)
{
- desc->v_addr = pci_alloc_consistent(pci_dev, desc->len, &desc->p_addr);
+ desc->v_addr = dma_alloc_coherent(&pci_dev->dev, desc->len,
+ &desc->p_addr, GFP_KERNEL);
return (desc->v_addr != NULL) ? 0 : -ENOMEM;
}
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -345,10 +345,10 @@ void iwl_rx_queue_free(struct iwl_priv *
}
}
- pci_free_consistent(priv->pci_dev, 4 * RX_QUEUE_SIZE, rxq->bd,
- rxq->dma_addr);
- pci_free_consistent(priv->pci_dev, sizeof(struct iwl_rb_status),
- rxq->rb_stts, rxq->rb_stts_dma);
+ dma_free_coherent(&priv->pci_dev->dev, 4 * RX_QUEUE_SIZE, rxq->bd,
+ rxq->dma_addr);
+ dma_free_coherent(&priv->pci_dev->dev, sizeof(struct iwl_rb_status),
+ rxq->rb_stts, rxq->rb_stts_dma);
rxq->bd = NULL;
rxq->rb_stts = NULL;
}
@@ -357,7 +357,7 @@ EXPORT_SYMBOL(iwl_rx_queue_free);
int iwl_rx_queue_alloc(struct iwl_priv *priv)
{
struct iwl_rx_queue *rxq = &priv->rxq;
- struct pci_dev *dev = priv->pci_dev;
+ struct device *dev = &priv->pci_dev->dev;
int i;
spin_lock_init(&rxq->lock);
@@ -365,12 +365,13 @@ int iwl_rx_queue_alloc(struct iwl_priv *
INIT_LIST_HEAD(&rxq->rx_used);
/* Alloc the circular buffer of Read Buffer Descriptors (RBDs) */
- rxq->bd = pci_alloc_consistent(dev, 4 * RX_QUEUE_SIZE, &rxq->dma_addr);
+ rxq->bd = dma_alloc_coherent(dev, 4 * RX_QUEUE_SIZE, &rxq->dma_addr,
+ GFP_KERNEL);
if (!rxq->bd)
goto err_bd;
- rxq->rb_stts = pci_alloc_consistent(dev, sizeof(struct iwl_rb_status),
- &rxq->rb_stts_dma);
+ rxq->rb_stts = dma_alloc_coherent(dev, sizeof(struct iwl_rb_status),
+ &rxq->rb_stts_dma, GFP_KERNEL);
if (!rxq->rb_stts)
goto err_rb;
@@ -387,8 +388,8 @@ int iwl_rx_queue_alloc(struct iwl_priv *
return 0;
err_rb:
- pci_free_consistent(priv->pci_dev, 4 * RX_QUEUE_SIZE, rxq->bd,
- rxq->dma_addr);
+ dma_free_coherent(&priv->pci_dev->dev, 4 * RX_QUEUE_SIZE, rxq->bd,
+ rxq->dma_addr);
err_bd:
return -ENOMEM;
}
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -60,7 +60,8 @@ static const u16 default_tid_to_tx_fifo[
static inline int iwl_alloc_dma_ptr(struct iwl_priv *priv,
struct iwl_dma_ptr *ptr, size_t size)
{
- ptr->addr = pci_alloc_consistent(priv->pci_dev, size, &ptr->dma);
+ ptr->addr = dma_alloc_coherent(&priv->pci_dev->dev, size, &ptr->dma,
+ GFP_KERNEL);
if (!ptr->addr)
return -ENOMEM;
ptr->size = size;
@@ -73,7 +74,7 @@ static inline void iwl_free_dma_ptr(stru
if (unlikely(!ptr->addr))
return;
- pci_free_consistent(priv->pci_dev, ptr->size, ptr->addr, ptr->dma);
+ dma_free_coherent(&priv->pci_dev->dev, ptr->size, ptr->addr, ptr->dma);
memset(ptr, 0, sizeof(*ptr));
}
@@ -145,7 +146,7 @@ void iwl_tx_queue_free(struct iwl_priv *
{
struct iwl_tx_queue *txq = &priv->txq[txq_id];
struct iwl_queue *q = &txq->q;
- struct pci_dev *dev = priv->pci_dev;
+ struct device *dev = &priv->pci_dev->dev;
int i, len;
if (q->n_bd == 0)
@@ -164,8 +165,8 @@ void iwl_tx_queue_free(struct iwl_priv *
/* De-alloc circular buffer of TFDs */
if (txq->q.n_bd)
- pci_free_consistent(dev, priv->hw_params.tfd_size *
- txq->q.n_bd, txq->tfds, txq->q.dma_addr);
+ dma_free_coherent(dev, priv->hw_params.tfd_size *
+ txq->q.n_bd, txq->tfds, txq->q.dma_addr);
/* De-alloc array of per-TFD driver data */
kfree(txq->txb);
@@ -194,7 +195,7 @@ void iwl_cmd_queue_free(struct iwl_priv
{
struct iwl_tx_queue *txq = &priv->txq[IWL_CMD_QUEUE_NUM];
struct iwl_queue *q = &txq->q;
- struct pci_dev *dev = priv->pci_dev;
+ struct device *dev = &priv->pci_dev->dev;
int i, len;
if (q->n_bd == 0)
@@ -209,8 +210,8 @@ void iwl_cmd_queue_free(struct iwl_priv
/* De-alloc circular buffer of TFDs */
if (txq->q.n_bd)
- pci_free_consistent(dev, priv->hw_params.tfd_size *
- txq->q.n_bd, txq->tfds, txq->q.dma_addr);
+ dma_free_coherent(dev, priv->hw_params.tfd_size * txq->q.n_bd,
+ txq->tfds, txq->q.dma_addr);
/* deallocate arrays */
kfree(txq->cmd);
@@ -301,7 +302,7 @@ static int iwl_queue_init(struct iwl_pri
static int iwl_tx_queue_alloc(struct iwl_priv *priv,
struct iwl_tx_queue *txq, u32 id)
{
- struct pci_dev *dev = priv->pci_dev;
+ struct device *dev = &priv->pci_dev->dev;
size_t tfd_sz = priv->hw_params.tfd_size * TFD_QUEUE_SIZE_MAX;
/* Driver private data, only for Tx (not command) queues,
@@ -320,8 +321,8 @@ static int iwl_tx_queue_alloc(struct iwl
/* Circular buffer of transmit frame descriptors (TFDs),
* shared with device */
- txq->tfds = pci_alloc_consistent(dev, tfd_sz, &txq->q.dma_addr);
-
+ txq->tfds = dma_alloc_coherent(dev, tfd_sz, &txq->q.dma_addr,
+ GFP_KERNEL);
if (!txq->tfds) {
IWL_ERR(priv, "pci_alloc_consistent(%zd) failed\n", tfd_sz);
goto error;
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -356,10 +356,10 @@ static int iwl3945_send_beacon_cmd(struc
static void iwl3945_unset_hw_params(struct iwl_priv *priv)
{
if (priv->shared_virt)
- pci_free_consistent(priv->pci_dev,
- sizeof(struct iwl3945_shared),
- priv->shared_virt,
- priv->shared_phys);
+ dma_free_coherent(&priv->pci_dev->dev,
+ sizeof(struct iwl3945_shared),
+ priv->shared_virt,
+ priv->shared_phys);
}
static void iwl3945_build_tx_cmd_hwcrypto(struct iwl_priv *priv,
@@ -1272,10 +1272,10 @@ static void iwl3945_rx_queue_free(struct
}
}
- pci_free_consistent(priv->pci_dev, 4 * RX_QUEUE_SIZE, rxq->bd,
- rxq->dma_addr);
- pci_free_consistent(priv->pci_dev, sizeof(struct iwl_rb_status),
- rxq->rb_stts, rxq->rb_stts_dma);
+ dma_free_coherent(&priv->pci_dev->dev, 4 * RX_QUEUE_SIZE, rxq->bd,
+ rxq->dma_addr);
+ dma_free_coherent(&priv->pci_dev->dev, sizeof(struct iwl_rb_status),
+ rxq->rb_stts, rxq->rb_stts_dma);
rxq->bd = NULL;
rxq->rb_stts = NULL;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [078/116] iwlwifi: Silence tfds_in_queue message
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (76 preceding siblings ...)
2010-03-30 22:55 ` [077/116] iwlwifi: use dma_alloc_coherent Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [079/116] SUNRPC: Fix a potential memory leak in auth_gss Greg KH
` (37 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Adel Gadllah,
Reinette Chatre, John W. Linville, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Adel Gadllah <adel.gadllah@gmail.com>
commit c8406ea8fa1adde8dc5400127281d497bbcdb84a upstream.
Commit a239a8b47cc0e5e6d7416a89f340beac06d5edaa introduced a
noisy message, that fills up the log very fast.
The error seems not to be fatal (the connection is stable and
performance is ok), so make it IWL_DEBUG_TX rather than IWL_ERR.
Signed-off-by: Adel Gadllah <adel.gadllah@gmail.com>
Acked-by: Reinette Chatre <reinette.chatre@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-tx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -126,7 +126,7 @@ void iwl_free_tfds_in_queue(struct iwl_p
if (priv->stations[sta_id].tid[tid].tfds_in_queue >= freed)
priv->stations[sta_id].tid[tid].tfds_in_queue -= freed;
else {
- IWL_ERR(priv, "free more than tfds_in_queue (%u:%d)\n",
+ IWL_DEBUG_TX(priv, "free more than tfds_in_queue (%u:%d)\n",
priv->stations[sta_id].tid[tid].tfds_in_queue,
freed);
priv->stations[sta_id].tid[tid].tfds_in_queue = 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [079/116] SUNRPC: Fix a potential memory leak in auth_gss
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (77 preceding siblings ...)
2010-03-30 22:55 ` [078/116] iwlwifi: Silence tfds_in_queue message Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [080/116] sunrpc: handle allocation errors from __rpc_lookup_create() Greg KH
` (36 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Trond Myklebust,
J. Bruce Fields, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit cdead7cf12896c0e50a8be2e52de52c364603095 upstream.
The function alloc_enc_pages() currently fails to release the pointer
rqstp->rq_enc_pages in the error path.
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sunrpc/auth_gss/auth_gss.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -1273,9 +1273,8 @@ alloc_enc_pages(struct rpc_rqst *rqstp)
rqstp->rq_release_snd_buf = priv_release_snd_buf;
return 0;
out_free:
- for (i--; i >= 0; i--) {
- __free_page(rqstp->rq_enc_pages[i]);
- }
+ rqstp->rq_enc_pages_num = i;
+ priv_release_snd_buf(rqstp);
out:
return -EAGAIN;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [080/116] sunrpc: handle allocation errors from __rpc_lookup_create()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (78 preceding siblings ...)
2010-03-30 22:55 ` [079/116] SUNRPC: Fix a potential memory leak in auth_gss Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:55 ` [081/116] if_tunnel.h: add missing ams/byteorder.h include Greg KH
` (35 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dan Carpenter,
Trond Myklebust, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dan Carpenter <error27@gmail.com>
commit f1f0abe192a72e75d7c59972e30784d043fd8d73 upstream.
__rpc_lookup_create() can return ERR_PTR(-ENOMEM).
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/sunrpc/rpc_pipe.c | 2 ++
1 file changed, 2 insertions(+)
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -587,6 +587,8 @@ static struct dentry *__rpc_lookup_creat
struct dentry *dentry;
dentry = __rpc_lookup_create(parent, name);
+ if (IS_ERR(dentry))
+ return dentry;
if (dentry->d_inode == NULL)
return dentry;
dput(dentry);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [081/116] if_tunnel.h: add missing ams/byteorder.h include
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (79 preceding siblings ...)
2010-03-30 22:55 ` [080/116] sunrpc: handle allocation errors from __rpc_lookup_create() Greg KH
@ 2010-03-30 22:55 ` Greg KH
2010-03-30 22:56 ` [082/116] fs/partitions/msdos: add support for large disks Greg KH
` (34 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:55 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Paulius Zaleckas,
David S. Miller, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Paulius Zaleckas <paulius.zaleckas@gmail.com>
commit 9bf35c8dddd56f7f247a27346f74f5adc18071f4 upstream.
When compiling userspace application which includes
if_tunnel.h and uses GRE_* defines you will get undefined
reference to __cpu_to_be16.
Fix this by adding missing #include <asm/byteorder.h>
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/if_tunnel.h | 1 +
1 file changed, 1 insertion(+)
--- a/include/linux/if_tunnel.h
+++ b/include/linux/if_tunnel.h
@@ -2,6 +2,7 @@
#define _IF_TUNNEL_H_
#include <linux/types.h>
+#include <asm/byteorder.h>
#ifdef __KERNEL__
#include <linux/ip.h>
^ permalink raw reply [flat|nested] 432+ messages in thread
* [082/116] fs/partitions/msdos: add support for large disks
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (80 preceding siblings ...)
2010-03-30 22:55 ` [081/116] if_tunnel.h: add missing ams/byteorder.h include Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [083/116] fs/partition/msdos: fix unusable extended partition for > 512B sector Greg KH
` (33 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel Taylor,
OGAWA Hirofumi, H. Peter Anvin, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Taylor <Daniel.Taylor@wdc.com>
commit 3fbf586cf7f245392142e5407c2a56f1cff979b6 upstream.
In order to use disks larger than 2TiB on Windows XP, it is necessary to
use 4096-byte logical sectors in an MBR.
Although the kernel storage and functions called from msdos.c used
"sector_t" internally, msdos.c still used u32 variables, which results in
the ability to handle XP-compatible large disks.
This patch changes the internal variables to "sector_t".
Daniel said: "In the near future, WD will be releasing products that need
this patch".
[hirofumi@mail.parknet.co.jp: tweaks and fix]
Signed-off-by: Daniel Taylor <daniel.taylor@wdc.com>
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: "H. Peter Anvin" <hpa@zytor.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>
---
fs/partitions/msdos.c | 74 ++++++++++++++++++++++++++------------------------
1 file changed, 39 insertions(+), 35 deletions(-)
--- a/fs/partitions/msdos.c
+++ b/fs/partitions/msdos.c
@@ -31,14 +31,17 @@
*/
#include <asm/unaligned.h>
-#define SYS_IND(p) (get_unaligned(&p->sys_ind))
-#define NR_SECTS(p) ({ __le32 __a = get_unaligned(&p->nr_sects); \
- le32_to_cpu(__a); \
- })
-
-#define START_SECT(p) ({ __le32 __a = get_unaligned(&p->start_sect); \
- le32_to_cpu(__a); \
- })
+#define SYS_IND(p) get_unaligned(&p->sys_ind)
+
+static inline sector_t nr_sects(struct partition *p)
+{
+ return (sector_t)get_unaligned_le32(&p->nr_sects);
+}
+
+static inline sector_t start_sect(struct partition *p)
+{
+ return (sector_t)get_unaligned_le32(&p->start_sect);
+}
static inline int is_extended_partition(struct partition *p)
{
@@ -104,13 +107,13 @@ static int aix_magic_present(unsigned ch
static void
parse_extended(struct parsed_partitions *state, struct block_device *bdev,
- u32 first_sector, u32 first_size)
+ sector_t first_sector, sector_t first_size)
{
struct partition *p;
Sector sect;
unsigned char *data;
- u32 this_sector, this_size;
- int sector_size = bdev_logical_block_size(bdev) / 512;
+ sector_t this_sector, this_size;
+ sector_t sector_size = bdev_logical_block_size(bdev) / 512;
int loopct = 0; /* number of links followed
without finding a data partition */
int i;
@@ -145,14 +148,14 @@ parse_extended(struct parsed_partitions
* First process the data partition(s)
*/
for (i=0; i<4; i++, p++) {
- u32 offs, size, next;
- if (!NR_SECTS(p) || is_extended_partition(p))
+ sector_t offs, size, next;
+ if (!nr_sects(p) || is_extended_partition(p))
continue;
/* Check the 3rd and 4th entries -
these sometimes contain random garbage */
- offs = START_SECT(p)*sector_size;
- size = NR_SECTS(p)*sector_size;
+ offs = start_sect(p)*sector_size;
+ size = nr_sects(p)*sector_size;
next = this_sector + offs;
if (i >= 2) {
if (offs + size > this_size)
@@ -179,13 +182,13 @@ parse_extended(struct parsed_partitions
*/
p -= 4;
for (i=0; i<4; i++, p++)
- if (NR_SECTS(p) && is_extended_partition(p))
+ if (nr_sects(p) && is_extended_partition(p))
break;
if (i == 4)
goto done; /* nothing left to do */
- this_sector = first_sector + START_SECT(p) * sector_size;
- this_size = NR_SECTS(p) * sector_size;
+ this_sector = first_sector + start_sect(p) * sector_size;
+ this_size = nr_sects(p) * sector_size;
put_dev_sector(sect);
}
done:
@@ -197,7 +200,7 @@ done:
static void
parse_solaris_x86(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_SOLARIS_X86_PARTITION
Sector sect;
@@ -244,7 +247,7 @@ parse_solaris_x86(struct parsed_partitio
*/
static void
parse_bsd(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin, char *flavour,
+ sector_t offset, sector_t size, int origin, char *flavour,
int max_partitions)
{
Sector sect;
@@ -263,7 +266,7 @@ parse_bsd(struct parsed_partitions *stat
if (le16_to_cpu(l->d_npartitions) < max_partitions)
max_partitions = le16_to_cpu(l->d_npartitions);
for (p = l->d_partitions; p - l->d_partitions < max_partitions; p++) {
- u32 bsd_start, bsd_size;
+ sector_t bsd_start, bsd_size;
if (state->next == state->limit)
break;
@@ -290,7 +293,7 @@ parse_bsd(struct parsed_partitions *stat
static void
parse_freebsd(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_BSD_DISKLABEL
parse_bsd(state, bdev, offset, size, origin,
@@ -300,7 +303,7 @@ parse_freebsd(struct parsed_partitions *
static void
parse_netbsd(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_BSD_DISKLABEL
parse_bsd(state, bdev, offset, size, origin,
@@ -310,7 +313,7 @@ parse_netbsd(struct parsed_partitions *s
static void
parse_openbsd(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_BSD_DISKLABEL
parse_bsd(state, bdev, offset, size, origin,
@@ -324,7 +327,7 @@ parse_openbsd(struct parsed_partitions *
*/
static void
parse_unixware(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_UNIXWARE_DISKLABEL
Sector sect;
@@ -348,7 +351,8 @@ parse_unixware(struct parsed_partitions
if (p->s_label != UNIXWARE_FS_UNUSED)
put_partition(state, state->next++,
- START_SECT(p), NR_SECTS(p));
+ le32_to_cpu(p->start_sect),
+ le32_to_cpu(p->nr_sects));
p++;
}
put_dev_sector(sect);
@@ -363,7 +367,7 @@ parse_unixware(struct parsed_partitions
*/
static void
parse_minix(struct parsed_partitions *state, struct block_device *bdev,
- u32 offset, u32 size, int origin)
+ sector_t offset, sector_t size, int origin)
{
#ifdef CONFIG_MINIX_SUBPARTITION
Sector sect;
@@ -390,7 +394,7 @@ parse_minix(struct parsed_partitions *st
/* add each partition in use */
if (SYS_IND(p) == MINIX_PARTITION)
put_partition(state, state->next++,
- START_SECT(p), NR_SECTS(p));
+ start_sect(p), nr_sects(p));
}
printk(" >\n");
}
@@ -401,7 +405,7 @@ parse_minix(struct parsed_partitions *st
static struct {
unsigned char id;
void (*parse)(struct parsed_partitions *, struct block_device *,
- u32, u32, int);
+ sector_t, sector_t, int);
} subtypes[] = {
{FREEBSD_PARTITION, parse_freebsd},
{NETBSD_PARTITION, parse_netbsd},
@@ -415,7 +419,7 @@ static struct {
int msdos_partition(struct parsed_partitions *state, struct block_device *bdev)
{
- int sector_size = bdev_logical_block_size(bdev) / 512;
+ sector_t sector_size = bdev_logical_block_size(bdev) / 512;
Sector sect;
unsigned char *data;
struct partition *p;
@@ -483,8 +487,8 @@ int msdos_partition(struct parsed_partit
state->next = 5;
for (slot = 1 ; slot <= 4 ; slot++, p++) {
- u32 start = START_SECT(p)*sector_size;
- u32 size = NR_SECTS(p)*sector_size;
+ sector_t start = start_sect(p)*sector_size;
+ sector_t size = nr_sects(p)*sector_size;
if (!size)
continue;
if (is_extended_partition(p)) {
@@ -513,7 +517,7 @@ int msdos_partition(struct parsed_partit
unsigned char id = SYS_IND(p);
int n;
- if (!NR_SECTS(p))
+ if (!nr_sects(p))
continue;
for (n = 0; subtypes[n].parse && id != subtypes[n].id; n++)
@@ -521,8 +525,8 @@ int msdos_partition(struct parsed_partit
if (!subtypes[n].parse)
continue;
- subtypes[n].parse(state, bdev, START_SECT(p)*sector_size,
- NR_SECTS(p)*sector_size, slot);
+ subtypes[n].parse(state, bdev, start_sect(p)*sector_size,
+ nr_sects(p)*sector_size, slot);
}
put_dev_sector(sect);
return 1;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [083/116] fs/partition/msdos: fix unusable extended partition for > 512B sector
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (81 preceding siblings ...)
2010-03-30 22:56 ` [082/116] fs/partitions/msdos: add support for large disks Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [084/116] PCI: fix return value from pcix_get_max_mmrbc() Greg KH
` (32 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, OGAWA Hirofumi,
Daniel Taylor, H. Peter Anvin, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
commit 8e0cc811e0f8029a7225372fb0951fab102c012f upstream.
Smaller size than a minimum blocksize can't be used, after all it's
handled like 0 size.
For extended partition itself, this makes sure to use bigger size than one
logical sector size at least.
Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Daniel Taylor <Daniel.Taylor@wdc.com>
Cc: "H. Peter Anvin" <hpa@zytor.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>
---
fs/partitions/msdos.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
--- a/fs/partitions/msdos.c
+++ b/fs/partitions/msdos.c
@@ -492,9 +492,16 @@ int msdos_partition(struct parsed_partit
if (!size)
continue;
if (is_extended_partition(p)) {
- /* prevent someone doing mkfs or mkswap on an
- extended partition, but leave room for LILO */
- put_partition(state, slot, start, size == 1 ? 1 : 2);
+ /*
+ * prevent someone doing mkfs or mkswap on an
+ * extended partition, but leave room for LILO
+ * FIXME: this uses one logical sector for > 512b
+ * sector, although it may not be enough/proper.
+ */
+ sector_t n = 2;
+ n = min(size, max(sector_size, n));
+ put_partition(state, slot, start, n);
+
printk(" <");
parse_extended(state, bdev, start, size);
printk(" >");
^ permalink raw reply [flat|nested] 432+ messages in thread
* [084/116] PCI: fix return value from pcix_get_max_mmrbc()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (82 preceding siblings ...)
2010-03-30 22:56 ` [083/116] fs/partition/msdos: fix unusable extended partition for > 512B sector Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [085/116] PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions Greg KH
` (31 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jesse Barnes,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit 25daeb550b69e89aff59bc6a84218a12b5203531 upstream.
For the PCI_X_STATUS register, pcix_get_max_mmrbc() is returning an incorrect
value, which is based on:
(stat & PCI_X_STATUS_MAX_READ) >> 12
Valid return values are 512, 1024, 2048, 4096, which correspond to a 'stat'
(masked and right shifted by 21) of 0, 1, 2, 3, respectively.
A right shift by 11 would generate the correct return value when 'stat' (masked
and right shifted by 21) has a value of 1 or 2. But for a value of 0 or 3 it's
not possible to generate the correct return value by only right shifting.
Fix is based on pcix_get_mmrbc()'s similar dealings with the PCI_X_CMD register.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pci.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2361,7 +2361,7 @@ int pcix_get_max_mmrbc(struct pci_dev *d
if (err)
return -EINVAL;
- return (stat & PCI_X_STATUS_MAX_READ) >> 12;
+ return 512 << ((stat & PCI_X_STATUS_MAX_READ) >> 21);
}
EXPORT_SYMBOL(pcix_get_max_mmrbc);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [085/116] PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (83 preceding siblings ...)
2010-03-30 22:56 ` [084/116] PCI: fix return value from pcix_get_max_mmrbc() Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [086/116] PCI: cleanup error return for " Greg KH
` (30 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jesse Barnes,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit bdc2bda7c4dd253026cc1fce45fc939304749029 upstream.
An e1000 driver on a system with a PCI-X bus was always being returned
a value of 135 from both pcix_get_mmrbc() and pcix_set_mmrbc(). This
value reflects an error return of PCIBIOS_BAD_REGISTER_NUMBER from
pci_bus_read_config_dword(,, cap + PCI_X_CMD,).
This is because for a dword, the following portion of the PCI_OP_READ()
macro:
if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER;
expands to:
if (pos & 3) return PCIBIOS_BAD_REGISTER_NUMBER;
And is always true for 'cap + PCI_X_CMD', which is 0xe4 + 2 = 0xe6. ('cap' is
the result of calling pci_find_capability(, PCI_CAP_ID_PCIX).)
The same problem exists for pci_bus_write_config_dword(,, cap + PCI_X_CMD,).
In both cases, instead of calling _dword(), _word() should be called.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pci.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2375,13 +2375,13 @@ EXPORT_SYMBOL(pcix_get_max_mmrbc);
int pcix_get_mmrbc(struct pci_dev *dev)
{
int ret, cap;
- u32 cmd;
+ u16 cmd;
cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (!cap)
return -EINVAL;
- ret = pci_read_config_dword(dev, cap + PCI_X_CMD, &cmd);
+ ret = pci_read_config_word(dev, cap + PCI_X_CMD, &cmd);
if (!ret)
ret = 512 << ((cmd & PCI_X_CMD_MAX_READ) >> 2);
@@ -2401,7 +2401,8 @@ EXPORT_SYMBOL(pcix_get_mmrbc);
int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc)
{
int cap, err = -EINVAL;
- u32 stat, cmd, v, o;
+ u32 stat, v, o;
+ u16 cmd;
if (mmrbc < 512 || mmrbc > 4096 || !is_power_of_2(mmrbc))
goto out;
@@ -2419,7 +2420,7 @@ int pcix_set_mmrbc(struct pci_dev *dev,
if (v > (stat & PCI_X_STATUS_MAX_READ) >> 21)
return -E2BIG;
- err = pci_read_config_dword(dev, cap + PCI_X_CMD, &cmd);
+ err = pci_read_config_word(dev, cap + PCI_X_CMD, &cmd);
if (err)
goto out;
@@ -2431,7 +2432,7 @@ int pcix_set_mmrbc(struct pci_dev *dev,
cmd &= ~PCI_X_CMD_MAX_READ;
cmd |= v << 2;
- err = pci_write_config_dword(dev, cap + PCI_X_CMD, cmd);
+ err = pci_write_config_word(dev, cap + PCI_X_CMD, cmd);
}
out:
return err;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [086/116] PCI: cleanup error return for pcix get and set mmrbc functions
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (84 preceding siblings ...)
2010-03-30 22:56 ` [085/116] PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [087/116] PCI quirk: RS780/RS880: work around missing MSI initialization Greg KH
` (29 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jesse Barnes,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit 7c9e2b1c4784c6e574f69dbd904b2822f2e04d6e upstream.
pcix_get_mmrbc() returns the maximum memory read byte count (mmrbc), if
successful, or an appropriate error value, if not.
Distinguishing errors from correct values and understanding the meaning of an
error can be somewhat confusing in that:
correct values: 512, 1024, 2048, 4096
errors: -EINVAL -22
PCIBIOS_FUNC_NOT_SUPPORTED 0x81
PCIBIOS_BAD_VENDOR_ID 0x83
PCIBIOS_DEVICE_NOT_FOUND 0x86
PCIBIOS_BAD_REGISTER_NUMBER 0x87
PCIBIOS_SET_FAILED 0x88
PCIBIOS_BUFFER_TOO_SMALL 0x89
The PCIBIOS_ errors are returned from the PCI functions generated by the
PCI_OP_READ() and PCI_OP_WRITE() macros.
In a similar manner, pcix_set_mmrbc() also returns the PCIBIOS_ error values
returned from pci_read_config_[word|dword]() and pci_write_config_word().
Following pcix_get_max_mmrbc()'s example, the following patch simply returns
-EINVAL for all PCIBIOS_ errors encountered by pcix_get_mmrbc(), and -EINVAL
or -EIO for those encountered by pcix_set_mmrbc().
This simplification was chosen in light of the fact that none of the current
callers of these functions are interested in the specific type of error
encountered. In the future, should this change, one could simply create a
function that maps each PCIBIOS_ error to a corresponding unique errno value,
which could be called by pcix_get_max_mmrbc(), pcix_get_mmrbc(), and
pcix_set_mmrbc().
Additionally, this patch eliminates some unnecessary variables.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/pci.c | 36 ++++++++++++++++--------------------
1 file changed, 16 insertions(+), 20 deletions(-)
--- a/drivers/pci/pci.c
+++ b/drivers/pci/pci.c
@@ -2350,15 +2350,14 @@ EXPORT_SYMBOL_GPL(pci_reset_function);
*/
int pcix_get_max_mmrbc(struct pci_dev *dev)
{
- int err, cap;
+ int cap;
u32 stat;
cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (!cap)
return -EINVAL;
- err = pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat);
- if (err)
+ if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat))
return -EINVAL;
return 512 << ((stat & PCI_X_STATUS_MAX_READ) >> 21);
@@ -2374,18 +2373,17 @@ EXPORT_SYMBOL(pcix_get_max_mmrbc);
*/
int pcix_get_mmrbc(struct pci_dev *dev)
{
- int ret, cap;
+ int cap;
u16 cmd;
cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (!cap)
return -EINVAL;
- ret = pci_read_config_word(dev, cap + PCI_X_CMD, &cmd);
- if (!ret)
- ret = 512 << ((cmd & PCI_X_CMD_MAX_READ) >> 2);
+ if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd))
+ return -EINVAL;
- return ret;
+ return 512 << ((cmd & PCI_X_CMD_MAX_READ) >> 2);
}
EXPORT_SYMBOL(pcix_get_mmrbc);
@@ -2400,29 +2398,27 @@ EXPORT_SYMBOL(pcix_get_mmrbc);
*/
int pcix_set_mmrbc(struct pci_dev *dev, int mmrbc)
{
- int cap, err = -EINVAL;
+ int cap;
u32 stat, v, o;
u16 cmd;
if (mmrbc < 512 || mmrbc > 4096 || !is_power_of_2(mmrbc))
- goto out;
+ return -EINVAL;
v = ffs(mmrbc) - 10;
cap = pci_find_capability(dev, PCI_CAP_ID_PCIX);
if (!cap)
- goto out;
+ return -EINVAL;
- err = pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat);
- if (err)
- goto out;
+ if (pci_read_config_dword(dev, cap + PCI_X_STATUS, &stat))
+ return -EINVAL;
if (v > (stat & PCI_X_STATUS_MAX_READ) >> 21)
return -E2BIG;
- err = pci_read_config_word(dev, cap + PCI_X_CMD, &cmd);
- if (err)
- goto out;
+ if (pci_read_config_word(dev, cap + PCI_X_CMD, &cmd))
+ return -EINVAL;
o = (cmd & PCI_X_CMD_MAX_READ) >> 2;
if (o != v) {
@@ -2432,10 +2428,10 @@ int pcix_set_mmrbc(struct pci_dev *dev,
cmd &= ~PCI_X_CMD_MAX_READ;
cmd |= v << 2;
- err = pci_write_config_word(dev, cap + PCI_X_CMD, cmd);
+ if (pci_write_config_word(dev, cap + PCI_X_CMD, cmd))
+ return -EIO;
}
-out:
- return err;
+ return 0;
}
EXPORT_SYMBOL(pcix_set_mmrbc);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [087/116] PCI quirk: RS780/RS880: work around missing MSI initialization
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (85 preceding siblings ...)
2010-03-30 22:56 ` [086/116] PCI: cleanup error return for " Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-31 0:13 ` Linus Torvalds
2010-03-30 22:56 ` [088/116] rt2860sta: Fix argument to linux_pci_unmap_single() Greg KH
` (28 subsequent siblings)
115 siblings, 1 reply; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Clemens Ladisch,
Jesse Barnes, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Clemens Ladisch <clemens@ladisch.de>
commit a5ee4eb75413c145334c30e43f1af9875dad6fd7 upstream.
AMD says in section 2.5.4 (GFX MSI Enable) of #43291 (AMD 780G Family
Register Programming Requirements):
The SBIOS must enable internal graphics MSI capability in GCCFG by
setting the following: NBCFG.NB_CNTL.STRAP_MSI_ENABLE='1'
Quite a few BIOS writers misinterpret this sentence and think that
enabling MSI is an optional feature. However, clearing that bit just
prevents delivery of MSI messages but does not remove the MSI PCI
capabilities registers, and so leaves these devices unusable for any
driver that attempts to use MSI.
Setting that bit is not possible after the BIOS has locked down the
configuration registers, so we have to manually disable MSI for the
affected devices.
This fixes the codec communication errors in the HDA driver when
accessing the HDMI audio device, and allows us to get rid of the
overcautious quirk in radeon_irq_kms.c.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Alex Deucher <alexdeucher@gamil.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/pci/quirks.c | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -2463,6 +2463,39 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375,
quirk_msi_intx_disable_bug);
+/*
+ * MSI does not work with the AMD RS780/RS880 internal graphics and HDMI audio
+ * devices unless the BIOS has initialized the nb_cntl.strap_msi_enable bit.
+ */
+static void __init rs780_int_gfx_disable_msi(struct pci_dev *int_gfx_bridge)
+{
+ u32 nb_cntl;
+
+ if (!int_gfx_bridge->subordinate)
+ return;
+
+ pci_bus_write_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0),
+ 0x60, 0);
+ pci_bus_read_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0),
+ 0x64, &nb_cntl);
+
+ if (!(nb_cntl & BIT(10))) {
+ dev_warn(&int_gfx_bridge->dev,
+ FW_WARN "RS780: MSI for internal graphics disabled\n");
+ int_gfx_bridge->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
+ }
+}
+
+#define PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX 0x9602
+
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,
+ PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
+ rs780_int_gfx_disable_msi);
+/* wrong vendor ID on M4A785TD motherboard: */
+DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK,
+ PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
+ rs780_int_gfx_disable_msi);
+
#endif /* CONFIG_PCI_MSI */
#ifdef CONFIG_PCI_IOV
^ permalink raw reply [flat|nested] 432+ messages in thread
* [088/116] rt2860sta: Fix argument to linux_pci_unmap_single()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (86 preceding siblings ...)
2010-03-30 22:56 ` [087/116] PCI quirk: RS780/RS880: work around missing MSI initialization Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [089/116] ath9k: fix BUG_ON triggered by PAE frames Greg KH
` (27 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, 575726, linux-wireless,
John Halton, Bartlomiej Zolnierkiewicz, Ben Hutchings,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ben Hutchings <ben@decadent.org.uk>
John Halton wrote in <http://bugs.debian.org/575726>:
> Whenever wpa_supplicant is deactivated (whether by killing the process or
> during a normal shutdown) I am getting a kerneloops that prevents the
> computer from completing shutdown. Here is the relevant syslog output:
The backtrace points to an incorrect call from RTMPFreeTxRxRingMemory()
into linux_pci_unmap_single(). This appears to have been fixed in Linux
2.6.33 by this change:
commit ca97b8388838ee9ea4b4bad04948f8f7f8a607a3
Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Date: Tue Sep 22 20:44:07 2009 +0200
Staging: rt28x0: updates from vendor's V2.1.0.0 drivers
For stable-2.6.32, just fix this one function call.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/staging/rt2860/common/2860_rtmp_init.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/staging/rt2860/common/2860_rtmp_init.c
+++ b/drivers/staging/rt2860/common/2860_rtmp_init.c
@@ -716,7 +716,7 @@ VOID RTMPFreeTxRxRingMemory(
{
if ((pAd->RxRing.Cell[index].DmaBuf.AllocVa) && (pAd->RxRing.Cell[index].pNdisPacket))
{
- PCI_UNMAP_SINGLE(pObj->pci_dev, pAd->RxRing.Cell[index].DmaBuf.AllocPa, pAd->RxRing.Cell[index].DmaBuf.AllocSize, PCI_DMA_FROMDEVICE);
+ PCI_UNMAP_SINGLE(pAd, pAd->RxRing.Cell[index].DmaBuf.AllocPa, pAd->RxRing.Cell[index].DmaBuf.AllocSize, PCI_DMA_FROMDEVICE);
RELEASE_NDIS_PACKET(pAd, pAd->RxRing.Cell[index].pNdisPacket, NDIS_STATUS_SUCCESS);
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [089/116] ath9k: fix BUG_ON triggered by PAE frames
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (87 preceding siblings ...)
2010-03-30 22:56 ` [088/116] rt2860sta: Fix argument to linux_pci_unmap_single() Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [090/116] cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node Greg KH
` (26 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Felix Fietkau,
John W. Linville, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Felix Fietkau <nbd@openwrt.org>
commit 4fdec031b9169b3c17938b9c4168f099f457169c upstream.
When I initially stumbled upon sequence number problems with PAE frames
in ath9k, I submitted a patch to remove all special cases for PAE
frames and let them go through the normal transmit path.
Out of concern about crypto incompatibility issues, this change was
merged instead:
commit 6c8afef551fef87a3bf24f8a74c69a7f2f72fc82
Author: Sujith <Sujith.Manoharan@atheros.com>
Date: Tue Feb 9 10:07:00 2010 +0530
ath9k: Fix sequence numbers for PAE frames
After a lot of testing, I'm able to reliably trigger a driver crash on
rekeying with current versions with this change in place.
It seems that the driver does not support sending out regular MPDUs with
the same TID while an A-MPDU session is active.
This leads to duplicate entries in the TID Tx buffer, which hits the
following BUG_ON in ath_tx_addto_baw():
index = ATH_BA_INDEX(tid->seq_start, bf->bf_seqno);
cindex = (tid->baw_head + index) & (ATH_TID_MAX_BUFS - 1);
BUG_ON(tid->tx_buf[cindex] != NULL);
I believe until we actually have a reproducible case of an
incompatibility with another AP using no PAE special cases, we should
simply get rid of this mess.
This patch completely fixes my crash issues in STA mode and makes it
stay connected without throughput drops or connectivity issues even
when the AP is configured to a very short group rekey interval.
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/xmit.c | 21 +--------------------
1 file changed, 1 insertion(+), 20 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1320,25 +1320,6 @@ static enum ath9k_pkt_type get_hw_packet
return htype;
}
-static bool is_pae(struct sk_buff *skb)
-{
- struct ieee80211_hdr *hdr;
- __le16 fc;
-
- hdr = (struct ieee80211_hdr *)skb->data;
- fc = hdr->frame_control;
-
- if (ieee80211_is_data(fc)) {
- if (ieee80211_is_nullfunc(fc) ||
- /* Port Access Entity (IEEE 802.1X) */
- (skb->protocol == cpu_to_be16(ETH_P_PAE))) {
- return true;
- }
- }
-
- return false;
-}
-
static int get_hw_crypto_keytype(struct sk_buff *skb)
{
struct ieee80211_tx_info *tx_info = IEEE80211_SKB_CB(skb);
@@ -1648,7 +1629,7 @@ static void ath_tx_start_dma(struct ath_
goto tx_done;
}
- if ((tx_info->flags & IEEE80211_TX_CTL_AMPDU) && !is_pae(skb)) {
+ if (tx_info->flags & IEEE80211_TX_CTL_AMPDU) {
/*
* Try aggregation if it's a unicast data frame
* and the destination is HT capable.
^ permalink raw reply [flat|nested] 432+ messages in thread
* [090/116] cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (88 preceding siblings ...)
2010-03-30 22:56 ` [089/116] ath9k: fix BUG_ON triggered by PAE frames Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [091/116] softlockup: Stop spurious softlockup messages due to overflow Greg KH
` (25 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Miao Xie, David Rientjes,
Paul Menage, Li Zefan, Ingo Molnar, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Miao Xie <miaox@cn.fujitsu.com>
commit 5ab116c9349ef52d6fbd2e2917a53f13194b048e upstream.
cpuset_mem_spread_node() returns an offline node, and causes an oops.
This patch fixes it by initializing task->mems_allowed to
node_states[N_HIGH_MEMORY], and updating task->mems_allowed when doing
memory hotplug.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Reported-by: Nick Piggin <npiggin@suse.de>
Tested-by: Nick Piggin <npiggin@suse.de>
Cc: Paul Menage <menage@google.com>
Cc: Li Zefan <lizf@cn.fujitsu.com>
Cc: Ingo Molnar <mingo@elte.hu>
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>
---
init/main.c | 2 +-
kernel/cpuset.c | 20 ++++++++++++--------
kernel/kthread.c | 2 +-
3 files changed, 14 insertions(+), 10 deletions(-)
--- a/init/main.c
+++ b/init/main.c
@@ -846,7 +846,7 @@ static int __init kernel_init(void * unu
/*
* init can allocate pages on any node
*/
- set_mems_allowed(node_possible_map);
+ set_mems_allowed(node_states[N_HIGH_MEMORY]);
/*
* init can run on any cpu.
*/
--- a/kernel/cpuset.c
+++ b/kernel/cpuset.c
@@ -921,9 +921,6 @@ static int update_cpumask(struct cpuset
* call to guarantee_online_mems(), as we know no one is changing
* our task's cpuset.
*
- * Hold callback_mutex around the two modifications of our tasks
- * mems_allowed to synchronize with cpuset_mems_allowed().
- *
* While the mm_struct we are migrating is typically from some
* other task, the task_struct mems_allowed that we are hacking
* is for our current task, which must allocate new pages for that
@@ -1392,11 +1389,10 @@ static void cpuset_attach(struct cgroup_
if (cs == &top_cpuset) {
cpumask_copy(cpus_attach, cpu_possible_mask);
- to = node_possible_map;
} else {
guarantee_online_cpus(cs, cpus_attach);
- guarantee_online_mems(cs, &to);
}
+ guarantee_online_mems(cs, &to);
/* do per-task migration stuff possibly for each in the threadgroup */
cpuset_attach_task(tsk, &to, cs);
@@ -2091,15 +2087,23 @@ static int cpuset_track_online_cpus(stru
static int cpuset_track_online_nodes(struct notifier_block *self,
unsigned long action, void *arg)
{
+ nodemask_t oldmems;
+
cgroup_lock();
switch (action) {
case MEM_ONLINE:
- case MEM_OFFLINE:
+ oldmems = top_cpuset.mems_allowed;
mutex_lock(&callback_mutex);
top_cpuset.mems_allowed = node_states[N_HIGH_MEMORY];
mutex_unlock(&callback_mutex);
- if (action == MEM_OFFLINE)
- scan_for_empty_cpusets(&top_cpuset);
+ update_tasks_nodemask(&top_cpuset, &oldmems, NULL);
+ break;
+ case MEM_OFFLINE:
+ /*
+ * needn't update top_cpuset.mems_allowed explicitly because
+ * scan_for_empty_cpusets() will update it.
+ */
+ scan_for_empty_cpusets(&top_cpuset);
break;
default:
break;
--- a/kernel/kthread.c
+++ b/kernel/kthread.c
@@ -196,7 +196,7 @@ int kthreadd(void *unused)
set_task_comm(tsk, "kthreadd");
ignore_signals(tsk);
set_cpus_allowed_ptr(tsk, cpu_all_mask);
- set_mems_allowed(node_possible_map);
+ set_mems_allowed(node_states[N_HIGH_MEMORY]);
current->flags |= PF_NOFREEZE | PF_FREEZER_NOSIG;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [091/116] softlockup: Stop spurious softlockup messages due to overflow
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (89 preceding siblings ...)
2010-03-30 22:56 ` [090/116] cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [092/116] drm/i915: Avoid NULL deref in get_pages() unwind after error Greg KH
` (24 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Colin Ian King,
Peter Zijlstra, Eric Dumazet, Ingo Molnar, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Colin Ian King <colin.king@canonical.com>
commit 8c2eb4805d422bdbf60ba00ff233c794d23c3c00 upstream.
Ensure additions on touch_ts do not overflow. This can occur
when the top 32 bits of the TSC reach 0xffffffff causing
additions to touch_ts to overflow and this in turn generates
spurious softlockup warnings.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
LKML-Reference: <1268994482.1798.6.camel@lenovo>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/softlockup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/kernel/softlockup.c
+++ b/kernel/softlockup.c
@@ -140,11 +140,11 @@ void softlockup_tick(void)
* Wake up the high-prio watchdog task twice per
* threshold timespan.
*/
- if (now > touch_timestamp + softlockup_thresh/2)
+ if (time_after(now - softlockup_thresh/2, touch_timestamp))
wake_up_process(per_cpu(watchdog_task, this_cpu));
/* Warn about unreasonable delays: */
- if (now <= (touch_timestamp + softlockup_thresh))
+ if (time_before_eq(now - softlockup_thresh, touch_timestamp))
return;
per_cpu(print_timestamp, this_cpu) = touch_timestamp;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [092/116] drm/i915: Avoid NULL deref in get_pages() unwind after error.
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (90 preceding siblings ...)
2010-03-30 22:56 ` [091/116] softlockup: Stop spurious softlockup messages due to overflow Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [093/116] netfilter: xt_recent: fix regression in rules using a zero hit_count Greg KH
` (23 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Chris Wilson, Eric Anholt,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Chris Wilson <chris@chris-wilson.co.uk>
commit 1f2b10131f83f7caa67bf1273cec126b4283015d upstream.
Fixes:
http://bugzilla.kernel.org/show_bug.cgi?id=15527
NULL pointer dereference in i915_gem_object_save_bit_17_swizzle
BUG: unable to handle kernel NULL pointer dereference at (null)
IP: [<f82b5d2b>] i915_gem_object_save_bit_17_swizzle+0x5b/0xc0 [i915]
Call Trace:
[<f82aea55>] ? i915_gem_object_put_pages+0x125/0x150 [i915]
[<f82aeb71>] ? i915_gem_object_get_pages+0xf1/0x110 [i915]
[<f82b0de8>] ? i915_gem_object_bind_to_gtt+0xb8/0x2a0 [i915]
[<c02db74d>] ? drm_mm_get_block_generic+0x4d/0x180
[<f82b11cd>] ? i915_gem_mmap_gtt_ioctl+0x16d/0x240 [i915]
[<f82ae786>] ? i915_gem_madvise_ioctl+0x86/0x120 [i915]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-by: maciej.rutecki@gmail.com
Cc: stable@kernel.org
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/i915/i915_gem.c | 21 ++++++++++++---------
1 file changed, 12 insertions(+), 9 deletions(-)
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1470,9 +1470,6 @@ i915_gem_object_put_pages(struct drm_gem
obj_priv->dirty = 0;
for (i = 0; i < page_count; i++) {
- if (obj_priv->pages[i] == NULL)
- break;
-
if (obj_priv->dirty)
set_page_dirty(obj_priv->pages[i]);
@@ -2246,7 +2243,6 @@ i915_gem_object_get_pages(struct drm_gem
struct address_space *mapping;
struct inode *inode;
struct page *page;
- int ret;
if (obj_priv->pages_refcount++ != 0)
return 0;
@@ -2269,11 +2265,9 @@ i915_gem_object_get_pages(struct drm_gem
mapping_gfp_mask (mapping) |
__GFP_COLD |
gfpmask);
- if (IS_ERR(page)) {
- ret = PTR_ERR(page);
- i915_gem_object_put_pages(obj);
- return ret;
- }
+ if (IS_ERR(page))
+ goto err_pages;
+
obj_priv->pages[i] = page;
}
@@ -2281,6 +2275,15 @@ i915_gem_object_get_pages(struct drm_gem
i915_gem_object_do_bit_17_swizzle(obj);
return 0;
+
+err_pages:
+ while (i--)
+ page_cache_release(obj_priv->pages[i]);
+
+ drm_free_large(obj_priv->pages);
+ obj_priv->pages = NULL;
+ obj_priv->pages_refcount--;
+ return PTR_ERR(page);
}
static void i965_write_fence_reg(struct drm_i915_fence_reg *reg)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [093/116] netfilter: xt_recent: fix regression in rules using a zero hit_count
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (91 preceding siblings ...)
2010-03-30 22:56 ` [092/116] drm/i915: Avoid NULL deref in get_pages() unwind after error Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [094/116] x86: Fix placement of FIX_OHCI1394_BASE Greg KH
` (22 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Patrick McHardy,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Patrick McHardy <kaber@trash.net>
commit ef1691504c83ba3eb636c0cfd3ed33f7a6d0b4ee upstream.
Commit 8ccb92ad (netfilter: xt_recent: fix false match) fixed supposedly
false matches in rules using a zero hit_count. As it turns out there is
nothing false about these matches and people are actually using entries
with a hit_count of zero to make rules dependant on addresses inserted
manually through /proc.
Since this slipped past the eyes of three reviewers, instead of
reverting the commit in question, this patch explicitly checks
for a hit_count of zero to make the intentions more clear.
Reported-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Tested-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/netfilter/xt_recent.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/net/netfilter/xt_recent.c
+++ b/net/netfilter/xt_recent.c
@@ -260,7 +260,7 @@ recent_mt(const struct sk_buff *skb, con
for (i = 0; i < e->nstamps; i++) {
if (info->seconds && time_after(time, e->stamps[i]))
continue;
- if (info->hit_count && ++hits >= info->hit_count) {
+ if (!info->hit_count || ++hits >= info->hit_count) {
ret = !ret;
break;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [094/116] x86: Fix placement of FIX_OHCI1394_BASE
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (92 preceding siblings ...)
2010-03-30 22:56 ` [093/116] netfilter: xt_recent: fix regression in rules using a zero hit_count Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [095/116] x86, amd: Restrict usage of c1e_idle() Greg KH
` (21 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jan Beulich, Ingo Molnar,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Beulich <JBeulich@novell.com>
commit ff30a0543e9a6cd732582063e7cae951cdb7acf2 upstream.
Ever for 32-bit with sufficiently high NR_CPUS, and starting
with commit 789d03f584484af85dbdc64935270c8e45f36ef7 also for
64-bit, the statically allocated early fixmap page tables were
not covering FIX_OHCI1394_BASE, leading to a boot time crash
when "ohci1394_dma=early" was used. Despite this entry not being
a permanently used one, it needs to be moved into the permanent
range since it has to be close to FIX_DBGP_BASE and
FIX_EARLYCON_MEM_BASE.
Reported-bisected-and-tested-by: Justin P. Mattock <justinmattock@gmail.com>
Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=14487
Signed-off-by: Jan Beulich <jbeulich@novell.com>
LKML-Reference: <4B9E15D30200007800034D23@vpn.id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/include/asm/fixmap.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -82,6 +82,9 @@ enum fixed_addresses {
#endif
FIX_DBGP_BASE,
FIX_EARLYCON_MEM_BASE,
+#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
+ FIX_OHCI1394_BASE,
+#endif
#ifdef CONFIG_X86_LOCAL_APIC
FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */
#endif
@@ -126,9 +129,6 @@ enum fixed_addresses {
FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 -
(__end_of_permanent_fixed_addresses & 255),
FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1,
-#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
- FIX_OHCI1394_BASE,
-#endif
#ifdef CONFIG_X86_32
FIX_WP_TEST,
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [095/116] x86, amd: Restrict usage of c1e_idle()
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (93 preceding siblings ...)
2010-03-30 22:56 ` [094/116] x86: Fix placement of FIX_OHCI1394_BASE Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [096/116] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
` (20 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andreas Herrmann,
H. Peter Anvin, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andreas Herrmann <andreas.herrmann3@amd.com>
commit 035a02c1e1de31888e8b6adac0ff667971ac04db upstream.
Currently c1e_idle returns true for all CPUs greater than or equal to
family 0xf model 0x40. This covers too many CPUs.
Meanwhile a respective erratum for the underlying problem was filed
(#400). This patch adds the logic to check whether erratum #400
applies to a given CPU.
Especially for CPUs where SMI/HW triggered C1e is not supported,
c1e_idle() doesn't need to be used. We can check this by looking at
the respective OSVW bit for erratum #400.
Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
LKML-Reference: <20100319110922.GA19614@alberich.amd.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/include/asm/msr-index.h | 2 ++
arch/x86/kernel/process.c | 32 ++++++++++++++++++++++++--------
2 files changed, 26 insertions(+), 8 deletions(-)
--- a/arch/x86/include/asm/msr-index.h
+++ b/arch/x86/include/asm/msr-index.h
@@ -104,6 +104,8 @@
#define MSR_AMD64_PATCH_LEVEL 0x0000008b
#define MSR_AMD64_NB_CFG 0xc001001f
#define MSR_AMD64_PATCH_LOADER 0xc0010020
+#define MSR_AMD64_OSVW_ID_LENGTH 0xc0010140
+#define MSR_AMD64_OSVW_STATUS 0xc0010141
#define MSR_AMD64_IBSFETCHCTL 0xc0011030
#define MSR_AMD64_IBSFETCHLINAD 0xc0011031
#define MSR_AMD64_IBSFETCHPHYSAD 0xc0011032
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -439,21 +439,37 @@ static int __cpuinit mwait_usable(const
}
/*
- * Check for AMD CPUs, which have potentially C1E support
+ * Check for AMD CPUs, where APIC timer interrupt does not wake up CPU from C1e.
+ * For more information see
+ * - Erratum #400 for NPT family 0xf and family 0x10 CPUs
+ * - Erratum #365 for family 0x11 (not affected because C1e not in use)
*/
static int __cpuinit check_c1e_idle(const struct cpuinfo_x86 *c)
{
+ u64 val;
if (c->x86_vendor != X86_VENDOR_AMD)
- return 0;
-
- if (c->x86 < 0x0F)
- return 0;
+ goto no_c1e_idle;
/* Family 0x0f models < rev F do not have C1E */
- if (c->x86 == 0x0f && c->x86_model < 0x40)
- return 0;
+ if (c->x86 == 0x0F && c->x86_model >= 0x40)
+ return 1;
+
+ if (c->x86 == 0x10) {
+ /*
+ * check OSVW bit for CPUs that are not affected
+ * by erratum #400
+ */
+ rdmsrl(MSR_AMD64_OSVW_ID_LENGTH, val);
+ if (val >= 2) {
+ rdmsrl(MSR_AMD64_OSVW_STATUS, val);
+ if (!(val & BIT(1)))
+ goto no_c1e_idle;
+ }
+ return 1;
+ }
- return 1;
+no_c1e_idle:
+ return 0;
}
static cpumask_var_t c1e_mask;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [096/116] hwmon: (coretemp) Add missing newline to dev_warn() message
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (94 preceding siblings ...)
2010-03-30 22:56 ` [095/116] x86, amd: Restrict usage of c1e_idle() Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [097/116] ALSA: hda: Use LPIB for ga-ma770-ud3 board Greg KH
` (19 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jean Delvare,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit 4d7a5644e4adfafe76c2bd8ee168e3f3b5dae3a8 upstream.
Add missing newline to dev_warn() message string. This is more of an issue
with older kernels that don't automatically add a newline if it was missing
from the end of the previous line.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/coretemp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -228,7 +228,7 @@ static int __devinit adjust_tjmax(struct
if (err) {
dev_warn(dev,
"Unable to access MSR 0xEE, for Tjmax, left"
- " at default");
+ " at default\n");
} else if (eax & 0x40000000) {
tjmax = tjmax_ee;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [097/116] ALSA: hda: Use LPIB for ga-ma770-ud3 board
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (95 preceding siblings ...)
2010-03-30 22:56 ` [096/116] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [098/116] ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist Greg KH
` (18 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit 9ec8ddad59fadd8021adfea4cb716a49b0e232e9 upstream.
BugLink: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=575669
The OR states that position_fix=1 is necessary to work around glitching
during volume adjustments using PulseAudio.
Reported-by: Carlos Laviola <claviola@debian.org>
Tested-by: Carlos Laviola <claviola@debian.org>
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/hda/hda_intel.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -2228,6 +2228,7 @@ static struct snd_pci_quirk position_fix
SND_PCI_QUIRK(0x1106, 0x3288, "ASUS M2V-MX SE", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1043, 0x813d, "ASUS P5AD2", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1028, 0x01f6, "Dell Latitude 131L", POS_FIX_LPIB),
+ SND_PCI_QUIRK(0x1458, 0xa022, "ga-ma770-ud3", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1462, 0x1002, "MSI Wind U115", POS_FIX_LPIB),
SND_PCI_QUIRK(0x1565, 0x820f, "Biostar Microtech", POS_FIX_LPIB),
SND_PCI_QUIRK(0x8086, 0xd601, "eMachines T5212", POS_FIX_LPIB),
^ permalink raw reply [flat|nested] 432+ messages in thread
* [098/116] ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (96 preceding siblings ...)
2010-03-30 22:56 ` [097/116] ALSA: hda: Use LPIB for ga-ma770-ud3 board Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [099/116] ALSA: ac97: Add IBM ThinkPad R40e to Headphone/Line Jack Sense blacklist Greg KH
` (17 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel Chen <seven.steps@gmail.com>
commit 5cd165e7057020884e430941c24454d3df9a799d upstream.
BugLink: https://launchpad.net/bugs/481058
The OR has verified that both 'Headphone Jack Sense' and 'Line Jack Sense'
need to be muted for sound to be audible, so just add the machine's SSID
to the ac97 jack sense blacklist.
Reported-by: Richard Gagne
Tested-by: Richard Gagne
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/ac97/ac97_patch.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1873,6 +1873,7 @@ static unsigned int ad1981_jacks_blackli
0x10280160, /* Dell Dimension 2400 */
0x104380b0, /* Asus A7V8X-MX */
0x11790241, /* Toshiba Satellite A-15 S127 */
+ 0x1179ff10, /* Toshiba P500 */
0x144dc01a, /* Samsung NP-X20C004/SEG */
0 /* end */
};
^ permalink raw reply [flat|nested] 432+ messages in thread
* [099/116] ALSA: ac97: Add IBM ThinkPad R40e to Headphone/Line Jack Sense blacklist
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (97 preceding siblings ...)
2010-03-30 22:56 ` [098/116] ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [100/116] ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f) Greg KH
` (16 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit e1f7f02b45cf33a774d56e505ce1718af9392f5e upstream.
BugLink: https://launchpad.net/bugs/303789
This model needs both 'Headphone Jack Sense' and 'Line Jack Sense'
muted for audible audio, so just add its SSID to the blacklist and
don't enumerate the controls.
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/ac97/ac97_patch.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/ac97/ac97_patch.c
+++ b/sound/pci/ac97/ac97_patch.c
@@ -1867,6 +1867,7 @@ static unsigned int ad1981_jacks_blackli
0x10140523, /* Thinkpad R40 */
0x10140534, /* Thinkpad X31 */
0x10140537, /* Thinkpad T41p */
+ 0x1014053e, /* Thinkpad R40e */
0x10140554, /* Thinkpad T42p/R50p */
0x10140567, /* Thinkpad T43p 2668-G7U */
0x10140581, /* Thinkpad X41-2527 */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [100/116] ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f)
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (98 preceding siblings ...)
2010-03-30 22:56 ` [099/116] ALSA: ac97: Add IBM ThinkPad R40e to Headphone/Line Jack Sense blacklist Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [101/116] ath9k: Enable TIM timer interrupt only when needed Greg KH
` (15 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Daniel T Chen, Takashi Iwai,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Daniel T Chen <crimsun@ubuntu.com>
commit 950200e2ff11daae1c5d9426703bdd494603f38b upstream.
BugLink: https://bugs.launchpad.net/bugs/418627
The original reporter states that this quirk is necessary to obtain
reasonable gain for playback. Without it, sound is inaudible. Tested
with playback (spkr and hp) and capture.
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/hda/patch_realtek.c | 1 +
1 file changed, 1 insertion(+)
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6252,6 +6252,7 @@ static const char *alc260_models[ALC260_
static struct snd_pci_quirk alc260_cfg_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x007b, "Acer C20x", ALC260_ACER),
+ SND_PCI_QUIRK(0x1025, 0x007f, "Acer", ALC260_WILL),
SND_PCI_QUIRK(0x1025, 0x008f, "Acer", ALC260_ACER),
SND_PCI_QUIRK(0x1509, 0x4540, "Favorit 100XS", ALC260_FAVORIT100),
SND_PCI_QUIRK(0x103c, 0x2808, "HP d5700", ALC260_HP_3013),
^ permalink raw reply [flat|nested] 432+ messages in thread
* [101/116] ath9k: Enable TIM timer interrupt only when needed.
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (99 preceding siblings ...)
2010-03-30 22:56 ` [100/116] ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f) Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [102/116] mac80211: Retry null data frame for power save Greg KH
` (14 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Senthil Balasubramanian,
John W. Linville, Luis R. Rodriguez, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Senthil Balasubramanian <senthilkumar@atheros.com>
commit 3f7c5c10e9dc6bf90179eb9f7c06151d508fb324 upstream.
The TIM timer interrupt is enabled even before the ACK of nullqos
is received which is unnecessary.
Also clean up the CONF_PS part of config callback properly for
better readability.
Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/ath9k.h | 1 +
drivers/net/wireless/ath/ath9k/main.c | 25 ++++++++++++++-----------
drivers/net/wireless/ath/ath9k/xmit.c | 7 +++----
3 files changed, 18 insertions(+), 15 deletions(-)
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -368,6 +368,7 @@ void ath_tx_aggr_start(struct ath_softc
u16 tid, u16 *ssn);
void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
+void ath9k_enable_ps(struct ath_softc *sc);
/********/
/* VIFs */
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -2305,6 +2305,19 @@ static void ath9k_remove_interface(struc
mutex_unlock(&sc->mutex);
}
+void ath9k_enable_ps(struct ath_softc *sc)
+{
+ sc->ps_enabled = true;
+ if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) {
+ if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
+ sc->imask |= ATH9K_INT_TIM_TIMER;
+ ath9k_hw_set_interrupts(sc->sc_ah,
+ sc->imask);
+ }
+ }
+ ath9k_hw_setrxabort(sc->sc_ah, 1);
+}
+
static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
{
struct ath_wiphy *aphy = hw->priv;
@@ -2336,19 +2349,9 @@ static int ath9k_config(struct ieee80211
if (changed & IEEE80211_CONF_CHANGE_PS) {
if (conf->flags & IEEE80211_CONF_PS) {
sc->sc_flags |= SC_OP_PS_ENABLED;
- if (!(ah->caps.hw_caps &
- ATH9K_HW_CAP_AUTOSLEEP)) {
- if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
- sc->imask |= ATH9K_INT_TIM_TIMER;
- ath9k_hw_set_interrupts(sc->sc_ah,
- sc->imask);
- }
- }
- sc->ps_enabled = true;
if ((sc->sc_flags & SC_OP_NULLFUNC_COMPLETED)) {
sc->sc_flags &= ~SC_OP_NULLFUNC_COMPLETED;
- sc->ps_enabled = true;
- ath9k_hw_setrxabort(sc->sc_ah, 1);
+ ath9k_enable_ps(sc);
}
} else {
sc->ps_enabled = false;
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -1979,10 +1979,9 @@ static void ath_tx_processq(struct ath_s
if (bf->bf_isnullfunc &&
(ds->ds_txstat.ts_status & ATH9K_TX_ACKED)) {
- if ((sc->sc_flags & SC_OP_PS_ENABLED)) {
- sc->ps_enabled = true;
- ath9k_hw_setrxabort(sc->sc_ah, 1);
- } else
+ if ((sc->sc_flags & SC_OP_PS_ENABLED))
+ ath9k_enable_ps(sc);
+ else
sc->sc_flags |= SC_OP_NULLFUNC_COMPLETED;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [102/116] mac80211: Retry null data frame for power save
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (100 preceding siblings ...)
2010-03-30 22:56 ` [101/116] ath9k: Enable TIM timer interrupt only when needed Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [103/116] ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k Greg KH
` (13 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Johannes Berg,
Vivek Natarajan, John W. Linville, Luis R. Rodriguez,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Vivek Natarajan <vnatarajan@atheros.com>
commit 375177bf35efc08e1bd37bbda4cc0c8cc4db8500 upstream.
Even if the null data frame is not acked by the AP, mac80211
goes into power save. This might lead to loss of frames
from the AP.
Prevent this by restarting dynamic_ps_timer when ack is not
received for null data frames.
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/net/mac80211.h | 4 ++++
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/main.c | 15 +++++++++++++++
net/mac80211/mlme.c | 20 +++++++++++++++-----
4 files changed, 35 insertions(+), 5 deletions(-)
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -908,6 +908,9 @@ enum ieee80211_tkip_key_type {
* @IEEE80211_HW_BEACON_FILTER:
* Hardware supports dropping of irrelevant beacon frames to
* avoid waking up cpu.
+ * @IEEE80211_HW_REPORTS_TX_ACK_STATUS:
+ * Hardware can provide ack status reports of Tx frames to
+ * the stack.
*/
enum ieee80211_hw_flags {
IEEE80211_HW_RX_INCLUDES_FCS = 1<<1,
@@ -924,6 +927,7 @@ enum ieee80211_hw_flags {
IEEE80211_HW_SUPPORTS_DYNAMIC_PS = 1<<12,
IEEE80211_HW_MFP_CAPABLE = 1<<13,
IEEE80211_HW_BEACON_FILTER = 1<<14,
+ IEEE80211_HW_REPORTS_TX_ACK_STATUS = 1<<15,
};
/**
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -264,6 +264,7 @@ enum ieee80211_sta_flags {
IEEE80211_STA_DISABLE_11N = BIT(4),
IEEE80211_STA_CSA_RECEIVED = BIT(5),
IEEE80211_STA_MFP_ENABLED = BIT(6),
+ IEEE80211_STA_NULLFUNC_ACKED = BIT(7),
};
/* flags for MLME request */
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -441,6 +441,7 @@ void ieee80211_tx_status(struct ieee8021
rcu_read_lock();
sband = local->hw.wiphy->bands[info->band];
+ fc = hdr->frame_control;
sta = sta_info_get(local, hdr->addr1);
@@ -522,6 +523,20 @@ void ieee80211_tx_status(struct ieee8021
local->dot11FailedCount++;
}
+ if (ieee80211_is_nullfunc(fc) && ieee80211_has_pm(fc) &&
+ (local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) &&
+ !(info->flags & IEEE80211_TX_CTL_INJECTED) &&
+ local->ps_sdata && !(local->scanning)) {
+ if (info->flags & IEEE80211_TX_STAT_ACK) {
+ local->ps_sdata->u.mgd.flags |=
+ IEEE80211_STA_NULLFUNC_ACKED;
+ ieee80211_queue_work(&local->hw,
+ &local->dynamic_ps_enable_work);
+ } else
+ mod_timer(&local->dynamic_ps_timer, jiffies +
+ msecs_to_jiffies(10));
+ }
+
/* this was a transmitted frame, but now we want to reuse it */
skb_orphan(skb);
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -650,8 +650,11 @@ static void ieee80211_enable_ps(struct i
} else {
if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
ieee80211_send_nullfunc(local, sdata, 1);
- conf->flags |= IEEE80211_CONF_PS;
- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+
+ if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS)) {
+ conf->flags |= IEEE80211_CONF_PS;
+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+ }
}
}
@@ -742,6 +745,7 @@ void ieee80211_dynamic_ps_enable_work(st
container_of(work, struct ieee80211_local,
dynamic_ps_enable_work);
struct ieee80211_sub_if_data *sdata = local->ps_sdata;
+ struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
/* can only happen when PS was just disabled anyway */
if (!sdata)
@@ -750,11 +754,16 @@ void ieee80211_dynamic_ps_enable_work(st
if (local->hw.conf.flags & IEEE80211_CONF_PS)
return;
- if (local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK)
+ if ((local->hw.flags & IEEE80211_HW_PS_NULLFUNC_STACK) &&
+ (!(ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)))
ieee80211_send_nullfunc(local, sdata, 1);
- local->hw.conf.flags |= IEEE80211_CONF_PS;
- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+ if (!(local->hw.flags & IEEE80211_HW_REPORTS_TX_ACK_STATUS) ||
+ (ifmgd->flags & IEEE80211_STA_NULLFUNC_ACKED)) {
+ ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
+ local->hw.conf.flags |= IEEE80211_CONF_PS;
+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_PS);
+ }
}
void ieee80211_dynamic_ps_timer(unsigned long data)
@@ -2458,6 +2467,7 @@ int ieee80211_mgd_assoc(struct ieee80211
list_add(&wk->list, &ifmgd->work_list);
ifmgd->flags &= ~IEEE80211_STA_DISABLE_11N;
+ ifmgd->flags &= ~IEEE80211_STA_NULLFUNC_ACKED;
for (i = 0; i < req->crypto.n_ciphers_pairwise; i++)
if (req->crypto.ciphers_pairwise[i] == WLAN_CIPHER_SUITE_WEP40 ||
^ permalink raw reply [flat|nested] 432+ messages in thread
* [103/116] ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (101 preceding siblings ...)
2010-03-30 22:56 ` [102/116] mac80211: Retry null data frame for power save Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [104/116] mac80211: Reset dynamic ps timer in Rx path Greg KH
` (12 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Vivek Natarajan,
John W. Linville, Luis R. Rodriguez, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
commit 05df49865be08b30e7ba91b9d3d94d7d52dd3033 upstream.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/ath/ath9k/main.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1544,6 +1544,7 @@ void ath_set_hw_capab(struct ath_softc *
IEEE80211_HW_AMPDU_AGGREGATION |
IEEE80211_HW_SUPPORTS_PS |
IEEE80211_HW_PS_NULLFUNC_STACK |
+ IEEE80211_HW_REPORTS_TX_ACK_STATUS |
IEEE80211_HW_SPECTRUM_MGMT;
if (AR_SREV_9160_10_OR_LATER(sc->sc_ah) || modparam_nohwcrypt)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [104/116] mac80211: Reset dynamic ps timer in Rx path.
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (102 preceding siblings ...)
2010-03-30 22:56 ` [103/116] ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [105/116] leds-gpio: fix default state handling on OF platforms Greg KH
` (11 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Vivek Natarajan,
John W. Linville, Luis R. Rodriguez, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Vivek Natarajan <vnatarajan@atheros.com>
commit e15276a4b220c54db665cf46a92bd9ceb9aeb052 upstream.
The current mac80211 implementation enables power save if there
is no Tx traffic for a specific timeout. Hence, PS is triggered
even if there is a continuous Rx only traffic(like UDP) going on.
This makes the drivers to wait on the tim bit in the next beacon
to awake which leads to redundant sleep-wake cycles.
Fix this by restarting the dynamic ps timer on receiving every
data packet.
Signed-off-by: Vivek Natarajan <vnatarajan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/mac80211/rx.c | 8 ++++++++
1 file changed, 8 insertions(+)
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1590,6 +1590,7 @@ static ieee80211_rx_result debug_noinlin
ieee80211_rx_h_data(struct ieee80211_rx_data *rx)
{
struct net_device *dev = rx->dev;
+ struct ieee80211_local *local = rx->local;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)rx->skb->data;
__le16 fc = hdr->frame_control;
int err;
@@ -1612,6 +1613,13 @@ ieee80211_rx_h_data(struct ieee80211_rx_
dev->stats.rx_packets++;
dev->stats.rx_bytes += rx->skb->len;
+ if (ieee80211_is_data(hdr->frame_control) &&
+ !is_multicast_ether_addr(hdr->addr1) &&
+ local->hw.conf.dynamic_ps_timeout > 0 && local->ps_sdata) {
+ mod_timer(&local->dynamic_ps_timer, jiffies +
+ msecs_to_jiffies(local->hw.conf.dynamic_ps_timeout));
+ }
+
ieee80211_deliver_skb(rx);
return RX_QUEUED;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [105/116] leds-gpio: fix default state handling on OF platforms
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (103 preceding siblings ...)
2010-03-30 22:56 ` [104/116] mac80211: Reset dynamic ps timer in Rx path Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [106/116] quota: manage reserved space when quota is not active [v2] Greg KH
` (10 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Anton Vorontsov,
Richard Purdie, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Anton Vorontsov <avorontsov@ru.mvista.com>
commit 0493a4ff10959ff4c8e0d65efee25b7ffd4fa5db upstream.
The driver wrongly sets default state for LEDs that don't specify
default-state property.
Currently the driver handles default state this way:
memset(&led, 0, sizeof(led));
for_each_child_of_node(np, child) {
state = of_get_property(child, "default-state", NULL);
if (state) {
if (!strcmp(state, "keep"))
led.default_state = LEDS_GPIO_DEFSTATE_KEEP;
...
}
ret = create_gpio_led(&led, ...);
}
Which means that all LEDs that do not specify default-state will inherit
the last value of the default-state property, which is wrong.
This patch fixes the issue by moving LED's template initialization into
the loop body.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
--- a/drivers/leds/leds-gpio.c
+++ b/drivers/leds/leds-gpio.c
@@ -211,7 +211,6 @@ static int __devinit of_gpio_leds_probe(struct of_device *ofdev,
const struct of_device_id *match)
{
struct device_node *np = ofdev->node, *child;
- struct gpio_led led;
struct gpio_led_of_platform_data *pdata;
int count = 0, ret;
@@ -226,8 +225,8 @@ static int __devinit of_gpio_leds_probe(struct of_device *ofdev,
if (!pdata)
return -ENOMEM;
- memset(&led, 0, sizeof(led));
for_each_child_of_node(np, child) {
+ struct gpio_led led = {};
enum of_gpio_flags flags;
const char *state;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [106/116] quota: manage reserved space when quota is not active [v2]
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (104 preceding siblings ...)
2010-03-30 22:56 ` [105/116] leds-gpio: fix default state handling on OF platforms Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [107/116] quota: Fix warning when a delayed write happens before quota is enabled Greg KH
` (9 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dmitry Monakhov, Jan Kara,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dmitry Monakhov <dmonakhov@openvz.org>
commit c469070aea5a0ada45a836937c776fd3083dae2b upstream.
Since we implemented generic reserved space management interface,
then it is possible to account reserved space even when quota
is not active (similar to i_blocks/i_bytes).
Without this patch following testcase result in massive comlain from
WARN_ON in dquot_claim_space()
TEST_CASE:
mount /dev/sdb /mnt -oquota
dd if=/dev/zero of=/mnt/test bs=1M count=1
quotaon /mnt
# fs_reserved_spave == 1Mb
# quota_reserved_space == 0, because quota was disabled
dd if=/dev/zero of=/mnt/test seek=1 bs=1M count=1
# fs_reserved_spave == 2Mb
# quota_reserved_space == 1Mb
sync # ->dquot_claim_space() -> WARN_ON
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/quota/dquot.c | 10 ++++++----
include/linux/quotaops.h | 11 +++++++++--
2 files changed, 15 insertions(+), 6 deletions(-)
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -1399,28 +1399,30 @@ static qsize_t *inode_reserved_space(str
return inode->i_sb->dq_op->get_reserved_space(inode);
}
-static void inode_add_rsv_space(struct inode *inode, qsize_t number)
+void inode_add_rsv_space(struct inode *inode, qsize_t number)
{
spin_lock(&inode->i_lock);
*inode_reserved_space(inode) += number;
spin_unlock(&inode->i_lock);
}
+EXPORT_SYMBOL(inode_add_rsv_space);
-
-static void inode_claim_rsv_space(struct inode *inode, qsize_t number)
+void inode_claim_rsv_space(struct inode *inode, qsize_t number)
{
spin_lock(&inode->i_lock);
*inode_reserved_space(inode) -= number;
__inode_add_bytes(inode, number);
spin_unlock(&inode->i_lock);
}
+EXPORT_SYMBOL(inode_claim_rsv_space);
-static void inode_sub_rsv_space(struct inode *inode, qsize_t number)
+void inode_sub_rsv_space(struct inode *inode, qsize_t number)
{
spin_lock(&inode->i_lock);
*inode_reserved_space(inode) -= number;
spin_unlock(&inode->i_lock);
}
+EXPORT_SYMBOL(inode_sub_rsv_space);
static qsize_t inode_get_rsv_space(struct inode *inode)
{
--- a/include/linux/quotaops.h
+++ b/include/linux/quotaops.h
@@ -26,6 +26,10 @@ static inline void writeout_quota_sb(str
sb->s_qcop->quota_sync(sb, type);
}
+void inode_add_rsv_space(struct inode *inode, qsize_t number);
+void inode_claim_rsv_space(struct inode *inode, qsize_t number);
+void inode_sub_rsv_space(struct inode *inode, qsize_t number);
+
int dquot_initialize(struct inode *inode, int type);
int dquot_drop(struct inode *inode);
struct dquot *dqget(struct super_block *sb, unsigned int id, int type);
@@ -42,7 +46,6 @@ int dquot_alloc_inode(const struct inode
int dquot_reserve_space(struct inode *inode, qsize_t number, int prealloc);
int dquot_claim_space(struct inode *inode, qsize_t number);
void dquot_release_reserved_space(struct inode *inode, qsize_t number);
-qsize_t dquot_get_reserved_space(struct inode *inode);
int dquot_free_space(struct inode *inode, qsize_t number);
int dquot_free_inode(const struct inode *inode, qsize_t number);
@@ -199,6 +202,8 @@ static inline int vfs_dq_reserve_space(s
if (inode->i_sb->dq_op->reserve_space(inode, nr, 0) == NO_QUOTA)
return 1;
}
+ else
+ inode_add_rsv_space(inode, nr);
return 0;
}
@@ -221,7 +226,7 @@ static inline int vfs_dq_claim_space(str
if (inode->i_sb->dq_op->claim_space(inode, nr) == NO_QUOTA)
return 1;
} else
- inode_add_bytes(inode, nr);
+ inode_claim_rsv_space(inode, nr);
mark_inode_dirty(inode);
return 0;
@@ -235,6 +240,8 @@ void vfs_dq_release_reservation_space(st
{
if (sb_any_quota_active(inode->i_sb))
inode->i_sb->dq_op->release_rsv(inode, nr);
+ else
+ inode_sub_rsv_space(inode, nr);
}
static inline void vfs_dq_free_space_nodirty(struct inode *inode, qsize_t nr)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [107/116] quota: Fix warning when a delayed write happens before quota is enabled
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (105 preceding siblings ...)
2010-03-30 22:56 ` [106/116] quota: manage reserved space when quota is not active [v2] Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [108/116] ahci: use BIOS date in broken_suspend list Greg KH
` (8 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jan Kara, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Kara <jack@suse.cz>
commit 0a5a9c725512461d19397490f3adf29931dca1f2 upstream.
If a delayed-allocation write happens before quota is enabled, the
kernel spits out a warning:
WARNING: at fs/quota/dquot.c:988 dquot_claim_space+0x77/0x112()
because the fact that user has some delayed allocation is not recorded
in quota structure.
Make dquot_initialize() update amount of reserved space for user if it sees
inode has some space reserved. Also make sure that reserved quota space does
not go negative and we warn about the filesystem bug just once.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/quota/dquot.c | 35 +++++++++++++++++++++++++++++++----
1 file changed, 31 insertions(+), 4 deletions(-)
--- a/fs/quota/dquot.c
+++ b/fs/quota/dquot.c
@@ -229,6 +229,8 @@ static struct hlist_head *dquot_hash;
struct dqstats dqstats;
EXPORT_SYMBOL(dqstats);
+static qsize_t inode_get_rsv_space(struct inode *inode);
+
static inline unsigned int
hashfn(const struct super_block *sb, unsigned int id, int type)
{
@@ -820,11 +822,14 @@ static int dqinit_needed(struct inode *i
static void add_dquot_ref(struct super_block *sb, int type)
{
struct inode *inode, *old_inode = NULL;
+ int reserved = 0;
spin_lock(&inode_lock);
list_for_each_entry(inode, &sb->s_inodes, i_sb_list) {
if (inode->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE|I_NEW))
continue;
+ if (unlikely(inode_get_rsv_space(inode) > 0))
+ reserved = 1;
if (!atomic_read(&inode->i_writecount))
continue;
if (!dqinit_needed(inode, type))
@@ -845,6 +850,12 @@ static void add_dquot_ref(struct super_b
}
spin_unlock(&inode_lock);
iput(old_inode);
+
+ if (reserved) {
+ printk(KERN_WARNING "VFS (%s): Writes happened before quota"
+ " was turned on thus quota information is probably "
+ "inconsistent. Please run quotacheck(8).\n", sb->s_id);
+ }
}
/*
@@ -958,10 +969,12 @@ static inline void dquot_resv_space(stru
/*
* Claim reserved quota space
*/
-static void dquot_claim_reserved_space(struct dquot *dquot,
- qsize_t number)
+static void dquot_claim_reserved_space(struct dquot *dquot, qsize_t number)
{
- WARN_ON(dquot->dq_dqb.dqb_rsvspace < number);
+ if (dquot->dq_dqb.dqb_rsvspace < number) {
+ WARN_ON_ONCE(1);
+ number = dquot->dq_dqb.dqb_rsvspace;
+ }
dquot->dq_dqb.dqb_curspace += number;
dquot->dq_dqb.dqb_rsvspace -= number;
}
@@ -969,7 +982,12 @@ static void dquot_claim_reserved_space(s
static inline
void dquot_free_reserved_space(struct dquot *dquot, qsize_t number)
{
- dquot->dq_dqb.dqb_rsvspace -= number;
+ if (dquot->dq_dqb.dqb_rsvspace >= number)
+ dquot->dq_dqb.dqb_rsvspace -= number;
+ else {
+ WARN_ON_ONCE(1);
+ dquot->dq_dqb.dqb_rsvspace = 0;
+ }
}
static void dquot_decr_inodes(struct dquot *dquot, qsize_t number)
@@ -1287,6 +1305,7 @@ static int info_bdq_free(struct dquot *d
return QUOTA_NL_BHARDBELOW;
return QUOTA_NL_NOWARN;
}
+
/*
* Initialize quota pointers in inode
* We do things in a bit complicated way but by that we avoid calling
@@ -1298,6 +1317,7 @@ int dquot_initialize(struct inode *inode
int cnt, ret = 0;
struct dquot *got[MAXQUOTAS] = { NULL, NULL };
struct super_block *sb = inode->i_sb;
+ qsize_t rsv;
/* First test before acquiring mutex - solves deadlocks when we
* re-enter the quota code and are already holding the mutex */
@@ -1332,6 +1352,13 @@ int dquot_initialize(struct inode *inode
if (!inode->i_dquot[cnt]) {
inode->i_dquot[cnt] = got[cnt];
got[cnt] = NULL;
+ /*
+ * Make quota reservation system happy if someone
+ * did a write before quota was turned on
+ */
+ rsv = inode_get_rsv_space(inode);
+ if (unlikely(rsv))
+ dquot_resv_space(inode->i_dquot[cnt], rsv);
}
}
out_err:
^ permalink raw reply [flat|nested] 432+ messages in thread
* [108/116] ahci: use BIOS date in broken_suspend list
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (106 preceding siblings ...)
2010-03-30 22:56 ` [107/116] quota: Fix warning when a delayed write happens before quota is enabled Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [109/116] Bluetooth: Fix potential bad memory access with sysfs files Greg KH
` (7 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tejun Heo, Jeff Garzik,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tejun Heo <tj@kernel.org>
commit 9deb343189b3cf45e84dd08480f330575ffe2004 upstream.
HP is recycling both DMI_PRODUCT_NAME and DMI_BIOS_VERSION making
ahci_broken_suspend() trigger for later products which are not
affected by the original problems. Match BIOS date instead of version
and add references to bko's so that full information can be found
easier later.
This fixes http://bugzilla.kernel.org/show_bug.cgi?id=15462
Signed-off-by: Tejun Heo <tj@kernel.org>
Reported-by: tigerfishdaisy@gmail.com
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/ata/ahci.c | 28 ++++++++++++++++++++--------
1 file changed, 20 insertions(+), 8 deletions(-)
--- a/drivers/ata/ahci.c
+++ b/drivers/ata/ahci.c
@@ -2831,6 +2831,14 @@ static bool ahci_broken_suspend(struct p
* On HP dv[4-6] and HDX18 with earlier BIOSen, link
* to the harddisk doesn't become online after
* resuming from STR. Warn and fail suspend.
+ *
+ * http://bugzilla.kernel.org/show_bug.cgi?id=12276
+ *
+ * Use dates instead of versions to match as HP is
+ * apparently recycling both product and version
+ * strings.
+ *
+ * http://bugzilla.kernel.org/show_bug.cgi?id=15462
*/
{
.ident = "dv4",
@@ -2839,7 +2847,7 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv4 Notebook PC"),
},
- .driver_data = "F.30", /* cutoff BIOS version */
+ .driver_data = "20090105", /* F.30 */
},
{
.ident = "dv5",
@@ -2848,7 +2856,7 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv5 Notebook PC"),
},
- .driver_data = "F.16", /* cutoff BIOS version */
+ .driver_data = "20090506", /* F.16 */
},
{
.ident = "dv6",
@@ -2857,7 +2865,7 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_PRODUCT_NAME,
"HP Pavilion dv6 Notebook PC"),
},
- .driver_data = "F.21", /* cutoff BIOS version */
+ .driver_data = "20090423", /* F.21 */
},
{
.ident = "HDX18",
@@ -2866,7 +2874,7 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_PRODUCT_NAME,
"HP HDX18 Notebook PC"),
},
- .driver_data = "F.23", /* cutoff BIOS version */
+ .driver_data = "20090430", /* F.23 */
},
/*
* Acer eMachines G725 has the same problem. BIOS
@@ -2874,6 +2882,8 @@ static bool ahci_broken_suspend(struct p
* work. Inbetween, there are V1.06, V2.06 and V3.03
* that we don't have much idea about. For now,
* blacklist anything older than V3.04.
+ *
+ * http://bugzilla.kernel.org/show_bug.cgi?id=15104
*/
{
.ident = "G725",
@@ -2881,19 +2891,21 @@ static bool ahci_broken_suspend(struct p
DMI_MATCH(DMI_SYS_VENDOR, "eMachines"),
DMI_MATCH(DMI_PRODUCT_NAME, "eMachines G725"),
},
- .driver_data = "V3.04", /* cutoff BIOS version */
+ .driver_data = "20091216", /* V3.04 */
},
{ } /* terminate list */
};
const struct dmi_system_id *dmi = dmi_first_match(sysids);
- const char *ver;
+ int year, month, date;
+ char buf[9];
if (!dmi || pdev->bus->number || pdev->devfn != PCI_DEVFN(0x1f, 2))
return false;
- ver = dmi_get_system_info(DMI_BIOS_VERSION);
+ dmi_get_date(DMI_BIOS_DATE, &year, &month, &date);
+ snprintf(buf, sizeof(buf), "%04d%02d%02d", year, month, date);
- return !ver || strcmp(ver, dmi->driver_data) < 0;
+ return strcmp(buf, dmi->driver_data) < 0;
}
static bool ahci_broken_online(struct pci_dev *pdev)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [109/116] Bluetooth: Fix potential bad memory access with sysfs files
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (107 preceding siblings ...)
2010-03-30 22:56 ` [108/116] ahci: use BIOS date in broken_suspend list Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [110/116] Bluetooth: Fix kernel crash on L2CAP stress tests Greg KH
` (6 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Marcel Holtmann,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Marcel Holtmann <marcel@holtmann.org>
commit 101545f6fef4a0a3ea8daf0b5b880df2c6a92a69 upstream.
When creating a high number of Bluetooth sockets (L2CAP, SCO
and RFCOMM) it is possible to scribble repeatedly on arbitrary
pages of memory. Ensure that the content of these sysfs files is
always less than one page. Even if this means truncating. The
files in question are scheduled to be moved over to debugfs in
the future anyway.
Based on initial patches from Neil Brown and Linus Torvalds
Reported-by: Neil Brown <neilb@suse.de>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/bluetooth/l2cap.c | 10 +++++++++-
net/bluetooth/rfcomm/core.c | 13 ++++++++++++-
net/bluetooth/rfcomm/sock.c | 11 ++++++++++-
net/bluetooth/sco.c | 11 ++++++++++-
4 files changed, 41 insertions(+), 4 deletions(-)
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -3885,16 +3885,24 @@ static ssize_t l2cap_sysfs_show(struct c
struct sock *sk;
struct hlist_node *node;
char *str = buf;
+ int size = PAGE_SIZE;
read_lock_bh(&l2cap_sk_list.lock);
sk_for_each(sk, node, &l2cap_sk_list.head) {
struct l2cap_pinfo *pi = l2cap_pi(sk);
+ int len;
- str += sprintf(str, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d %d\n",
+ len = snprintf(str, size, "%s %s %d %d 0x%4.4x 0x%4.4x %d %d %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->sk_state, __le16_to_cpu(pi->psm), pi->scid,
pi->dcid, pi->imtu, pi->omtu, pi->sec_level);
+
+ size -= len;
+ if (size <= 0)
+ break;
+
+ str += len;
}
read_unlock_bh(&l2cap_sk_list.lock);
--- a/net/bluetooth/rfcomm/core.c
+++ b/net/bluetooth/rfcomm/core.c
@@ -2096,6 +2096,7 @@ static ssize_t rfcomm_dlc_sysfs_show(str
struct rfcomm_session *s;
struct list_head *pp, *p;
char *str = buf;
+ int size = PAGE_SIZE;
rfcomm_lock();
@@ -2104,11 +2105,21 @@ static ssize_t rfcomm_dlc_sysfs_show(str
list_for_each(pp, &s->dlcs) {
struct sock *sk = s->sock->sk;
struct rfcomm_dlc *d = list_entry(pp, struct rfcomm_dlc, list);
+ int len;
- str += sprintf(str, "%s %s %ld %d %d %d %d\n",
+ len = snprintf(str, size, "%s %s %ld %d %d %d %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
d->state, d->dlci, d->mtu, d->rx_credits, d->tx_credits);
+
+ size -= len;
+ if (size <= 0)
+ break;
+
+ str += len;
}
+
+ if (size <= 0)
+ break;
}
rfcomm_unlock();
--- a/net/bluetooth/rfcomm/sock.c
+++ b/net/bluetooth/rfcomm/sock.c
@@ -1065,13 +1065,22 @@ static ssize_t rfcomm_sock_sysfs_show(st
struct sock *sk;
struct hlist_node *node;
char *str = buf;
+ int size = PAGE_SIZE;
read_lock_bh(&rfcomm_sk_list.lock);
sk_for_each(sk, node, &rfcomm_sk_list.head) {
- str += sprintf(str, "%s %s %d %d\n",
+ int len;
+
+ len = snprintf(str, size, "%s %s %d %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->sk_state, rfcomm_pi(sk)->channel);
+
+ size -= len;
+ if (size <= 0)
+ break;
+
+ str += len;
}
read_unlock_bh(&rfcomm_sk_list.lock);
--- a/net/bluetooth/sco.c
+++ b/net/bluetooth/sco.c
@@ -957,13 +957,22 @@ static ssize_t sco_sysfs_show(struct cla
struct sock *sk;
struct hlist_node *node;
char *str = buf;
+ int size = PAGE_SIZE;
read_lock_bh(&sco_sk_list.lock);
sk_for_each(sk, node, &sco_sk_list.head) {
- str += sprintf(str, "%s %s %d\n",
+ int len;
+
+ len = snprintf(str, size, "%s %s %d\n",
batostr(&bt_sk(sk)->src), batostr(&bt_sk(sk)->dst),
sk->sk_state);
+
+ size -= len;
+ if (size <= 0)
+ break;
+
+ str += len;
}
read_unlock_bh(&sco_sk_list.lock);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [110/116] Bluetooth: Fix kernel crash on L2CAP stress tests
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (108 preceding siblings ...)
2010-03-30 22:56 ` [109/116] Bluetooth: Fix potential bad memory access with sysfs files Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [111/116] [PATCH] sh: Fix zImage boot using fixed PMB Greg KH
` (5 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andrei Emeltchenko,
Gustavo F. Padovan, Marcel Holtmann, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
commit c2c77ec83bdad17fb688557b5b3fdc36661dd1c6 upstream.
Added very simple check that req buffer has enough space to
fit configuration parameters. Shall be enough to reject packets
with configuration size more than req buffer.
Crash trace below
[ 6069.659393] Unable to handle kernel paging request at virtual address 02000205
[ 6069.673034] Internal error: Oops: 805 [#1] PREEMPT
...
[ 6069.727172] PC is at l2cap_add_conf_opt+0x70/0xf0 [l2cap]
[ 6069.732604] LR is at l2cap_recv_frame+0x1350/0x2e78 [l2cap]
...
[ 6070.030303] Backtrace:
[ 6070.032806] [<bf1c2880>] (l2cap_add_conf_opt+0x0/0xf0 [l2cap]) from
[<bf1c6624>] (l2cap_recv_frame+0x1350/0x2e78 [l2cap])
[ 6070.043823] r8:dc5d3100 r7:df2a91d6 r6:00000001 r5:df2a8000 r4:00000200
[ 6070.050659] [<bf1c52d4>] (l2cap_recv_frame+0x0/0x2e78 [l2cap]) from
[<bf1c8408>] (l2cap_recv_acldata+0x2bc/0x350 [l2cap])
[ 6070.061798] [<bf1c814c>] (l2cap_recv_acldata+0x0/0x350 [l2cap]) from
[<bf0037a4>] (hci_rx_task+0x244/0x478 [bluetooth])
[ 6070.072631] r6:dc647700 r5:00000001 r4:df2ab740
[ 6070.077362] [<bf003560>] (hci_rx_task+0x0/0x478 [bluetooth]) from
[<c006b9fc>] (tasklet_action+0x78/0xd8)
[ 6070.087005] [<c006b984>] (tasklet_action+0x0/0xd8) from [<c006c160>]
Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@nokia.com>
Acked-by: Gustavo F. Padovan <gustavo@padovan.org>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
net/bluetooth/l2cap.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/net/bluetooth/l2cap.c
+++ b/net/bluetooth/l2cap.c
@@ -2813,6 +2813,11 @@ static inline int l2cap_config_rsp(struc
int len = cmd->len - sizeof(*rsp);
char req[64];
+ if (len > sizeof(req) - sizeof(struct l2cap_conf_req)) {
+ l2cap_send_disconn_req(conn, sk);
+ goto done;
+ }
+
/* throw out any old stored conf requests */
result = L2CAP_CONF_SUCCESS;
len = l2cap_parse_conf_rsp(sk, rsp->data,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [111/116] [PATCH] sh: Fix zImage boot using fixed PMB.
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (109 preceding siblings ...)
2010-03-30 22:56 ` [110/116] Bluetooth: Fix kernel crash on L2CAP stress tests Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [112/116] b43: Workaround circular locking in hw-tkip key update callback Greg KH
` (4 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Nobuhiro Iwamatsu,
Yoshihiro Shimoda, Paul Mundt, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
commit 319c2cc761505ee54a9536c5d0b9c2ee3fb33866 upstream.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/sh/boot/compressed/misc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/arch/sh/boot/compressed/misc.c
+++ b/arch/sh/boot/compressed/misc.c
@@ -132,7 +132,7 @@ void decompress_kernel(void)
output_addr = (CONFIG_MEMORY_START + 0x2000);
#else
output_addr = PHYSADDR((unsigned long)&_text+PAGE_SIZE);
-#ifdef CONFIG_29BIT
+#if defined(CONFIG_29BIT) || defined(CONFIG_PMB_FIXED)
output_addr |= P2SEG;
#endif
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [112/116] b43: Workaround circular locking in hw-tkip key update callback
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (110 preceding siblings ...)
2010-03-30 22:56 ` [111/116] [PATCH] sh: Fix zImage boot using fixed PMB Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [113/116] block: Backport of various I/O topology fixes from 2.6.33 and 2.6.34 Greg KH
` (3 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable, Greg Kroah-Hartman
Cc: stable-review, torvalds, akpm, alan, Michael Buesch,
Johannes Berg, John W. Linville
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Michael Buesch <mb@bu3sch.de>
commit 96869a39399269a776a94812e9fff3d38b47d838 upstream
The TKIP key update callback is called from the RX path, where the driver
mutex is already locked. This results in a circular locking bug.
Avoid this by removing the lock.
Johannes noted that there is a separate bug: The callback still breaks on SDIO
hardware, because SDIO hardware access needs to sleep, but we are not allowed
to sleep in the callback due to mac80211's RCU locking.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Reported-by: kecsa@kutfo.hit.bme.hu
Cc: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/b43/main.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -852,19 +852,16 @@ static void b43_op_update_tkip_key(struc
if (B43_WARN_ON(!modparam_hwtkip))
return;
- mutex_lock(&wl->mutex);
-
+ /* This is only called from the RX path through mac80211, where
+ * our mutex is already locked. */
+ B43_WARN_ON(!mutex_is_locked(&wl->mutex));
dev = wl->current_dev;
- if (!dev || b43_status(dev) < B43_STAT_INITIALIZED)
- goto out_unlock;
+ B43_WARN_ON(!dev || b43_status(dev) < B43_STAT_INITIALIZED);
keymac_write(dev, index, NULL); /* First zero out mac to avoid race */
rx_tkip_phase1_write(dev, index, iv32, phase1key);
keymac_write(dev, index, addr);
-
-out_unlock:
- mutex_unlock(&wl->mutex);
}
static void do_key_write(struct b43_wldev *dev,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [113/116] block: Backport of various I/O topology fixes from 2.6.33 and 2.6.34
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (111 preceding siblings ...)
2010-03-30 22:56 ` [112/116] b43: Workaround circular locking in hw-tkip key update callback Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [114/116] s3cmci: initialize default platform data no_wprotect and no_detect with 1 Greg KH
` (2 subsequent siblings)
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable, Mike Snitzer
Cc: stable-review, torvalds, akpm, alan, martin.petersen, jens.axboe,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
block: Backport of various I/O topology fixes from 2.6.33 and 2.6.34
The stacking code incorrectly scaled up the data offset in some cases
causing misaligned devices to report alignment. Rewrite the stacking
algorithm to remedy this.
(Upstream commit 9504e0864b58b4a304820dcf3755f1da80d5e72f)
The top device misalignment flag would not be set if the added bottom
device was already misaligned as opposed to causing a stacking failure.
Also massage the reporting so that an error is only returned if adding
the bottom device caused the misalignment. I.e. don't return an error
if the top is already flagged as misaligned.
(Upstream commit fe0b393f2c0a0d23a9bc9ed7dc51a1ee511098bd)
lcm() was defined to take integer-sized arguments. The supplied
arguments are multiplied, however, causing us to overflow given
sufficiently large input. That in turn led to incorrect optimal I/O
size reporting in some cases. Switch lcm() over to unsigned long
similar to gcd() and move the function from blk-settings.c to lib.
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Reviewed-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
block/blk-settings.c | 93 +++++++++++++++++++++++++++++++++++++--------------
include/linux/lcm.h | 8 ++++
lib/Makefile | 2 -
lib/lcm.c | 15 ++++++++
4 files changed, 92 insertions(+), 26 deletions(-)
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -8,6 +8,7 @@
#include <linux/blkdev.h>
#include <linux/bootmem.h> /* for max_pfn/max_low_pfn */
#include <linux/gcd.h>
+#include <linux/lcm.h>
#include "blk.h"
@@ -490,18 +491,31 @@ EXPORT_SYMBOL(blk_queue_stack_limits);
/**
* blk_stack_limits - adjust queue_limits for stacked devices
- * @t: the stacking driver limits (top)
- * @b: the underlying queue limits (bottom)
+ * @t: the stacking driver limits (top device)
+ * @b: the underlying queue limits (bottom, component device)
* @offset: offset to beginning of data within component device
*
* Description:
- * Merges two queue_limit structs. Returns 0 if alignment didn't
- * change. Returns -1 if adding the bottom device caused
- * misalignment.
+ * This function is used by stacking drivers like MD and DM to ensure
+ * that all component devices have compatible block sizes and
+ * alignments. The stacking driver must provide a queue_limits
+ * struct (top) and then iteratively call the stacking function for
+ * all component (bottom) devices. The stacking function will
+ * attempt to combine the values and ensure proper alignment.
+ *
+ * Returns 0 if the top and bottom queue_limits are compatible. The
+ * top device's block sizes and alignment offsets may be adjusted to
+ * ensure alignment with the bottom device. If no compatible sizes
+ * and alignments exist, -1 is returned and the resulting top
+ * queue_limits will have the misaligned flag set to indicate that
+ * the alignment_offset is undefined.
*/
int blk_stack_limits(struct queue_limits *t, struct queue_limits *b,
sector_t offset)
{
+ sector_t alignment;
+ unsigned int top, bottom, ret = 0;
+
t->max_sectors = min_not_zero(t->max_sectors, b->max_sectors);
t->max_hw_sectors = min_not_zero(t->max_hw_sectors, b->max_hw_sectors);
t->bounce_pfn = min_not_zero(t->bounce_pfn, b->bounce_pfn);
@@ -518,6 +532,26 @@ int blk_stack_limits(struct queue_limits
t->max_segment_size = min_not_zero(t->max_segment_size,
b->max_segment_size);
+ t->misaligned |= b->misaligned;
+
+ alignment = queue_limit_alignment_offset(b, offset);
+
+ /* Bottom device has different alignment. Check that it is
+ * compatible with the current top alignment.
+ */
+ if (t->alignment_offset != alignment) {
+
+ top = max(t->physical_block_size, t->io_min)
+ + t->alignment_offset;
+ bottom = max(b->physical_block_size, b->io_min) + alignment;
+
+ /* Verify that top and bottom intervals line up */
+ if (max(top, bottom) & (min(top, bottom) - 1)) {
+ t->misaligned = 1;
+ ret = -1;
+ }
+ }
+
t->logical_block_size = max(t->logical_block_size,
b->logical_block_size);
@@ -525,37 +559,46 @@ int blk_stack_limits(struct queue_limits
b->physical_block_size);
t->io_min = max(t->io_min, b->io_min);
+ t->io_opt = lcm(t->io_opt, b->io_opt);
+
t->no_cluster |= b->no_cluster;
- /* Bottom device offset aligned? */
- if (offset &&
- (offset & (b->physical_block_size - 1)) != b->alignment_offset) {
+ /* Physical block size a multiple of the logical block size? */
+ if (t->physical_block_size & (t->logical_block_size - 1)) {
+ t->physical_block_size = t->logical_block_size;
t->misaligned = 1;
- return -1;
+ ret = -1;
}
- /* If top has no alignment offset, inherit from bottom */
- if (!t->alignment_offset)
- t->alignment_offset =
- b->alignment_offset & (b->physical_block_size - 1);
+ /* Minimum I/O a multiple of the physical block size? */
+ if (t->io_min & (t->physical_block_size - 1)) {
+ t->io_min = t->physical_block_size;
+ t->misaligned = 1;
+ ret = -1;
+ }
- /* Top device aligned on logical block boundary? */
- if (t->alignment_offset & (t->logical_block_size - 1)) {
+ /* Optimal I/O a multiple of the physical block size? */
+ if (t->io_opt & (t->physical_block_size - 1)) {
+ t->io_opt = 0;
t->misaligned = 1;
- return -1;
+ ret = -1;
}
- /* Find lcm() of optimal I/O size */
- if (t->io_opt && b->io_opt)
- t->io_opt = (t->io_opt * b->io_opt) / gcd(t->io_opt, b->io_opt);
- else if (b->io_opt)
- t->io_opt = b->io_opt;
+ /* Find lowest common alignment_offset */
+ t->alignment_offset = lcm(t->alignment_offset, alignment)
+ & (max(t->physical_block_size, t->io_min) - 1);
+
+ /* Verify that new alignment_offset is on a logical block boundary */
+ if (t->alignment_offset & (t->logical_block_size - 1)) {
+ t->misaligned = 1;
+ ret = -1;
+ }
- /* Verify that optimal I/O size is a multiple of io_min */
- if (t->io_min && t->io_opt % t->io_min)
- return -1;
+ /* Discard */
+ t->max_discard_sectors = min_not_zero(t->max_discard_sectors,
+ b->max_discard_sectors);
- return 0;
+ return ret;
}
EXPORT_SYMBOL(blk_stack_limits);
--- /dev/null
+++ b/include/linux/lcm.h
@@ -0,0 +1,8 @@
+#ifndef _LCM_H
+#define _LCM_H
+
+#include <linux/compiler.h>
+
+unsigned long lcm(unsigned long a, unsigned long b) __attribute_const__;
+
+#endif /* _LCM_H */
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -21,7 +21,7 @@ lib-y += kobject.o kref.o klist.o
obj-y += bcd.o div64.o sort.o parser.o halfmd4.o debug_locks.o random32.o \
bust_spinlocks.o hexdump.o kasprintf.o bitmap.o scatterlist.o \
- string_helpers.o gcd.o
+ string_helpers.o gcd.o lcm.o
ifeq ($(CONFIG_DEBUG_KOBJECT),y)
CFLAGS_kobject.o += -DDEBUG
--- /dev/null
+++ b/lib/lcm.c
@@ -0,0 +1,15 @@
+#include <linux/kernel.h>
+#include <linux/gcd.h>
+#include <linux/module.h>
+
+/* Lowest common multiple */
+unsigned long lcm(unsigned long a, unsigned long b)
+{
+ if (a && b)
+ return (a * b) / gcd(a, b);
+ else if (b)
+ return b;
+
+ return a;
+}
+EXPORT_SYMBOL_GPL(lcm);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [114/116] s3cmci: initialize default platform data no_wprotect and no_detect with 1
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (112 preceding siblings ...)
2010-03-30 22:56 ` [113/116] block: Backport of various I/O topology fixes from 2.6.33 and 2.6.34 Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [115/116] x86: Fix sched_clock_cpu for systems with unsynchronized TSC Greg KH
2010-03-30 22:56 ` [116/116] GFS2: Skip check for mandatory locks when unlocking Greg KH
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Lars-Peter Clausen,
linux-mmc, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
commit c212808a1ba6bfba489006399b8152a047305acf upstream.
If no platform_data was givin to the device it's going to use it's default
platform data struct which has all fields initialized to zero. As a
result the driver is going to try to request gpio0 both as write protect
and card detect pin. Which of course will fail and makes the driver
unusable
Previously to the introduction of no_wprotect and no_detect the behavior
was to assume that if no platform data was given there is no write protect
or card detect pin. This patch restores that behavior.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Cc: Ben Dooks <ben-linux@fluff.org>
Cc: <linux-mmc@vger.kernel.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/mmc/host/s3cmci.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/mmc/host/s3cmci.c
+++ b/drivers/mmc/host/s3cmci.c
@@ -1361,6 +1361,8 @@ static struct mmc_host_ops s3cmci_ops =
static struct s3c24xx_mci_pdata s3cmci_def_pdata = {
/* This is currently here to avoid a number of if (host->pdata)
* checks. Any zero fields to ensure reaonable defaults are picked. */
+ .no_wprotect = 1,
+ .no_detect = 1,
};
#ifdef CONFIG_CPU_FREQ
^ permalink raw reply [flat|nested] 432+ messages in thread
* [115/116] x86: Fix sched_clock_cpu for systems with unsynchronized TSC
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (113 preceding siblings ...)
2010-03-30 22:56 ` [114/116] s3cmci: initialize default platform data no_wprotect and no_detect with 1 Greg KH
@ 2010-03-30 22:56 ` Greg KH
2010-03-30 22:56 ` [116/116] GFS2: Skip check for mandatory locks when unlocking Greg KH
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dimitri Sivanich,
Venkatesh Pallipadi, Peter Zijlstra, Ingo Molnar,
Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dimitri Sivanich <sivanich@sgi.com>
commit 14be1f7454ea96ee614467a49cf018a1a383b189 upstream.
On UV systems, the TSC is not synchronized across blades. The
sched_clock_cpu() function is returning values that can go
backwards (I've seen as much as 8 seconds) when switching
between cpus.
As each cpu comes up, early_init_intel() will currently set the
sched_clock_stable flag true. When mark_tsc_unstable() runs, it
clears the flag, but this only occurs once (the first time a cpu
comes up whose TSC is not synchronized with cpu 0). After this,
early_init_intel() will set the flag again as the next cpu comes
up.
Only set sched_clock_stable if tsc has not been marked unstable.
Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
Acked-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <20100301174815.GC8224@sgi.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/cpu/intel.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/x86/kernel/cpu/intel.c
+++ b/arch/x86/kernel/cpu/intel.c
@@ -70,7 +70,8 @@ static void __cpuinit early_init_intel(s
if (c->x86_power & (1 << 8)) {
set_cpu_cap(c, X86_FEATURE_CONSTANT_TSC);
set_cpu_cap(c, X86_FEATURE_NONSTOP_TSC);
- sched_clock_stable = 1;
+ if (!check_tsc_unstable())
+ sched_clock_stable = 1;
}
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [116/116] GFS2: Skip check for mandatory locks when unlocking
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (114 preceding siblings ...)
2010-03-30 22:56 ` [115/116] x86: Fix sched_clock_cpu for systems with unsynchronized TSC Greg KH
@ 2010-03-30 22:56 ` Greg KH
115 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:56 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Sachin Prabhu,
Steven Whitehouse, Greg Kroah-Hartman
2.6.32-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sachin Prabhu <sprabhu@redhat.com>
commit 720e7749279bde0d08684b1bb4e7a2eedeec6394 upstream.
gfs2_lock() will skip locks on file which have mode set to 02666. This is a problem in cases where the mode of the file is changed after a process has obtained a lock on the file. Such a lock will be skipped and will result in a BUG in locks_remove_flock().
gfs2_lock() should skip the check for mandatory locks when unlocking a file.
Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/gfs2/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -606,7 +606,7 @@ static int gfs2_lock(struct file *file,
if (!(fl->fl_flags & FL_POSIX))
return -ENOLCK;
- if (__mandatory_lock(&ip->i_inode))
+ if (__mandatory_lock(&ip->i_inode) && fl->fl_type != F_UNLCK)
return -ENOLCK;
if (cmd == F_CANCELLK) {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [01/89] Fix potential crash with sys_move_pages
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [02/89] futex: Handle futex value corruption gracefully Greg KH
` (87 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Hugh Dickins,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 6f5a55f1a6c5abee15a0e878e5c74d9f1569b8b0 upstream.
We incorrectly depended on the 'node_state/node_isset()' functions
testing the node range, rather than checking it explicitly. That's not
reliable, even if it might often happen to work. So do the proper
explicit test.
Reported-by: Marcus Meissner <meissner@suse.de>
Acked-and-tested-by: Brice Goglin <Brice.Goglin@inria.fr>
Acked-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/migrate.c | 3 +++
1 file changed, 3 insertions(+)
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -937,6 +937,9 @@ static int do_pages_move(struct mm_struc
goto out_pm;
err = -ENODEV;
+ if (node < 0 || node >= MAX_NUMNODES)
+ goto out_pm;
+
if (!node_state(node, N_HIGH_MEMORY))
goto out_pm;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [02/89] futex: Handle futex value corruption gracefully
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
2010-03-30 22:57 ` [01/89] Fix potential crash with sys_move_pages Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [03/89] futex: Handle user space " Greg KH
` (86 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas Gleixner, Darren Hart,
Peter Zijlstra, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
commit 59647b6ac3050dd964bc556fe6ef22f4db5b935c upstream.
The WARN_ON in lookup_pi_state which complains about a mismatch
between pi_state->owner->pid and the pid which we retrieved from the
user space futex is completely bogus.
The code just emits the warning and then continues despite the fact
that it detected an inconsistent state of the futex. A conveniant way
for user space to spam the syslog.
Replace the WARN_ON by a consistency check. If the values do not match
return -EINVAL and let user space deal with the mess it created.
This also fixes the missing task_pid_vnr() when we compare the
pi_state->owner pid with the futex value.
Reported-by: Jermome Marchand <jmarchan@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Darren Hart <dvhltc@us.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/futex.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -531,8 +531,25 @@ lookup_pi_state(u32 uval, struct futex_h
return -EINVAL;
WARN_ON(!atomic_read(&pi_state->refcount));
- WARN_ON(pid && pi_state->owner &&
- pi_state->owner->pid != pid);
+
+ /*
+ * When pi_state->owner is NULL then the owner died
+ * and another waiter is on the fly. pi_state->owner
+ * is fixed up by the task which acquires
+ * pi_state->rt_mutex.
+ *
+ * We do not check for pid == 0 which can happen when
+ * the owner died and robust_list_exit() cleared the
+ * TID.
+ */
+ if (pid && pi_state->owner) {
+ /*
+ * Bail out if user space manipulated the
+ * futex value.
+ */
+ if (pid != task_pid_vnr(pi_state->owner))
+ return -EINVAL;
+ }
atomic_inc(&pi_state->refcount);
*ps = pi_state;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [03/89] futex: Handle user space corruption gracefully
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
2010-03-30 22:57 ` [01/89] Fix potential crash with sys_move_pages Greg KH
2010-03-30 22:57 ` [02/89] futex: Handle futex value corruption gracefully Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [04/89] futex_lock_pi() key refcnt fix Greg KH
` (85 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas Gleixner, Darren Hart,
Peter Zijlstra, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Gleixner <tglx@linutronix.de>
commit 51246bfd189064079c54421507236fd2723b18f3 upstream.
If the owner of a PI futex dies we fix up the pi_state and set
pi_state->owner to NULL. When a malicious or just sloppy programmed
user space application sets the futex value to 0 e.g. by calling
pthread_mutex_init(), then the futex can be acquired again. A new
waiter manages to enqueue itself on the pi_state w/o damage, but on
unlock the kernel dereferences pi_state->owner and oopses.
Prevent this by checking pi_state->owner in the unlock path. If
pi_state->owner is not current we know that user space manipulated the
futex value. Ignore the mess and return -EINVAL.
This catches the above case and also the case where a task hijacks the
futex by setting the tid value and then tries to unlock it.
Reported-by: Jermome Marchand <jmarchan@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Darren Hart <dvhltc@us.ibm.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/futex.c | 7 +++++++
1 file changed, 7 insertions(+)
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -776,6 +776,13 @@ static int wake_futex_pi(u32 __user *uad
if (!pi_state)
return -EINVAL;
+ /*
+ * If current does not own the pi_state then the futex is
+ * inconsistent and user space fiddled with the futex value.
+ */
+ if (pi_state->owner != current)
+ return -EINVAL;
+
spin_lock(&pi_state->pi_mutex.wait_lock);
new_owner = rt_mutex_next_owner(&pi_state->pi_mutex);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [04/89] futex_lock_pi() key refcnt fix
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (2 preceding siblings ...)
2010-03-30 22:57 ` [03/89] futex: Handle user space " Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [05/89] SECURITY: selinux, fix update_rlimit_cpu parameter Greg KH
` (84 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mikael Pettersson,
Peter Zijlstra, Darren Hart, Thomas Gleixner, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mikael Pettersson <mikpe@it.uu.se>
commit 5ecb01cfdf96c5f465192bdb2a4fd4a61a24c6cc upstream.
This fixes a futex key reference count bug in futex_lock_pi(),
where a key's reference count is incremented twice but decremented
only once, causing the backing object to not be released.
If the futex is created in a temporary file in an ext3 file system,
this bug causes the file's inode to become an "undead" orphan,
which causes an oops from a BUG_ON() in ext3_put_super() when the
file system is unmounted. glibc's test suite is known to trigger this,
see <http://bugzilla.kernel.org/show_bug.cgi?id=14256>.
The bug is a regression from 2.6.28-git3, namely Peter Zijlstra's
38d47c1b7075bd7ec3881141bb3629da58f88dab "[PATCH] futex: rely on
get_user_pages() for shared futexes". That commit made get_futex_key()
also increment the reference count of the futex key, and updated its
callers to decrement the key's reference count before returning.
Unfortunately the normal exit path in futex_lock_pi() wasn't corrected:
the reference count is incremented by get_futex_key() and queue_lock(),
but the normal exit path only decrements once, via unqueue_me_pi().
The fix is to put_futex_key() after unqueue_me_pi(), since 2.6.31
this is easily done by 'goto out_put_key' rather than 'goto out'.
Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Acked-by: Darren Hart <dvhltc@us.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/futex.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/kernel/futex.c
+++ b/kernel/futex.c
@@ -1974,7 +1974,7 @@ retry_private:
/* Unqueue and drop the lock */
unqueue_me_pi(&q);
- goto out;
+ goto out_put_key;
out_unlock_put_key:
queue_unlock(&q, hb);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [05/89] SECURITY: selinux, fix update_rlimit_cpu parameter
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (3 preceding siblings ...)
2010-03-30 22:57 ` [04/89] futex_lock_pi() key refcnt fix Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [06/89] UBI: fix volume creation input checking Greg KH
` (83 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jiri Slaby, James Morris,
Stephen Smalley, Eric Paris, David Howells, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Slaby <jirislaby@gmail.com>
commit 17740d89785aeb4143770923d67c293849414710 upstream.
Don't pass current RLIMIT_RTTIME to update_rlimit_cpu() in
selinux_bprm_committing_creds, since update_rlimit_cpu expects
RLIMIT_CPU limit.
Use proper rlim[RLIMIT_CPU].rlim_cur instead to fix that.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: James Morris <jmorris@namei.org>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eric Paris <eparis@parisplace.org>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
security/selinux/hooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2360,7 +2360,7 @@ static void selinux_bprm_committing_cred
initrlim = init_task.signal->rlim + i;
rlim->rlim_cur = min(rlim->rlim_max, initrlim->rlim_cur);
}
- update_rlimit_cpu(rlim->rlim_cur);
+ update_rlimit_cpu(current->signal->rlim[RLIMIT_CPU].rlim_cur);
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [06/89] UBI: fix volume creation input checking
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (4 preceding siblings ...)
2010-03-30 22:57 ` [05/89] SECURITY: selinux, fix update_rlimit_cpu parameter Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [07/89] cciss: Make cciss_seq_show handle holes in the h->drv[] array Greg KH
` (82 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mika Westerberg,
Artem Bityutskiy, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
commit c5ce5b46af76f52dea21f467397d24c4ae6cb3ff upstream.
Do not use an unchecked variable UBI_IOCMKVOL ioctl.
Signed-off-by: Mika Westerberg <ext-mika.1.westerberg@nokia.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/mtd/ubi/cdev.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -853,7 +853,6 @@ static long ubi_cdev_ioctl(struct file *
break;
}
- req.name[req.name_len] = '\0';
err = verify_mkvol_req(ubi, &req);
if (err)
break;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [07/89] cciss: Make cciss_seq_show handle holes in the h->drv[] array
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (5 preceding siblings ...)
2010-03-30 22:57 ` [06/89] UBI: fix volume creation input checking Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [08/89] CPUFREQ: Fix use after free of struct powernow_k8_data Greg KH
` (81 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Stephen M. Cameron,
Jens Axboe, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stephen M. Cameron <scameron@beardog.cce.hp.com>
commit 531c2dc70d339c5dfa8c3eb628c3459dc6f3a075 upstream.
It is possible (and expected) for there to be holes in the h->drv[]
array, that is, some elements may be NULL pointers. cciss_seq_show
needs to be made aware of this possibility to avoid an Oops.
To reproduce the Oops which this fixes:
1) Create two "arrays" in the Array Configuratino Utility and
several logical drives on each array.
2) cat /proc/driver/cciss/cciss* in an infinite loop
3) delete some of the logical drives in the first "array."
Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/block/cciss.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/block/cciss.c
+++ b/drivers/block/cciss.c
@@ -323,6 +323,9 @@ static int cciss_seq_show(struct seq_fil
if (*pos > h->highest_lun)
return 0;
+ if (drv == NULL) /* it's possible for h->drv[] to have holes. */
+ return 0;
+
if (drv->heads == 0)
return 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [08/89] CPUFREQ: Fix use after free of struct powernow_k8_data
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (6 preceding siblings ...)
2010-03-30 22:57 ` [07/89] cciss: Make cciss_seq_show handle holes in the h->drv[] array Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [09/89] resource: add helpers for fetching rlimits Greg KH
` (80 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas Renninger, Dave Jones,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Thomas Renninger <trenn@suse.de>
commit 557a701c16553b0b691dbb64ef30361115a80f64 upstream.
Easy fix for a regression introduced in 2.6.31.
On managed CPUs the cpufreq.c core will call driver->exit(cpu) on the
managed cpus and powernow_k8 will free the core's data.
Later driver->get(cpu) function might get called trying to read out the
current freq of a managed cpu and the NULL pointer check does not work on
the freed object -> better set it to NULL.
->get() is unsigned and must return 0 as invalid frequency.
Reference:
http://bugzilla.kernel.org/show_bug.cgi?id=14391
Signed-off-by: Thomas Renninger <trenn@suse.de>
Tested-by: Michal Schmidt <mschmidt@redhat.com>
Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
+++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c
@@ -1372,6 +1372,7 @@ static int __devexit powernowk8_cpu_exit
kfree(data->powernow_table);
kfree(data);
+ per_cpu(powernow_data, pol->cpu) = NULL;
return 0;
}
@@ -1391,7 +1392,7 @@ static unsigned int powernowk8_get(unsig
int err;
if (!data)
- return -EINVAL;
+ return 0;
smp_call_function_single(cpu, query_values_on_cpu, &err, true);
if (err)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [09/89] resource: add helpers for fetching rlimits
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (7 preceding siblings ...)
2010-03-30 22:57 ` [08/89] CPUFREQ: Fix use after free of struct powernow_k8_data Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [10/89] rtc-fm3130: add missing braces Greg KH
` (79 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jiri Slaby, James Morris,
Heiko Carstens, Ingo Molnar, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Slaby <jslaby@suse.cz>
commit 3e10e716abf3c71bdb5d86b8f507f9e72236c9cd upstream.
We want to be sure that compiler fetches the limit variable only
once, so add helpers for fetching current and maximal resource
limits which do that.
Add them to sched.h (instead of resource.h) due to circular dependency
sched.h->resource.h->task_struct
Alternative would be to create a separate res_access.h or similar.
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: James Morris <jmorris@namei.org>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
include/linux/sched.h | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2485,6 +2485,28 @@ static inline void mm_init_owner(struct
#define TASK_STATE_TO_CHAR_STR "RSDTtZX"
+static inline unsigned long task_rlimit(const struct task_struct *tsk,
+ unsigned int limit)
+{
+ return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_cur);
+}
+
+static inline unsigned long task_rlimit_max(const struct task_struct *tsk,
+ unsigned int limit)
+{
+ return ACCESS_ONCE(tsk->signal->rlim[limit].rlim_max);
+}
+
+static inline unsigned long rlimit(unsigned int limit)
+{
+ return task_rlimit(current, limit);
+}
+
+static inline unsigned long rlimit_max(unsigned int limit)
+{
+ return task_rlimit_max(current, limit);
+}
+
#endif /* __KERNEL__ */
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [10/89] rtc-fm3130: add missing braces
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (8 preceding siblings ...)
2010-03-30 22:57 ` [09/89] resource: add helpers for fetching rlimits Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [11/89] ath5k: Fix eeprom checksum check for custom sized eeproms Greg KH
` (78 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Sergey Matyukevich,
Alessandro Zummo, Sergey Lapin, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sergey Matyukevich <geomatsi@gmail.com>
commit f4b5162820de60204afa5c8639335f4931b7fb0c upstream.
Add missing braces for multiline 'if' statements in fm3130_probe.
Signed-off-by: Sergey Matyukevich <geomatsi@gmail.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sergey Lapin <slapin@ossfans.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/rtc/rtc-fm3130.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/rtc/rtc-fm3130.c
+++ b/drivers/rtc/rtc-fm3130.c
@@ -376,20 +376,22 @@ static int __devinit fm3130_probe(struct
}
/* Disabling calibration mode */
- if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_CAL)
+ if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_CAL) {
i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL,
fm3130->regs[FM3130_RTC_CONTROL] &
~(FM3130_RTC_CONTROL_BIT_CAL));
dev_warn(&client->dev, "Disabling calibration mode!\n");
+ }
/* Disabling read and write modes */
if (fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_WRITE ||
- fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_READ)
+ fm3130->regs[FM3130_RTC_CONTROL] & FM3130_RTC_CONTROL_BIT_READ) {
i2c_smbus_write_byte_data(client, FM3130_RTC_CONTROL,
fm3130->regs[FM3130_RTC_CONTROL] &
~(FM3130_RTC_CONTROL_BIT_READ |
FM3130_RTC_CONTROL_BIT_WRITE));
dev_warn(&client->dev, "Disabling READ or WRITE mode!\n");
+ }
/* oscillator off? turn it on, so clock can tick. */
if (fm3130->regs[FM3130_CAL_CONTROL] & FM3130_CAL_CONTROL_BIT_nOSCEN)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [11/89] ath5k: Fix eeprom checksum check for custom sized eeproms
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (9 preceding siblings ...)
2010-03-30 22:57 ` [10/89] rtc-fm3130: add missing braces Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [12/89] clockevent: Dont remove broadcast device when cpu is dead Greg KH
` (77 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David Quan, Stephen Beahm,
Luis R. Rodriguez, John W. Linville
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Luis R. Rodriguez <lrodriguez@atheros.com>
commit 359207c687cc8f4f9845c8dadd0d6dabad44e584 upstream.
Commit 8bf3d79bc401ca417ccf9fc076d3295d1a71dbf5 enabled EEPROM
checksum checks to avoid bogus bug reports but failed to address
updating the code to consider devices with custom EEPROM sizes.
Devices with custom sized EEPROMs have the upper limit size stuffed
in the EEPROM. Use this as the upper limit instead of the static
default size. In case of a checksum error also provide back the
max size and whether or not this was the default size or a custom
one. If the EEPROM is busted we add a failsafe check to ensure
we don't loop forever or try to read bogus areas of hardware.
This closes bug 14874
http://bugzilla.kernel.org/show_bug.cgi?id=14874
Cc: stable@kernel.org
Cc: David Quan <david.quan@atheros.com>
Cc: Stephen Beahm <stephenbeahm@comcast.net>
Reported-by: Joshua Covington <joshuacov@googlemail.com>
Signed-off-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/ath/ath5k/eeprom.c | 32 +++++++++++++++++++++++++++++---
drivers/net/wireless/ath/ath5k/eeprom.h | 8 ++++++++
2 files changed, 37 insertions(+), 3 deletions(-)
--- a/drivers/net/wireless/ath/ath5k/eeprom.c
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c
@@ -97,7 +97,7 @@ ath5k_eeprom_init_header(struct ath5k_hw
struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom;
int ret;
u16 val;
- u32 cksum, offset;
+ u32 cksum, offset, eep_max = AR5K_EEPROM_INFO_MAX;
/*
* Read values from EEPROM and store them in the capability structure
@@ -116,12 +116,38 @@ ath5k_eeprom_init_header(struct ath5k_hw
* Validate the checksum of the EEPROM date. There are some
* devices with invalid EEPROMs.
*/
- for (cksum = 0, offset = 0; offset < AR5K_EEPROM_INFO_MAX; offset++) {
+ AR5K_EEPROM_READ(AR5K_EEPROM_SIZE_UPPER, val);
+ if (val) {
+ eep_max = (val & AR5K_EEPROM_SIZE_UPPER_MASK) <<
+ AR5K_EEPROM_SIZE_ENDLOC_SHIFT;
+ AR5K_EEPROM_READ(AR5K_EEPROM_SIZE_LOWER, val);
+ eep_max = (eep_max | val) - AR5K_EEPROM_INFO_BASE;
+
+ /*
+ * Fail safe check to prevent stupid loops due
+ * to busted EEPROMs. XXX: This value is likely too
+ * big still, waiting on a better value.
+ */
+ if (eep_max > (3 * AR5K_EEPROM_INFO_MAX)) {
+ ATH5K_ERR(ah->ah_sc, "Invalid max custom EEPROM size: "
+ "%d (0x%04x) max expected: %d (0x%04x)\n",
+ eep_max, eep_max,
+ 3 * AR5K_EEPROM_INFO_MAX,
+ 3 * AR5K_EEPROM_INFO_MAX);
+ return -EIO;
+ }
+ }
+
+ for (cksum = 0, offset = 0; offset < eep_max; offset++) {
AR5K_EEPROM_READ(AR5K_EEPROM_INFO(offset), val);
cksum ^= val;
}
if (cksum != AR5K_EEPROM_INFO_CKSUM) {
- ATH5K_ERR(ah->ah_sc, "Invalid EEPROM checksum 0x%04x\n", cksum);
+ ATH5K_ERR(ah->ah_sc, "Invalid EEPROM "
+ "checksum: 0x%04x eep_max: 0x%04x (%s)\n",
+ cksum, eep_max,
+ eep_max == AR5K_EEPROM_INFO_MAX ?
+ "default size" : "custom size");
return -EIO;
}
--- a/drivers/net/wireless/ath/ath5k/eeprom.h
+++ b/drivers/net/wireless/ath/ath5k/eeprom.h
@@ -34,6 +34,14 @@
#define AR5K_EEPROM_RFKILL_POLARITY_S 1
#define AR5K_EEPROM_REG_DOMAIN 0x00bf /* EEPROM regdom */
+
+/* FLASH(EEPROM) Defines for AR531X chips */
+#define AR5K_EEPROM_SIZE_LOWER 0x1b /* size info -- lower */
+#define AR5K_EEPROM_SIZE_UPPER 0x1c /* size info -- upper */
+#define AR5K_EEPROM_SIZE_UPPER_MASK 0xfff0
+#define AR5K_EEPROM_SIZE_UPPER_SHIFT 4
+#define AR5K_EEPROM_SIZE_ENDLOC_SHIFT 12
+
#define AR5K_EEPROM_CHECKSUM 0x00c0 /* EEPROM checksum */
#define AR5K_EEPROM_INFO_BASE 0x00c0 /* EEPROM header */
#define AR5K_EEPROM_INFO_MAX (0x400 - AR5K_EEPROM_INFO_BASE)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [12/89] clockevent: Dont remove broadcast device when cpu is dead
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (10 preceding siblings ...)
2010-03-30 22:57 ` [11/89] ath5k: Fix eeprom checksum check for custom sized eeproms Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [13/89] connector: Delete buggy notification code Greg KH
` (76 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Xiaotian Feng,
Thomas Gleixner, Jeff Mahoney, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Xiaotian Feng <dfeng@redhat.com>
commit ea9d8e3f45404d411c00ae67b45cc35c58265bb7 upstream.
Marc reported that the BUG_ON in clockevents_notify() triggers on his
system. This happens because the kernel tries to remove an active
clock event device (used for broadcasting) from the device list.
The handling of devices which can be used as per cpu device and as a
global broadcast device is suboptimal.
The simplest solution for now (and for stable) is to check whether the
device is used as global broadcast device, but this needs to be
revisited.
[ tglx: restored the cpuweight check and massaged the changelog ]
Reported-by: Marc Dionne <marc.c.dionne@gmail.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: Xiaotian Feng <dfeng@redhat.com>
LKML-Reference: <1262834564-13033-1-git-send-email-dfeng@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
kernel/time/clockevents.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/kernel/time/clockevents.c
+++ b/kernel/time/clockevents.c
@@ -20,6 +20,8 @@
#include <linux/sysdev.h>
#include <linux/tick.h>
+#include "tick-internal.h"
+
/* The registered clock event devices */
static LIST_HEAD(clockevent_devices);
static LIST_HEAD(clockevents_released);
@@ -258,7 +260,8 @@ void clockevents_notify(unsigned long re
cpu = *((int *)arg);
list_for_each_entry_safe(dev, tmp, &clockevent_devices, list) {
if (cpumask_test_cpu(cpu, dev->cpumask) &&
- cpumask_weight(dev->cpumask) == 1) {
+ cpumask_weight(dev->cpumask) == 1 &&
+ !tick_is_broadcast_device(dev)) {
BUG_ON(dev->mode != CLOCK_EVT_MODE_UNUSED);
list_del(&dev->list);
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [13/89] connector: Delete buggy notification code.
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (11 preceding siblings ...)
2010-03-30 22:57 ` [12/89] clockevent: Dont remove broadcast device when cpu is dead Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [14/89] KVM: x86 emulator: limit instructions to 15 bytes Greg KH
` (75 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Evgeniy Polyakov,
Greg Kroah-Hartman, David S. Miller
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Evgeniy Polyakov <zbr@ioremap.net>
commit f98bfbd78c37c5946cc53089da32a5f741efdeb7 upstream.
On Tue, Feb 02, 2010 at 02:57:14PM -0800, Greg KH (gregkh@suse.de) wrote:
> > There are at least two ways to fix it: using a big cannon and a small
> > one. The former way is to disable notification registration, since it is
> > not used by anyone at all. Second way is to check whether calling
> > process is root and its destination group is -1 (kind of priveledged
> > one) before command is dispatched to workqueue.
>
> Well if no one is using it, removing it makes the most sense, right?
>
> No objection from me, care to make up a patch either way for this?
Getting it is not used, let's drop support for notifications about
(un)registered events from connector.
Another option was to check credentials on receiving, but we can always
restore it without bugs if needed, but genetlink has a wider code base
and none complained, that userspace can not get notification when some
other clients were (un)registered.
Kudos for Sebastian Krahmer <krahmer@suse.de>, who found a bug in the
code.
Signed-off-by: Evgeniy Polyakov <zbr@ioremap.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/connector/connector.c | 175 ------------------------------------------
include/linux/connector.h | 32 -------
2 files changed, 207 deletions(-)
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -36,17 +36,6 @@ MODULE_LICENSE("GPL");
MODULE_AUTHOR("Evgeniy Polyakov <zbr@ioremap.net>");
MODULE_DESCRIPTION("Generic userspace <-> kernelspace connector.");
-static u32 cn_idx = CN_IDX_CONNECTOR;
-static u32 cn_val = CN_VAL_CONNECTOR;
-
-module_param(cn_idx, uint, 0);
-module_param(cn_val, uint, 0);
-MODULE_PARM_DESC(cn_idx, "Connector's main device idx.");
-MODULE_PARM_DESC(cn_val, "Connector's main device val.");
-
-static DEFINE_MUTEX(notify_lock);
-static LIST_HEAD(notify_list);
-
static struct cn_dev cdev;
static int cn_already_initialized;
@@ -210,54 +199,6 @@ static void cn_rx_skb(struct sk_buff *__
}
/*
- * Notification routing.
- *
- * Gets id and checks if there are notification request for it's idx
- * and val. If there are such requests notify the listeners with the
- * given notify event.
- *
- */
-static void cn_notify(struct cb_id *id, u32 notify_event)
-{
- struct cn_ctl_entry *ent;
-
- mutex_lock(¬ify_lock);
- list_for_each_entry(ent, ¬ify_list, notify_entry) {
- int i;
- struct cn_notify_req *req;
- struct cn_ctl_msg *ctl = ent->msg;
- int idx_found, val_found;
-
- idx_found = val_found = 0;
-
- req = (struct cn_notify_req *)ctl->data;
- for (i = 0; i < ctl->idx_notify_num; ++i, ++req) {
- if (id->idx >= req->first &&
- id->idx < req->first + req->range) {
- idx_found = 1;
- break;
- }
- }
-
- for (i = 0; i < ctl->val_notify_num; ++i, ++req) {
- if (id->val >= req->first &&
- id->val < req->first + req->range) {
- val_found = 1;
- break;
- }
- }
-
- if (idx_found && val_found) {
- struct cn_msg m = { .ack = notify_event, };
-
- memcpy(&m.id, id, sizeof(m.id));
- cn_netlink_send(&m, ctl->group, GFP_KERNEL);
- }
- }
- mutex_unlock(¬ify_lock);
-}
-
-/*
* Callback add routing - adds callback with given ID and name.
* If there is registered callback with the same ID it will not be added.
*
@@ -276,8 +217,6 @@ int cn_add_callback(struct cb_id *id, ch
if (err)
return err;
- cn_notify(id, 0);
-
return 0;
}
EXPORT_SYMBOL_GPL(cn_add_callback);
@@ -295,111 +234,9 @@ void cn_del_callback(struct cb_id *id)
struct cn_dev *dev = &cdev;
cn_queue_del_callback(dev->cbdev, id);
- cn_notify(id, 1);
}
EXPORT_SYMBOL_GPL(cn_del_callback);
-/*
- * Checks two connector's control messages to be the same.
- * Returns 1 if they are the same or if the first one is corrupted.
- */
-static int cn_ctl_msg_equals(struct cn_ctl_msg *m1, struct cn_ctl_msg *m2)
-{
- int i;
- struct cn_notify_req *req1, *req2;
-
- if (m1->idx_notify_num != m2->idx_notify_num)
- return 0;
-
- if (m1->val_notify_num != m2->val_notify_num)
- return 0;
-
- if (m1->len != m2->len)
- return 0;
-
- if ((m1->idx_notify_num + m1->val_notify_num) * sizeof(*req1) !=
- m1->len)
- return 1;
-
- req1 = (struct cn_notify_req *)m1->data;
- req2 = (struct cn_notify_req *)m2->data;
-
- for (i = 0; i < m1->idx_notify_num; ++i) {
- if (req1->first != req2->first || req1->range != req2->range)
- return 0;
- req1++;
- req2++;
- }
-
- for (i = 0; i < m1->val_notify_num; ++i) {
- if (req1->first != req2->first || req1->range != req2->range)
- return 0;
- req1++;
- req2++;
- }
-
- return 1;
-}
-
-/*
- * Main connector device's callback.
- *
- * Used for notification of a request's processing.
- */
-static void cn_callback(struct cn_msg *msg, struct netlink_skb_parms *nsp)
-{
- struct cn_ctl_msg *ctl;
- struct cn_ctl_entry *ent;
- u32 size;
-
- if (msg->len < sizeof(*ctl))
- return;
-
- ctl = (struct cn_ctl_msg *)msg->data;
-
- size = (sizeof(*ctl) + ((ctl->idx_notify_num +
- ctl->val_notify_num) *
- sizeof(struct cn_notify_req)));
-
- if (msg->len != size)
- return;
-
- if (ctl->len + sizeof(*ctl) != msg->len)
- return;
-
- /*
- * Remove notification.
- */
- if (ctl->group == 0) {
- struct cn_ctl_entry *n;
-
- mutex_lock(¬ify_lock);
- list_for_each_entry_safe(ent, n, ¬ify_list, notify_entry) {
- if (cn_ctl_msg_equals(ent->msg, ctl)) {
- list_del(&ent->notify_entry);
- kfree(ent);
- }
- }
- mutex_unlock(¬ify_lock);
-
- return;
- }
-
- size += sizeof(*ent);
-
- ent = kzalloc(size, GFP_KERNEL);
- if (!ent)
- return;
-
- ent->msg = (struct cn_ctl_msg *)(ent + 1);
-
- memcpy(ent->msg, ctl, size - sizeof(*ent));
-
- mutex_lock(¬ify_lock);
- list_add(&ent->notify_entry, ¬ify_list);
- mutex_unlock(¬ify_lock);
-}
-
static int cn_proc_show(struct seq_file *m, void *v)
{
struct cn_queue_dev *dev = cdev.cbdev;
@@ -437,11 +274,8 @@ static const struct file_operations cn_f
static int __devinit cn_init(void)
{
struct cn_dev *dev = &cdev;
- int err;
dev->input = cn_rx_skb;
- dev->id.idx = cn_idx;
- dev->id.val = cn_val;
dev->nls = netlink_kernel_create(&init_net, NETLINK_CONNECTOR,
CN_NETLINK_USERS + 0xf,
@@ -457,14 +291,6 @@ static int __devinit cn_init(void)
cn_already_initialized = 1;
- err = cn_add_callback(&dev->id, "connector", &cn_callback);
- if (err) {
- cn_already_initialized = 0;
- cn_queue_free_dev(dev->cbdev);
- netlink_kernel_release(dev->nls);
- return -EINVAL;
- }
-
proc_net_fops_create(&init_net, "connector", S_IRUGO, &cn_file_ops);
return 0;
@@ -478,7 +304,6 @@ static void __devexit cn_fini(void)
proc_net_remove(&init_net, "connector");
- cn_del_callback(&dev->id);
cn_queue_free_dev(dev->cbdev);
netlink_kernel_release(dev->nls);
}
--- a/include/linux/connector.h
+++ b/include/linux/connector.h
@@ -24,9 +24,6 @@
#include <linux/types.h>
-#define CN_IDX_CONNECTOR 0xffffffff
-#define CN_VAL_CONNECTOR 0xffffffff
-
/*
* Process Events connector unique ids -- used for message routing
*/
@@ -73,30 +70,6 @@ struct cn_msg {
__u8 data[0];
};
-/*
- * Notify structure - requests notification about
- * registering/unregistering idx/val in range [first, first+range].
- */
-struct cn_notify_req {
- __u32 first;
- __u32 range;
-};
-
-/*
- * Main notification control message
- * *_notify_num - number of appropriate cn_notify_req structures after
- * this struct.
- * group - notification receiver's idx.
- * len - total length of the attached data.
- */
-struct cn_ctl_msg {
- __u32 idx_notify_num;
- __u32 val_notify_num;
- __u32 group;
- __u32 len;
- __u8 data[0];
-};
-
#ifdef __KERNEL__
#include <asm/atomic.h>
@@ -149,11 +122,6 @@ struct cn_callback_entry {
u32 seq, group;
};
-struct cn_ctl_entry {
- struct list_head notify_entry;
- struct cn_ctl_msg *msg;
-};
-
struct cn_dev {
struct cb_id id;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [14/89] KVM: x86 emulator: limit instructions to 15 bytes
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (12 preceding siblings ...)
2010-03-30 22:57 ` [13/89] connector: Delete buggy notification code Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [15/89] ALSA: usb-audio - Avoid Oops after disconnect Greg KH
` (74 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Avi Kivity,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Avi Kivity <avi@redhat.com>
commit eb3c79e64a70fb8f7473e30fa07e89c1ecc2c9bb upstream
While we are never normally passed an instruction that exceeds 15 bytes,
smp games can cause us to attempt to interpret one, which will cause
large latencies in non-preempt hosts.
Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/include/asm/kvm_x86_emulate.h | 2 +-
arch/x86/kvm/x86_emulate.c | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
--- a/arch/x86/include/asm/kvm_x86_emulate.h
+++ b/arch/x86/include/asm/kvm_x86_emulate.h
@@ -129,7 +129,7 @@ struct decode_cache {
u8 seg_override;
unsigned int d;
unsigned long regs[NR_VCPU_REGS];
- unsigned long eip;
+ unsigned long eip, eip_orig;
/* modrm */
u8 modrm;
u8 modrm_mod;
--- a/arch/x86/kvm/x86_emulate.c
+++ b/arch/x86/kvm/x86_emulate.c
@@ -606,6 +606,9 @@ static int do_insn_fetch(struct x86_emul
{
int rc = 0;
+ /* x86 instructions are limited to 15 bytes. */
+ if (eip + size - ctxt->decode.eip_orig > 15)
+ return X86EMUL_UNHANDLEABLE;
eip += ctxt->cs_base;
while (size--) {
rc = do_fetch_insn_byte(ctxt, ops, eip++, dest++);
@@ -864,7 +867,7 @@ x86_decode_insn(struct x86_emulate_ctxt
/* Shadow copy of register state. Committed on successful emulation. */
memset(c, 0, sizeof(struct decode_cache));
- c->eip = kvm_rip_read(ctxt->vcpu);
+ c->eip = c->eip_orig = kvm_rip_read(ctxt->vcpu);
ctxt->cs_base = seg_base(ctxt, VCPU_SREG_CS);
memcpy(c->regs, ctxt->vcpu->arch.regs, sizeof c->regs);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [15/89] ALSA: usb-audio - Avoid Oops after disconnect
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (13 preceding siblings ...)
2010-03-30 22:57 ` [14/89] KVM: x86 emulator: limit instructions to 15 bytes Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [16/89] HID: add device IDs for new model of Apple Wireless Keyboard Greg KH
` (73 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Takashi Iwai,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Takashi Iwai <tiwai@suse.de>
commit 78b8d5d2ee280c463908fd75f3bdf246bcb6ac8d upstream.
As the release of substreams may be done asynchronously from the
disconnection, close callback needs to check the shutdown flag before
actually accessing the usb interface.
Reference: Novell bnc#505027
http://bugzilla.novell.com/show_bug.cgi?id=565027
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/usb/usbaudio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/sound/usb/usbaudio.c
+++ b/sound/usb/usbaudio.c
@@ -1934,7 +1934,7 @@ static int snd_usb_pcm_close(struct snd_
struct snd_usb_stream *as = snd_pcm_substream_chip(substream);
struct snd_usb_substream *subs = &as->substream[direction];
- if (subs->interface >= 0) {
+ if (!as->chip->shutdown && subs->interface >= 0) {
usb_set_interface(subs->dev, subs->interface, 0);
subs->interface = -1;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [16/89] HID: add device IDs for new model of Apple Wireless Keyboard
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (14 preceding siblings ...)
2010-03-30 22:57 ` [15/89] ALSA: usb-audio - Avoid Oops after disconnect Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [17/89] inotify: do not reuse watch descriptors Greg KH
` (72 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Christian Schuerer-Waldheim,
Jiri Kosina, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Christian Schuerer-Waldheim <csw@xray.at>
commit 23aeb61e7e1f02fb0f3b8f9e798e75537ca1731d upstream.
Added device IDs for the new model of the Apple Wireless Keyboard
(November 2009).
Signed-off-by: Christian Schuerer-Waldheim <csw@xray.at>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hid/hid-apple.c | 7 +++++++
drivers/hid/hid-core.c | 3 +++
drivers/hid/hid-ids.h | 3 +++
3 files changed, 13 insertions(+)
--- a/drivers/hid/hid-apple.c
+++ b/drivers/hid/hid-apple.c
@@ -431,6 +431,13 @@ static const struct hid_device_id apple_
.driver_data = APPLE_HAS_FN | APPLE_ISO_KEYBOARD },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS),
.driver_data = APPLE_HAS_FN | APPLE_RDESC_JIS },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI),
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO),
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN |
+ APPLE_ISO_KEYBOARD },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS),
+ .driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY),
.driver_data = APPLE_NUMLOCK_EMULATION | APPLE_HAS_FN },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY),
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1259,6 +1259,9 @@ static const struct hid_device_id hid_bl
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_ISO) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_WELLSPRING3_JIS) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO) },
+ { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY) },
{ HID_USB_DEVICE(USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY) },
{ HID_USB_DEVICE(USB_VENDOR_ID_BELKIN, USB_DEVICE_ID_FLIP_KVM) },
--- a/drivers/hid/hid-ids.h
+++ b/drivers/hid/hid-ids.h
@@ -88,6 +88,9 @@
#define USB_DEVICE_ID_APPLE_WELLSPRING3_ANSI 0x0236
#define USB_DEVICE_ID_APPLE_WELLSPRING3_ISO 0x0237
#define USB_DEVICE_ID_APPLE_WELLSPRING3_JIS 0x0238
+#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ANSI 0x0239
+#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_ISO 0x023a
+#define USB_DEVICE_ID_APPLE_ALU_WIRELESS_2009_JIS 0x023b
#define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY 0x030a
#define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY 0x030b
#define USB_DEVICE_ID_APPLE_ATV_IRCONTROL 0x8241
^ permalink raw reply [flat|nested] 432+ messages in thread
* [17/89] inotify: do not reuse watch descriptors
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (15 preceding siblings ...)
2010-03-30 22:57 ` [16/89] HID: add device IDs for new model of Apple Wireless Keyboard Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [18/89] inotify: only warn once for inotify problems Greg KH
` (71 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric Paris,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric Paris <eparis@redhat.com>
commit 9e572cc9877ee6c43af60778f6b8d5ba0692d935 upstream.
Since commit 7e790dd5fc937bc8d2400c30a05e32a9e9eef276 ("inotify: fix
error paths in inotify_update_watch") inotify changed the manor in which
it gave watch descriptors back to userspace. Previous to this commit
inotify acted like the following:
inotify_add_watch(X, Y, Z) = 1
inotify_rm_watch(X, 1);
inotify_add_watch(X, Y, Z) = 2
but after this patch inotify would return watch descriptors like so:
inotify_add_watch(X, Y, Z) = 1
inotify_rm_watch(X, 1);
inotify_add_watch(X, Y, Z) = 1
which I saw as equivalent to opening an fd where
open(file) = 1;
close(1);
open(file) = 1;
seemed perfectly reasonable. The issue is that quite a bit of userspace
apparently relies on the behavior in which watch descriptors will not be
quickly reused. KDE relies on it, I know some selinux packages rely on
it, and I have heard complaints from other random sources such as debian
bug 558981.
Although the man page implies what we do is ok, we broke userspace so
this patch almost reverts us to the old behavior. It is still slightly
racey and I have patches that would fix that, but they are rather large
and this will fix it for all real world cases. The race is as follows:
- task1 creates a watch and blocks in idr_new_watch() before it updates
the hint.
- task2 creates a watch and updates the hint.
- task1 updates the hint with it's older wd
- task removes the watch created by task2
- task adds a new watch and will reuse the wd originally given to task2
it requires moving some locking around the hint (last_wd) but this should
solve it for the real world and be -stable safe.
As a side effect this patch papers over a bug in the lib/idr code which
is causing a large number WARN's to pop on people's system and many
reports in kerneloops.org. I'm working on the root cause of that idr
bug seperately but this should make inotify immune to that issue.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/notify/inotify/inotify_user.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -558,7 +558,7 @@ retry:
spin_lock(&group->inotify_data.idr_lock);
ret = idr_get_new_above(&group->inotify_data.idr, &tmp_ientry->fsn_entry,
- group->inotify_data.last_wd,
+ group->inotify_data.last_wd+1,
&tmp_ientry->wd);
spin_unlock(&group->inotify_data.idr_lock);
if (ret) {
@@ -638,7 +638,7 @@ static struct fsnotify_group *inotify_ne
spin_lock_init(&group->inotify_data.idr_lock);
idr_init(&group->inotify_data.idr);
- group->inotify_data.last_wd = 1;
+ group->inotify_data.last_wd = 0;
group->inotify_data.user = user;
group->inotify_data.fa = NULL;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [18/89] inotify: only warn once for inotify problems
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (16 preceding siblings ...)
2010-03-30 22:57 ` [17/89] inotify: do not reuse watch descriptors Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [19/89] edac: i5000_edac critical fix panic out of bounds Greg KH
` (70 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric Paris,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Eric Paris <eparis@redhat.com>
commit 976ae32be45a736acd49215a7e4771ff91f161c3 upstream.
inotify will WARN() if it finds that the idr and the fsnotify internals
somehow got out of sync. It was only supposed to do this once but due
to this stupid bug it would warn every single time a problem was
detected.
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/notify/inotify/inotify_fsnotify.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/notify/inotify/inotify_fsnotify.c
+++ b/fs/notify/inotify/inotify_fsnotify.c
@@ -121,7 +121,7 @@ static int idr_callback(int id, void *p,
if (warned)
return 0;
- warned = false;
+ warned = true;
entry = p;
ientry = container_of(entry, struct inotify_inode_mark_entry, fsn_entry);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [19/89] edac: i5000_edac critical fix panic out of bounds
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (17 preceding siblings ...)
2010-03-30 22:57 ` [18/89] inotify: only warn once for inotify problems Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [20/89] [SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions Greg KH
` (69 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Tamas Vincze,
Mauro Carvalho Chehab, Doug Thompson, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Tamas Vincze <tom@vincze.org>
commit 118f3e1afd5534c15f9701f33514186cfc841a27 upstream.
EDAC MC0: INTERNAL ERROR: channel-b out of range (4 >= 4)
Kernel panic - not syncing: EDAC MC0: Uncorrected Error (XEN) Domain 0 crashed: 'noreboot' set - not rebooting.
This happens because FERR_NF_FBD bit 28 is not updated on i5000. Due to
that, both bits 28 and 29 may be equal to one, returning channel = 3. As
this value is invalid, EDAC core generates the panic.
Addresses http://bugzilla.kernel.org/show_bug.cgi?id=14568
Signed-off-by: Tamas Vincze <tom@vincze.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Doug Thompson <dougthompson@xmission.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/edac/i5000_edac.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
--- a/drivers/edac/i5000_edac.c
+++ b/drivers/edac/i5000_edac.c
@@ -577,7 +577,13 @@ static void i5000_process_nonfatal_error
debugf0("\tUncorrected bits= 0x%x\n", ue_errors);
branch = EXTRACT_FBDCHAN_INDX(info->ferr_nf_fbd);
- channel = branch;
+
+ /*
+ * According with i5000 datasheet, bit 28 has no significance
+ * for errors M4Err-M12Err and M17Err-M21Err, on FERR_NF_FBD
+ */
+ channel = branch & 2;
+
bank = NREC_BANK(info->nrecmema);
rank = NREC_RANK(info->nrecmema);
rdwr = NREC_RDWR(info->nrecmema);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [20/89] [SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (18 preceding siblings ...)
2010-03-30 22:57 ` [19/89] edac: i5000_edac critical fix panic out of bounds Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [21/89] page allocator: update NR_FREE_PAGES only when necessary Greg KH
` (68 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Bryn M. Reeves,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Bryn M. Reeves <bmr@redhat.com>
commit bb7d3f24c71e528989501617651b669fbed798cb upstream.
/sys/bus/pci/drivers/megaraid_sas/poll_mode_io defaults to being
world-writable, which seems bad (letting any user affect kernel driver
behavior).
This turns off group and user write permissions, so that on typical
production systems only root can write to it.
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/scsi/megaraid/megaraid_sas.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/scsi/megaraid/megaraid_sas.c
+++ b/drivers/scsi/megaraid/megaraid_sas.c
@@ -3451,7 +3451,7 @@ out:
return retval;
}
-static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUGO,
+static DRIVER_ATTR(poll_mode_io, S_IRUGO|S_IWUSR,
megasas_sysfs_show_poll_mode_io,
megasas_sysfs_set_poll_mode_io);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [21/89] page allocator: update NR_FREE_PAGES only when necessary
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (19 preceding siblings ...)
2010-03-30 22:57 ` [20/89] [SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [22/89] x86, apic: use physical mode for IBM summit platforms Greg KH
` (67 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro, Mel Gorman,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 6ccf80eb15ccaca4d3f1ab5162b9ded5eecd9971 upstream.
commit f2260e6b (page allocator: update NR_FREE_PAGES only as necessary)
made one minor regression. if __rmqueue() was failed, NR_FREE_PAGES stat
go wrong. this patch fixes it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Reported-by: Huang Shijie <shijie8@gmail.com>
Reviewed-by: Christoph Lameter <cl@linux-foundation.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>
---
mm/page_alloc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1167,10 +1167,10 @@ again:
}
spin_lock_irqsave(&zone->lock, flags);
page = __rmqueue(zone, order, migratetype);
- __mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order));
spin_unlock(&zone->lock);
if (!page)
goto failed;
+ __mod_zone_page_state(zone, NR_FREE_PAGES, -(1 << order));
}
__count_zone_vm_events(PGALLOC, zone, 1 << order);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [22/89] x86, apic: use physical mode for IBM summit platforms
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (20 preceding siblings ...)
2010-03-30 22:57 ` [21/89] page allocator: update NR_FREE_PAGES only when necessary Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [23/89] reiserfs: truncate blocks not used by a write Greg KH
` (66 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Suresh Siddha,
Chris McDermott, Yinghai Lu, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Suresh Siddha <suresh.b.siddha@intel.com>
commit dfea91d5a7c795fd6f4e1a97489a98e4e767463e upstream.
Chris McDermott from IBM confirmed that hurricane chipset in IBM summit
platforms doesn't support logical flat mode. Irrespective of the other
things like apic_id's, total number of logical cpu's, Linux kernel
should default to physical mode for this system.
The 32-bit kernel does so using the OEM checks for the IBM summit
platform. Add a similar OEM platform check for the 64bit kernel too.
Otherwise the linux kernel boot can hang on this platform under certain
bios/platform settings.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Tested-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Chris McDermott <lcm@linux.vnet.ibm.com>
Cc: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/kernel/apic/apic_flat_64.c | 5 +++++
1 file changed, 5 insertions(+)
--- a/arch/x86/kernel/apic/apic_flat_64.c
+++ b/arch/x86/kernel/apic/apic_flat_64.c
@@ -240,6 +240,11 @@ static int physflat_acpi_madt_oem_check(
printk(KERN_DEBUG "system APIC only can use physical flat");
return 1;
}
+
+ if (!strncmp(oem_id, "IBM", 3) && !strncmp(oem_table_id, "EXA", 3)) {
+ printk(KERN_DEBUG "IBM Summit detected, will use apic physical");
+ return 1;
+ }
#endif
return 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [23/89] reiserfs: truncate blocks not used by a write
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (21 preceding siblings ...)
2010-03-30 22:57 ` [22/89] x86, apic: use physical mode for IBM summit platforms Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [24/89] ecryptfs: initialize private persistent file before dereferencing pointer Greg KH
` (65 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jeff Mahoney, Jan Kara,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Kara <jack@suse.cz>
commit ec8e2f7466ca370f5e09000ca40a71759afc9ac8 upstream.
It can happen that write does not use all the blocks allocated in
write_begin either because of some filesystem error (like ENOSPC) or
because page with data to write has been removed from memory. We truncate
these blocks so that we don't have dangling blocks beyond i_size.
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jan Kara <jack@suse.cz>
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>
---
fs/reiserfs/inode.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -2531,6 +2531,12 @@ static int reiserfs_writepage(struct pag
return reiserfs_write_full_page(page, wbc);
}
+static void reiserfs_truncate_failed_write(struct inode *inode)
+{
+ truncate_inode_pages(inode->i_mapping, inode->i_size);
+ reiserfs_truncate_file(inode, 0);
+}
+
static int reiserfs_write_begin(struct file *file,
struct address_space *mapping,
loff_t pos, unsigned len, unsigned flags,
@@ -2597,6 +2603,8 @@ static int reiserfs_write_begin(struct f
if (ret) {
unlock_page(page);
page_cache_release(page);
+ /* Truncate allocated blocks */
+ reiserfs_truncate_failed_write(inode);
}
return ret;
}
@@ -2689,8 +2697,7 @@ static int reiserfs_write_end(struct fil
** transaction tracking stuff when the size changes. So, we have
** to do the i_size updates here.
*/
- pos += copied;
- if (pos > inode->i_size) {
+ if (pos + copied > inode->i_size) {
struct reiserfs_transaction_handle myth;
reiserfs_write_lock(inode->i_sb);
/* If the file have grown beyond the border where it
@@ -2708,7 +2715,7 @@ static int reiserfs_write_end(struct fil
goto journal_error;
}
reiserfs_update_inode_transaction(inode);
- inode->i_size = pos;
+ inode->i_size = pos + copied;
/*
* this will just nest into our transaction. It's important
* to use mark_inode_dirty so the inode gets pushed around on the
@@ -2735,6 +2742,10 @@ static int reiserfs_write_end(struct fil
out:
unlock_page(page);
page_cache_release(page);
+
+ if (pos + len > inode->i_size)
+ reiserfs_truncate_failed_write(inode);
+
return ret == 0 ? copied : ret;
journal_error:
^ permalink raw reply [flat|nested] 432+ messages in thread
* [24/89] ecryptfs: initialize private persistent file before dereferencing pointer
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (22 preceding siblings ...)
2010-03-30 22:57 ` [23/89] reiserfs: truncate blocks not used by a write Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [25/89] ecryptfs: use after free Greg KH
` (64 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Duckjin Kang, Erez Zadok,
Dustin Kirkland, Al Viro, Tyler Hicks, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Erez Zadok <ezk@cs.sunysb.edu>
commit e27759d7a333d1f25d628c4f7caf845c51be51c2 upstream.
Ecryptfs_open dereferences a pointer to the private lower file (the one
stored in the ecryptfs inode), without checking if the pointer is NULL.
Right afterward, it initializes that pointer if it is NULL. Swap order of
statements to first initialize. Bug discovered by Duckjin Kang.
Signed-off-by: Duckjin Kang <fromdj2k@gmail.com>
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
Cc: Dustin Kirkland <kirkland@canonical.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ecryptfs/file.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
--- a/fs/ecryptfs/file.c
+++ b/fs/ecryptfs/file.c
@@ -191,13 +191,6 @@ static int ecryptfs_open(struct inode *i
| ECRYPTFS_ENCRYPTED);
}
mutex_unlock(&crypt_stat->cs_mutex);
- if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_RDONLY)
- && !(file->f_flags & O_RDONLY)) {
- rc = -EPERM;
- printk(KERN_WARNING "%s: Lower persistent file is RO; eCryptfs "
- "file must hence be opened RO\n", __func__);
- goto out;
- }
if (!ecryptfs_inode_to_private(inode)->lower_file) {
rc = ecryptfs_init_persistent_file(ecryptfs_dentry);
if (rc) {
@@ -208,6 +201,13 @@ static int ecryptfs_open(struct inode *i
goto out;
}
}
+ if ((ecryptfs_inode_to_private(inode)->lower_file->f_flags & O_RDONLY)
+ && !(file->f_flags & O_RDONLY)) {
+ rc = -EPERM;
+ printk(KERN_WARNING "%s: Lower persistent file is RO; eCryptfs "
+ "file must hence be opened RO\n", __func__);
+ goto out;
+ }
ecryptfs_set_file_lower(
file, ecryptfs_inode_to_private(inode)->lower_file);
if (S_ISDIR(ecryptfs_dentry->d_inode->i_mode)) {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [25/89] ecryptfs: use after free
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (23 preceding siblings ...)
2010-03-30 22:57 ` [24/89] ecryptfs: initialize private persistent file before dereferencing pointer Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [26/89] nozomi: quick fix for the close/close bug Greg KH
` (63 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dan Carpenter, Tyler Hicks,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dan Carpenter <error27@gmail.com>
commit ece550f51ba175c14ec3ec047815927d7386ea1f upstream.
The "full_alg_name" variable is used on a couple error paths, so we
shouldn't free it until the end.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Tyler Hicks <tyhicks@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/ecryptfs/crypto.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/fs/ecryptfs/crypto.c
+++ b/fs/ecryptfs/crypto.c
@@ -1745,7 +1745,7 @@ ecryptfs_process_key_cipher(struct crypt
char *cipher_name, size_t *key_size)
{
char dummy_key[ECRYPTFS_MAX_KEY_BYTES];
- char *full_alg_name;
+ char *full_alg_name = NULL;
int rc;
*key_tfm = NULL;
@@ -1760,7 +1760,6 @@ ecryptfs_process_key_cipher(struct crypt
if (rc)
goto out;
*key_tfm = crypto_alloc_blkcipher(full_alg_name, 0, CRYPTO_ALG_ASYNC);
- kfree(full_alg_name);
if (IS_ERR(*key_tfm)) {
rc = PTR_ERR(*key_tfm);
printk(KERN_ERR "Unable to allocate crypto cipher with name "
@@ -1782,6 +1781,7 @@ ecryptfs_process_key_cipher(struct crypt
goto out;
}
out:
+ kfree(full_alg_name);
return rc;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [26/89] nozomi: quick fix for the close/close bug
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (24 preceding siblings ...)
2010-03-30 22:57 ` [25/89] ecryptfs: use after free Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [27/89] serial: 8250_pnp: use wildcard for serial Wacom tablets Greg KH
` (62 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Cox, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Cox <alan@linux.intel.com>
commit eeec32a731631a9bad9abb21c626b9f2840bee0d upstream.
Nozomi goes wrong if you get the sequence
open
open
close
[stuff]
close
which turns out to occur on some ppp type setups.
This is a quick patch up for the problem. It's not really fixing Nozomi
which completely fails to implement tty open/close semantics and all the
other needed stuff. Doing it right is a rather more invasive patch set and
not one that will backport.
Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/nozomi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/char/nozomi.c
+++ b/drivers/char/nozomi.c
@@ -1628,10 +1628,10 @@ static void ntty_close(struct tty_struct
dc->open_ttys--;
port->count--;
- tty_port_tty_set(port, NULL);
if (port->count == 0) {
DBG1("close: %d", nport->token_dl);
+ tty_port_tty_set(port, NULL);
spin_lock_irqsave(&dc->spin_mutex, flags);
dc->last_ier &= ~(nport->token_dl);
writew(dc->last_ier, dc->reg_ier);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [27/89] serial: 8250_pnp: use wildcard for serial Wacom tablets
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (25 preceding siblings ...)
2010-03-30 22:57 ` [26/89] nozomi: quick fix for the close/close bug Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [28/89] tty: fix race in tty_fasync Greg KH
` (61 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ping Cheng, Matthew Garrett,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Matthew Garrett <mjg@redhat.com>
commit 6d34855d9aa281f72c533ecb827405139d1b0fe9 upstream.
Wacom claims that the WACF namespace will always be devoted to serial
Wacom tablets. Remove the existing entries and add a wildcard to avoid
having to update the kernel every time they add a new device.
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Tested-by: Ping Cheng <pingc@wacom.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/serial/8250_pnp.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
--- a/drivers/serial/8250_pnp.c
+++ b/drivers/serial/8250_pnp.c
@@ -328,15 +328,7 @@ static const struct pnp_device_id pnp_de
/* U.S. Robotics 56K Voice INT PnP*/
{ "USR9190", 0 },
/* Wacom tablets */
- { "WACF004", 0 },
- { "WACF005", 0 },
- { "WACF006", 0 },
- { "WACF007", 0 },
- { "WACF008", 0 },
- { "WACF009", 0 },
- { "WACF00A", 0 },
- { "WACF00B", 0 },
- { "WACF00C", 0 },
+ { "WACFXXX", 0 },
/* Compaq touchscreen */
{ "FPI2002", 0 },
/* Fujitsu Stylistic touchscreens */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [28/89] tty: fix race in tty_fasync
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (26 preceding siblings ...)
2010-03-30 22:57 ` [27/89] serial: 8250_pnp: use wildcard for serial Wacom tablets Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [29/89] USB: add missing delay during remote wakeup Greg KH
` (60 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric W. Biederman, Al Viro,
Tavis Ormandy, Jeff Dike, Julien Tinnes, Matt Mackall,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Greg Kroah-Hartman <gregkh@suse.de>
commit 703625118069f9f8960d356676662d3db5a9d116 upstream.
We need to keep the lock held over the call to __f_setown() to
prevent a PID race.
Thanks to Al Viro for pointing out the problem, and to Travis for
making us look here in the first place.
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Tavis Ormandy <taviso@google.com>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Julien Tinnes <jln@google.com>
Cc: Matt Mackall <mpm@selenic.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/tty_io.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1912,8 +1912,8 @@ static int tty_fasync(int fd, struct fil
pid = task_pid(current);
type = PIDTYPE_PID;
}
- spin_unlock_irqrestore(&tty->ctrl_lock, flags);
retval = __f_setown(filp, pid, type, 0);
+ spin_unlock_irqrestore(&tty->ctrl_lock, flags);
if (retval)
goto out;
} else {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [29/89] USB: add missing delay during remote wakeup
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (27 preceding siblings ...)
2010-03-30 22:57 ` [28/89] tty: fix race in tty_fasync Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [30/89] USB: add speed values for USB 3.0 and wireless controllers Greg KH
` (59 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern, Rickard Bellini,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit 49d0f078f494b9d81e820a13dd8093a9bfb0b6b1 upstream.
This patch (as1330) fixes a bug in khbud's handling of remote
wakeups. When a device sends a remote-wakeup request, the parent hub
(or the host controller driver, for directly attached devices) begins
the resume sequence and notifies khubd when the sequence finishes. At
this point the port's SUSPEND feature is automatically turned off.
However the device needs an additional 10-ms resume-recovery time
(TRSMRCY in the USB spec). Khubd does not wait for this delay if the
SUSPEND feature is off, and as a result some devices fail to behave
properly following a remote wakeup. This patch adds the missing
delay to the remote-wakeup path.
It also extends the resume-signalling delay used by ehci-hcd and
uhci-hcd from 20 ms (the value in the spec) to 25 ms (the value we use
for non-remote-wakeup resumes). The extra time appears to help some
devices.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Rickard Bellini <rickard.bellini@ericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/hub.c | 3 +++
drivers/usb/host/ehci-hcd.c | 5 +++--
drivers/usb/host/uhci-hub.c | 2 +-
3 files changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -3188,6 +3188,9 @@ static void hub_events(void)
USB_PORT_FEAT_C_SUSPEND);
udev = hdev->children[i-1];
if (udev) {
+ /* TRSMRCY = 10 msec */
+ msleep(10);
+
usb_lock_device(udev);
ret = remote_wakeup(hdev->
children[i-1]);
--- a/drivers/usb/host/ehci-hcd.c
+++ b/drivers/usb/host/ehci-hcd.c
@@ -764,9 +764,10 @@ static irqreturn_t ehci_irq (struct usb_
/* start 20 msec resume signaling from this port,
* and make khubd collect PORT_STAT_C_SUSPEND to
- * stop that signaling.
+ * stop that signaling. Use 5 ms extra for safety,
+ * like usb_port_resume() does.
*/
- ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
+ ehci->reset_done[i] = jiffies + msecs_to_jiffies(25);
ehci_dbg (ehci, "port %d remote wakeup\n", i + 1);
mod_timer(&hcd->rh_timer, ehci->reset_done[i]);
}
--- a/drivers/usb/host/uhci-hub.c
+++ b/drivers/usb/host/uhci-hub.c
@@ -167,7 +167,7 @@ static void uhci_check_ports(struct uhci
/* Port received a wakeup request */
set_bit(port, &uhci->resuming_ports);
uhci->ports_timeout = jiffies +
- msecs_to_jiffies(20);
+ msecs_to_jiffies(25);
/* Make sure we see the port again
* after the resuming period is over. */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [30/89] USB: add speed values for USB 3.0 and wireless controllers
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (28 preceding siblings ...)
2010-03-30 22:57 ` [29/89] USB: add missing delay during remote wakeup Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [31/89] USB: Dont use GFP_KERNEL while we cannot reset a storage device Greg KH
` (58 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Sarah Sharp, David Vrabel,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Greg Kroah-Hartman <gregkh@suse.de>
commit b132b04e193908a94d95065d0628f8fb0159cc55 upstream.
These controllers say "unknown" for their speed in sysfs, which
obviously isn't correct.
Reported-by: Kurt Garloff <garloff@novell.com>
Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: David Vrabel <david.vrabel@csr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/sysfs.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/drivers/usb/core/sysfs.c
+++ b/drivers/usb/core/sysfs.c
@@ -111,6 +111,12 @@ show_speed(struct device *dev, struct de
case USB_SPEED_HIGH:
speed = "480";
break;
+ case USB_SPEED_VARIABLE:
+ speed = "480";
+ break;
+ case USB_SPEED_SUPER:
+ speed = "5000";
+ break;
default:
speed = "unknown";
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [31/89] USB: Dont use GFP_KERNEL while we cannot reset a storage device
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (29 preceding siblings ...)
2010-03-30 22:57 ` [30/89] USB: add speed values for USB 3.0 and wireless controllers Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [32/89] USB: EHCI: fix handling of unusual interrupt intervals Greg KH
` (57 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Oliver Neukum, Alan Stern,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Oliver Neukum <oliver@neukum.org>
commit acbe2febe71abb2360b008e9ab3ee5c44169f78c upstream.
Memory allocations with GFP_KERNEL can cause IO to a storage
device which can fail resulting in a need to reset the device.
Therefore GFP_KERNEL cannot be safely used between usb_lock_device()
and usb_unlock_device(). Replace by GFP_NOIO.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/devices.c | 2 +-
drivers/usb/core/message.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/usb/core/devices.c
+++ b/drivers/usb/core/devices.c
@@ -494,7 +494,7 @@ static ssize_t usb_device_dump(char __us
return 0;
/* allocate 2^1 pages = 8K (on i386);
* should be more than enough for one device */
- pages_start = (char *)__get_free_pages(GFP_KERNEL, 1);
+ pages_start = (char *)__get_free_pages(GFP_NOIO, 1);
if (!pages_start)
return -ENOMEM;
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -923,11 +923,11 @@ char *usb_cache_string(struct usb_device
if (index <= 0)
return NULL;
- buf = kmalloc(MAX_USB_STRING_SIZE, GFP_KERNEL);
+ buf = kmalloc(MAX_USB_STRING_SIZE, GFP_NOIO);
if (buf) {
len = usb_string(udev, index, buf, MAX_USB_STRING_SIZE);
if (len > 0) {
- smallbuf = kmalloc(++len, GFP_KERNEL);
+ smallbuf = kmalloc(++len, GFP_NOIO);
if (!smallbuf)
return buf;
memcpy(smallbuf, buf, len);
@@ -1694,7 +1694,7 @@ int usb_set_configuration(struct usb_dev
if (cp) {
nintf = cp->desc.bNumInterfaces;
new_interfaces = kmalloc(nintf * sizeof(*new_interfaces),
- GFP_KERNEL);
+ GFP_NOIO);
if (!new_interfaces) {
dev_err(&dev->dev, "Out of memory\n");
return -ENOMEM;
@@ -1703,7 +1703,7 @@ int usb_set_configuration(struct usb_dev
for (; n < nintf; ++n) {
new_interfaces[n] = kzalloc(
sizeof(struct usb_interface),
- GFP_KERNEL);
+ GFP_NOIO);
if (!new_interfaces[n]) {
dev_err(&dev->dev, "Out of memory\n");
ret = -ENOMEM;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [32/89] USB: EHCI: fix handling of unusual interrupt intervals
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (30 preceding siblings ...)
2010-03-30 22:57 ` [31/89] USB: Dont use GFP_KERNEL while we cannot reset a storage device Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [33/89] USB: EHCI & UHCI: fix race between root-hub suspend and port resume Greg KH
` (56 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit 1b9a38bfa6e664ff02511314f5586d711c83cc91 upstream.
This patch (as1320) fixes two problems related to interrupt-URB
scheduling in ehci-hcd.
URBs with an interval of 2 or 4 microframes aren't handled.
For the time being, the patch reduces to interval to 1 uframe.
URBs are constrained to have an interval no larger than 1024
frames by usb_submit_urb(). But some EHCI controllers allow
use of a schedule as short as 256 frames; for these
controllers we may have to decrease the interval to the
actual schedule length.
The second problem isn't very significant since few devices expose
interrupt endpoints with an interval larger than 256 frames. But the
first problem is critical; it will prevent the kernel from working
with devices having interrupt intervals of 2 or 4 uframes.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Tested-by: Glynn Farrow <farrowg@sg.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/ehci-q.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
--- a/drivers/usb/host/ehci-q.c
+++ b/drivers/usb/host/ehci-q.c
@@ -802,9 +802,10 @@ qh_make (
* But interval 1 scheduling is simpler, and
* includes high bandwidth.
*/
- dbg ("intr period %d uframes, NYET!",
- urb->interval);
- goto done;
+ urb->interval = 1;
+ } else if (qh->period > ehci->periodic_size) {
+ qh->period = ehci->periodic_size;
+ urb->interval = qh->period << 3;
}
} else {
int think_time;
@@ -827,6 +828,10 @@ qh_make (
usb_calc_bus_time (urb->dev->speed,
is_input, 0, max_packet (maxp)));
qh->period = urb->interval;
+ if (qh->period > ehci->periodic_size) {
+ qh->period = ehci->periodic_size;
+ urb->interval = qh->period;
+ }
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [33/89] USB: EHCI & UHCI: fix race between root-hub suspend and port resume
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (31 preceding siblings ...)
2010-03-30 22:57 ` [32/89] USB: EHCI: fix handling of unusual interrupt intervals Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [34/89] USB: fix bitmask merge error Greg KH
` (55 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit cec3a53c7fe794237b582e8e77fc0e48465e65ee upstream.
This patch (as1321) fixes a problem with EHCI and UHCI root-hub
suspends: If the suspend occurs while a port is trying to resume, the
resume doesn't finish and simply gets lost. When remote wakeup is
enabled, this is undesirable behavior.
The patch checks first to see if any port resumes are in progress, and
if they are then it fails the root-hub suspend with -EBUSY.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/host/ehci-hub.c | 20 +++++++++++++++++++-
drivers/usb/host/uhci-hcd.c | 15 ++++++++++++++-
2 files changed, 33 insertions(+), 2 deletions(-)
--- a/drivers/usb/host/ehci-hub.c
+++ b/drivers/usb/host/ehci-hub.c
@@ -119,9 +119,26 @@ static int ehci_bus_suspend (struct usb_
del_timer_sync(&ehci->watchdog);
del_timer_sync(&ehci->iaa_watchdog);
- port = HCS_N_PORTS (ehci->hcs_params);
spin_lock_irq (&ehci->lock);
+ /* Once the controller is stopped, port resumes that are already
+ * in progress won't complete. Hence if remote wakeup is enabled
+ * for the root hub and any ports are in the middle of a resume or
+ * remote wakeup, we must fail the suspend.
+ */
+ if (hcd->self.root_hub->do_remote_wakeup) {
+ port = HCS_N_PORTS(ehci->hcs_params);
+ while (port--) {
+ if (ehci->reset_done[port] != 0) {
+ spin_unlock_irq(&ehci->lock);
+ ehci_dbg(ehci, "suspend failed because "
+ "port %d is resuming\n",
+ port + 1);
+ return -EBUSY;
+ }
+ }
+ }
+
/* stop schedules, clean any completed work */
if (HC_IS_RUNNING(hcd->state)) {
ehci_quiesce (ehci);
@@ -137,6 +154,7 @@ static int ehci_bus_suspend (struct usb_
*/
ehci->bus_suspended = 0;
ehci->owned_ports = 0;
+ port = HCS_N_PORTS(ehci->hcs_params);
while (port--) {
u32 __iomem *reg = &ehci->regs->port_status [port];
u32 t1 = ehci_readl(ehci, reg) & ~PORT_RWC_BITS;
--- a/drivers/usb/host/uhci-hcd.c
+++ b/drivers/usb/host/uhci-hcd.c
@@ -749,7 +749,20 @@ static int uhci_rh_suspend(struct usb_hc
spin_lock_irq(&uhci->lock);
if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags))
rc = -ESHUTDOWN;
- else if (!uhci->dead)
+ else if (uhci->dead)
+ ; /* Dead controllers tell no tales */
+
+ /* Once the controller is stopped, port resumes that are already
+ * in progress won't complete. Hence if remote wakeup is enabled
+ * for the root hub and any ports are in the middle of a resume or
+ * remote wakeup, we must fail the suspend.
+ */
+ else if (hcd->self.root_hub->do_remote_wakeup &&
+ uhci->resuming_ports) {
+ dev_dbg(uhci_dev(uhci), "suspend failed because a port "
+ "is resuming\n");
+ rc = -EBUSY;
+ } else
suspend_rh(uhci, UHCI_RH_SUSPENDED);
spin_unlock_irq(&uhci->lock);
return rc;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [34/89] USB: fix bitmask merge error
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (32 preceding siblings ...)
2010-03-30 22:57 ` [33/89] USB: EHCI & UHCI: fix race between root-hub suspend and port resume Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [35/89] usb: serial: fix memory leak in generic driver Greg KH
` (54 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit a91b593edd4b3e8aa91f671b763b27b8119eb49d upstream.
This patch adds a mask bit which was mistakenly omitted from the
as1311 patch (usb-storage: add BAD_SENSE flag).
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/storage/usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -430,7 +430,8 @@ static void adjust_quirks(struct us_data
u16 vid = le16_to_cpu(us->pusb_dev->descriptor.idVendor);
u16 pid = le16_to_cpu(us->pusb_dev->descriptor.idProduct);
unsigned f = 0;
- unsigned int mask = (US_FL_SANE_SENSE | US_FL_FIX_CAPACITY |
+ unsigned int mask = (US_FL_SANE_SENSE | US_FL_BAD_SENSE |
+ US_FL_FIX_CAPACITY |
US_FL_CAPACITY_HEURISTICS | US_FL_IGNORE_DEVICE |
US_FL_NOT_LOCKABLE | US_FL_MAX_SECTORS_64 |
US_FL_CAPACITY_OK | US_FL_IGNORE_RESIDUE |
^ permalink raw reply [flat|nested] 432+ messages in thread
* [35/89] usb: serial: fix memory leak in generic driver
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (33 preceding siblings ...)
2010-03-30 22:57 ` [34/89] USB: fix bitmask merge error Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [36/89] SCSI: enclosure: fix oops while iterating enclosure_status array Greg KH
` (53 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Johan Hovold, Greg KH,
Jason Wessel, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Johan Hovold <jhovold@gmail.com>
commit 2591530204a76fecc843529ade56afe865dd2657 upstream.
Fix a regression introduced by commit
715b1dc01fe44537e8fce9566e4bb48d6821d84b ("USB: usb_debug,
usb_generic_serial: implement multi urb write").
URB transfer buffer was never freed when using multi-urb writes.
Currently the only driver enabling multi-urb writes is usb_debug.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: Greg KH <greg@kroah.com>
Acked-by: Jason Wessel <jason.wessel@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/serial/generic.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/serial/generic.c
+++ b/drivers/usb/serial/generic.c
@@ -480,6 +480,8 @@ void usb_serial_generic_write_bulk_callb
dbg("%s - port %d", __func__, port->number);
if (port->serial->type->max_in_flight_urbs) {
+ kfree(urb->transfer_buffer);
+
spin_lock_irqsave(&port->lock, flags);
--port->urbs_in_flight;
port->tx_bytes_flight -= urb->transfer_buffer_length;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [36/89] SCSI: enclosure: fix oops while iterating enclosure_status array
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (34 preceding siblings ...)
2010-03-30 22:57 ` [35/89] usb: serial: fix memory leak in generic driver Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [37/89] x86/PCI/PAT: return EINVAL for pci mmap WC request for !pat_enabled Greg KH
` (52 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, James Bottomley,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: James Bottomley <James.Bottomley@suse.de>
commit cc9b2e9f6603190c009e5d2629ce8e3f99571346 upstream.
Based on patch originally by Jeff Mahoney <jeffm@suse.com>
enclosure_status is expected to be a NULL terminated array of strings
but isn't actually NULL terminated. When writing an invalid value to
/sys/class/enclosure/.../.../status, it goes off the end of the array
and Oopses.
Fix by making the assumption true and adding NULL at the end.
Reported-by: Artur Wojcik <artur.wojcik@intel.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/misc/enclosure.c | 1 +
include/linux/enclosure.h | 2 ++
2 files changed, 3 insertions(+)
--- a/drivers/misc/enclosure.c
+++ b/drivers/misc/enclosure.c
@@ -362,6 +362,7 @@ static const char *const enclosure_statu
[ENCLOSURE_STATUS_NOT_INSTALLED] = "not installed",
[ENCLOSURE_STATUS_UNKNOWN] = "unknown",
[ENCLOSURE_STATUS_UNAVAILABLE] = "unavailable",
+ [ENCLOSURE_STATUS_MAX] = NULL,
};
static const char *const enclosure_type [] = {
--- a/include/linux/enclosure.h
+++ b/include/linux/enclosure.h
@@ -42,6 +42,8 @@ enum enclosure_status {
ENCLOSURE_STATUS_NOT_INSTALLED,
ENCLOSURE_STATUS_UNKNOWN,
ENCLOSURE_STATUS_UNAVAILABLE,
+ /* last element for counting purposes */
+ ENCLOSURE_STATUS_MAX
};
/* SFF-8485 activity light settings */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [37/89] x86/PCI/PAT: return EINVAL for pci mmap WC request for !pat_enabled
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (35 preceding siblings ...)
2010-03-30 22:57 ` [36/89] SCSI: enclosure: fix oops while iterating enclosure_status array Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [38/89] USB: fix usbstorage for 2770:915d delivers no FAT Greg KH
` (51 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Thomas Schlichter,
Suresh Siddha, Eric Anholt, Jesse Barnes, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Suresh Siddha <suresh.b.siddha@intel.com>
commit 2992e545ea006992ec9dc91c4fa996ce1e15f921 upstream.
Thomas Schlichter reported:
> X.org uses libpciaccess which tries to mmap with write combining enabled via
> /sys/bus/pci/devices/*/resource0_wc. Currently, when PAT is not enabled, the
> kernel does fall back to uncached mmap. Then libpciaccess thinks it succeeded
> mapping with write combining enabled and does not set up suited MTRR entries.
> ;-(
Instead of silently mapping pci mmap region as UC minus in the case
of !pat_enabled and wc request, we can return error. Eric Anholt mentioned
that caller (like X) typically follows up with UC minus pci mmap request and
if there is a free mtrr slot, caller will manage adding WC mtrr.
Jesse Barnes says:
> Older versions of libpciaccess will behave better if we do it that way
> (iirc it only allocates an MTRR if the resource_wc file doesn't exist or
> fails to get mapped).
Reported-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Thomas Schlichter <thomas.schlichter@web.de>
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Acked-by: Eric Anholt <eric@anholt.net>
Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/pci/i386.c | 9 +++++++++
1 file changed, 9 insertions(+)
--- a/arch/x86/pci/i386.c
+++ b/arch/x86/pci/i386.c
@@ -282,6 +282,15 @@ int pci_mmap_page_range(struct pci_dev *
return -EINVAL;
prot = pgprot_val(vma->vm_page_prot);
+
+ /*
+ * Return error if pat is not enabled and write_combine is requested.
+ * Caller can followup with UC MINUS request and add a WC mtrr if there
+ * is a free mtrr slot.
+ */
+ if (!pat_enabled && write_combine)
+ return -EINVAL;
+
if (pat_enabled && write_combine)
prot |= _PAGE_CACHE_WC;
else if (pat_enabled || boot_cpu_data.x86 > 3)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [38/89] USB: fix usbstorage for 2770:915d delivers no FAT
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (36 preceding siblings ...)
2010-03-30 22:57 ` [37/89] x86/PCI/PAT: return EINVAL for pci mmap WC request for !pat_enabled Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [39/89] vmalloc: remove BUG_ON due to racy counting of VM_LAZY_FREE Greg KH
` (50 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ryan May, Rohan Hart,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ryan May <rmay31@gmail.com>
commit 10d2cdb6102669279bee2d9a00a22431b74583d5 upstream.
Resolves kernel.org bug 14914.
Remove entry for 2770:915d (usb digital camera with mass storage
support) from unusual_devs.h. The fix triggered by the entry causes
the file system on the camera to be completely inaccessible (no
partition table, the device is not mountable).
The patch works, but let me clarify a few things about it. All the
patch does is remove the entry for this device from the
drivers/usb/storage/unusual_devs.h, which is supposed to help with a
problem with the device's reported size (I think). I'm pretty sure it
was originally added for a reason, so I'm not sure removing it won't
cause other problems to reappear. Also, I should note that this
unusual_devs.h entry was present (and activating workarounds) in
2.6.29, but in that version everything works fine. Starting with
2.6.30, things no longer work.
Signed-off-by: Ryan May <rmay31@gmail.com>
Cc: Rohan Hart <rohan.hart17@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/storage/unusual_devs.h | 7 -------
1 file changed, 7 deletions(-)
--- a/drivers/usb/storage/unusual_devs.h
+++ b/drivers/usb/storage/unusual_devs.h
@@ -1827,13 +1827,6 @@ UNUSUAL_DEV( 0x2735, 0x100b, 0x0000, 0x
US_SC_DEVICE, US_PR_DEVICE, NULL,
US_FL_GO_SLOW ),
-/* Reported by Rohan Hart <rohan.hart17@gmail.com> */
-UNUSUAL_DEV( 0x2770, 0x915d, 0x0010, 0x0010,
- "INTOVA",
- "Pixtreme",
- US_SC_DEVICE, US_PR_DEVICE, NULL,
- US_FL_FIX_CAPACITY ),
-
/* Reported by Frederic Marchal <frederic.marchal@wowcompany.com>
* Mio Moov 330
*/
^ permalink raw reply [flat|nested] 432+ messages in thread
* [39/89] vmalloc: remove BUG_ON due to racy counting of VM_LAZY_FREE
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (37 preceding siblings ...)
2010-03-30 22:57 ` [38/89] USB: fix usbstorage for 2770:915d delivers no FAT Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [40/89] Input: ALPS - add interleaved protocol support (Dell E6x00 series) Greg KH
` (49 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Yongseok Koh, Nick Piggin,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Yongseok Koh <yongseok.koh@samsung.com>
commit 88f5004430babb836cfce886d5d54c82166f8ba4 upstream.
In free_unmap_area_noflush(), va->flags is marked as VM_LAZY_FREE first, and
then vmap_lazy_nr is increased atomically.
But, in __purge_vmap_area_lazy(), while traversing of vmap_are_list, nr
is counted by checking VM_LAZY_FREE is set to va->flags. After counting
the variable nr, kernel reads vmap_lazy_nr atomically and checks a
BUG_ON condition whether nr is greater than vmap_lazy_nr to prevent
vmap_lazy_nr from being negative.
The problem is that, if interrupted right after marking VM_LAZY_FREE,
increment of vmap_lazy_nr can be delayed. Consequently, BUG_ON
condition can be met because nr is counted more than vmap_lazy_nr.
It is highly probable when vmalloc/vfree are called frequently. This
scenario have been verified by adding delay between marking VM_LAZY_FREE
and increasing vmap_lazy_nr in free_unmap_area_noflush().
Even the vmap_lazy_nr is for checking high watermark, it never be the
strict watermark. Although the BUG_ON condition is to prevent
vmap_lazy_nr from being negative, vmap_lazy_nr is signed variable. So,
it could go down to negative value temporarily.
Consequently, removing the BUG_ON condition is proper.
A possible BUG_ON message is like the below.
kernel BUG at mm/vmalloc.c:517!
invalid opcode: 0000 [#1] SMP
EIP: 0060:[<c04824a4>] EFLAGS: 00010297 CPU: 3
EIP is at __purge_vmap_area_lazy+0x144/0x150
EAX: ee8a8818 EBX: c08e77d4 ECX: e7c7ae40 EDX: c08e77ec
ESI: 000081fe EDI: e7c7ae60 EBP: e7c7ae64 ESP: e7c7ae3c
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
Call Trace:
[<c0482ad9>] free_unmap_vmap_area_noflush+0x69/0x70
[<c0482b02>] remove_vm_area+0x22/0x70
[<c0482c15>] __vunmap+0x45/0xe0
[<c04831ec>] vmalloc+0x2c/0x30
Code: 8d 59 e0 eb 04 66 90 89 cb 89 d0 e8 87 fe ff ff 8b 43 20 89 da 8d 48 e0 8d 43 20 3b 04 24 75 e7 fe 05 a8 a5 a3 c0 e9 78 ff ff ff <0f> 0b eb fe 90 8d b4 26 00 00 00 00 56 89 c6 b8 ac a5 a3 c0 31
EIP: [<c04824a4>] __purge_vmap_area_lazy+0x144/0x150 SS:ESP 0068:e7c7ae3c
[ See also http://marc.info/?l=linux-kernel&m=126335856228090&w=2 ]
Signed-off-by: Yongseok Koh <yongseok.koh@samsung.com>
Reviewed-by: Minchan Kim <minchan.kim@gmail.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
mm/vmalloc.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -546,10 +546,8 @@ static void __purge_vmap_area_lazy(unsig
}
rcu_read_unlock();
- if (nr) {
- BUG_ON(nr > atomic_read(&vmap_lazy_nr));
+ if (nr)
atomic_sub(nr, &vmap_lazy_nr);
- }
if (nr || force_flush)
flush_tlb_kernel_range(*start, *end);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [40/89] Input: ALPS - add interleaved protocol support (Dell E6x00 series)
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (38 preceding siblings ...)
2010-03-30 22:57 ` [39/89] vmalloc: remove BUG_ON due to racy counting of VM_LAZY_FREE Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [41/89] partitions: read whole sector with EFI GPT header Greg KH
` (48 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dmitry Torokhov, kernel-team,
Sebastian Kapfer, 296610, Andy Isaacson, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Sebastian Kapfer <sebastian_kapfer@gmx.net>
commit 1d9f26262aef6d63ff65eba0fd5f1583f342b69b upstream
Properly handle version of the protocol where standard PS/2 packets
from trackpoint are stuffed into middle (byte 3-6) of the standard
ALPS packets when both the touchpad and trackpoint are used together.
The patch is based on work done by Matthew Chapman and additional
research done by David Kubicek and Erik Osterholm:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/296610
Many thanks to David Kubicek for his efforts in researching fine points
of this new version of the protocol, especially interaction between pad
and stick in these models.
Cc: Andy Isaacson <adi@hexapodia.org>
Signed-off-by: Sebastian Kapfer <sebastian_kapfer@gmx.net>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/input/mouse/alps.c | 252 ++++++++++++++++++++++++++++++++++++++++-----
drivers/input/mouse/alps.h | 1
2 files changed, 228 insertions(+), 25 deletions(-)
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -5,6 +5,7 @@
* Copyright (c) 2003-2005 Peter Osterlund <petero2@telia.com>
* Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru>
* Copyright (c) 2005 Vojtech Pavlik <vojtech@suse.cz>
+ * Copyright (c) 2009 Sebastian Kapfer <sebastian_kapfer@gmx.net>
*
* ALPS detection, tap switching and status querying info is taken from
* tpconfig utility (by C. Scott Ananian and Bruce Kall).
@@ -35,6 +36,8 @@
#define ALPS_OLDPROTO 0x10
#define ALPS_PASS 0x20
#define ALPS_FW_BK_2 0x40
+#define ALPS_PS2_INTERLEAVED 0x80 /* 3-byte PS/2 packet interleaved with
+ 6-byte ALPS packet */
static const struct alps_model_info alps_model_data[] = {
{ { 0x32, 0x02, 0x14 }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* Toshiba Salellite Pro M10 */
@@ -55,7 +58,9 @@ static const struct alps_model_info alps
{ { 0x20, 0x02, 0x0e }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT }, /* XXX */
{ { 0x22, 0x02, 0x0a }, 0xf8, 0xf8, ALPS_PASS | ALPS_DUALPOINT },
{ { 0x22, 0x02, 0x14 }, 0xff, 0xff, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude D600 */
- { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf, ALPS_PASS | ALPS_DUALPOINT }, /* Dell Latitude E6500 */
+ /* Dell Latitude E5500, E6400, E6500, Precision M4400 */
+ { { 0x62, 0x02, 0x14 }, 0xcf, 0xcf,
+ ALPS_PASS | ALPS_DUALPOINT | ALPS_PS2_INTERLEAVED },
{ { 0x73, 0x02, 0x50 }, 0xcf, 0xcf, ALPS_FW_BK_1 }, /* Dell Vostro 1400 */
};
@@ -66,20 +71,88 @@ static const struct alps_model_info alps
*/
/*
- * ALPS abolute Mode - new format
+ * PS/2 packet format
+ *
+ * byte 0: 0 0 YSGN XSGN 1 M R L
+ * byte 1: X7 X6 X5 X4 X3 X2 X1 X0
+ * byte 2: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
+ *
+ * Note that the device never signals overflow condition.
+ *
+ * ALPS absolute Mode - new format
*
* byte 0: 1 ? ? ? 1 ? ? ?
* byte 1: 0 x6 x5 x4 x3 x2 x1 x0
- * byte 2: 0 x10 x9 x8 x7 ? fin ges
+ * byte 2: 0 x10 x9 x8 x7 ? fin ges
* byte 3: 0 y9 y8 y7 1 M R L
* byte 4: 0 y6 y5 y4 y3 y2 y1 y0
* byte 5: 0 z6 z5 z4 z3 z2 z1 z0
*
+ * Dualpoint device -- interleaved packet format
+ *
+ * byte 0: 1 1 0 0 1 1 1 1
+ * byte 1: 0 x6 x5 x4 x3 x2 x1 x0
+ * byte 2: 0 x10 x9 x8 x7 0 fin ges
+ * byte 3: 0 0 YSGN XSGN 1 1 1 1
+ * byte 4: X7 X6 X5 X4 X3 X2 X1 X0
+ * byte 5: Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0
+ * byte 6: 0 y9 y8 y7 1 m r l
+ * byte 7: 0 y6 y5 y4 y3 y2 y1 y0
+ * byte 8: 0 z6 z5 z4 z3 z2 z1 z0
+ *
+ * CAPITALS = stick, miniscules = touchpad
+ *
* ?'s can have different meanings on different models,
* such as wheel rotation, extra buttons, stick buttons
* on a dualpoint, etc.
*/
+static bool alps_is_valid_first_byte(const struct alps_model_info *model,
+ unsigned char data)
+{
+ return (data & model->mask0) == model->byte0;
+}
+
+static void alps_report_buttons(struct psmouse *psmouse,
+ struct input_dev *dev1, struct input_dev *dev2,
+ int left, int right, int middle)
+{
+ struct alps_data *priv = psmouse->private;
+ const struct alps_model_info *model = priv->i;
+
+ if (model->flags & ALPS_PS2_INTERLEAVED) {
+ struct input_dev *dev;
+
+ /*
+ * If shared button has already been reported on the
+ * other device (dev2) then this event should be also
+ * sent through that device.
+ */
+ dev = test_bit(BTN_LEFT, dev2->key) ? dev2 : dev1;
+ input_report_key(dev, BTN_LEFT, left);
+
+ dev = test_bit(BTN_RIGHT, dev2->key) ? dev2 : dev1;
+ input_report_key(dev, BTN_RIGHT, right);
+
+ dev = test_bit(BTN_MIDDLE, dev2->key) ? dev2 : dev1;
+ input_report_key(dev, BTN_MIDDLE, middle);
+
+ /*
+ * Sync the _other_ device now, we'll do the first
+ * device later once we report the rest of the events.
+ */
+ input_sync(dev2);
+ } else {
+ /*
+ * For devices with non-interleaved packets we know what
+ * device buttons belong to so we can simply report them.
+ */
+ input_report_key(dev1, BTN_LEFT, left);
+ input_report_key(dev1, BTN_RIGHT, right);
+ input_report_key(dev1, BTN_MIDDLE, middle);
+ }
+}
+
static void alps_process_packet(struct psmouse *psmouse)
{
struct alps_data *priv = psmouse->private;
@@ -89,18 +162,6 @@ static void alps_process_packet(struct p
int x, y, z, ges, fin, left, right, middle;
int back = 0, forward = 0;
- if ((packet[0] & 0xc8) == 0x08) { /* 3-byte PS/2 packet */
- input_report_key(dev2, BTN_LEFT, packet[0] & 1);
- input_report_key(dev2, BTN_RIGHT, packet[0] & 2);
- input_report_key(dev2, BTN_MIDDLE, packet[0] & 4);
- input_report_rel(dev2, REL_X,
- packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0);
- input_report_rel(dev2, REL_Y,
- packet[2] ? ((packet[0] << 3) & 0x100) - packet[2] : 0);
- input_sync(dev2);
- return;
- }
-
if (priv->i->flags & ALPS_OLDPROTO) {
left = packet[2] & 0x10;
right = packet[2] & 0x08;
@@ -136,18 +197,13 @@ static void alps_process_packet(struct p
input_report_rel(dev2, REL_X, (x > 383 ? (x - 768) : x));
input_report_rel(dev2, REL_Y, -(y > 255 ? (y - 512) : y));
- input_report_key(dev2, BTN_LEFT, left);
- input_report_key(dev2, BTN_RIGHT, right);
- input_report_key(dev2, BTN_MIDDLE, middle);
+ alps_report_buttons(psmouse, dev2, dev, left, right, middle);
- input_sync(dev);
input_sync(dev2);
return;
}
- input_report_key(dev, BTN_LEFT, left);
- input_report_key(dev, BTN_RIGHT, right);
- input_report_key(dev, BTN_MIDDLE, middle);
+ alps_report_buttons(psmouse, dev, dev2, left, right, middle);
/* Convert hardware tap to a reasonable Z value */
if (ges && !fin) z = 40;
@@ -188,25 +244,168 @@ static void alps_process_packet(struct p
input_sync(dev);
}
+static void alps_report_bare_ps2_packet(struct psmouse *psmouse,
+ unsigned char packet[],
+ bool report_buttons)
+{
+ struct alps_data *priv = psmouse->private;
+ struct input_dev *dev2 = priv->dev2;
+
+ if (report_buttons)
+ alps_report_buttons(psmouse, dev2, psmouse->dev,
+ packet[0] & 1, packet[0] & 2, packet[0] & 4);
+
+ input_report_rel(dev2, REL_X,
+ packet[1] ? packet[1] - ((packet[0] << 4) & 0x100) : 0);
+ input_report_rel(dev2, REL_Y,
+ packet[2] ? ((packet[0] << 3) & 0x100) - packet[2] : 0);
+
+ input_sync(dev2);
+}
+
+static psmouse_ret_t alps_handle_interleaved_ps2(struct psmouse *psmouse)
+{
+ struct alps_data *priv = psmouse->private;
+
+ if (psmouse->pktcnt < 6)
+ return PSMOUSE_GOOD_DATA;
+
+ if (psmouse->pktcnt == 6) {
+ /*
+ * Start a timer to flush the packet if it ends up last
+ * 6-byte packet in the stream. Timer needs to fire
+ * psmouse core times out itself. 20 ms should be enough
+ * to decide if we are getting more data or not.
+ */
+ mod_timer(&priv->timer, jiffies + msecs_to_jiffies(20));
+ return PSMOUSE_GOOD_DATA;
+ }
+
+ del_timer(&priv->timer);
+
+ if (psmouse->packet[6] & 0x80) {
+
+ /*
+ * Highest bit is set - that means we either had
+ * complete ALPS packet and this is start of the
+ * next packet or we got garbage.
+ */
+
+ if (((psmouse->packet[3] |
+ psmouse->packet[4] |
+ psmouse->packet[5]) & 0x80) ||
+ (!alps_is_valid_first_byte(priv->i, psmouse->packet[6]))) {
+ dbg("refusing packet %x %x %x %x "
+ "(suspected interleaved ps/2)\n",
+ psmouse->packet[3], psmouse->packet[4],
+ psmouse->packet[5], psmouse->packet[6]);
+ return PSMOUSE_BAD_DATA;
+ }
+
+ alps_process_packet(psmouse);
+
+ /* Continue with the next packet */
+ psmouse->packet[0] = psmouse->packet[6];
+ psmouse->pktcnt = 1;
+
+ } else {
+
+ /*
+ * High bit is 0 - that means that we indeed got a PS/2
+ * packet in the middle of ALPS packet.
+ *
+ * There is also possibility that we got 6-byte ALPS
+ * packet followed by 3-byte packet from trackpoint. We
+ * can not distinguish between these 2 scenarios but
+ * becase the latter is unlikely to happen in course of
+ * normal operation (user would need to press all
+ * buttons on the pad and start moving trackpoint
+ * without touching the pad surface) we assume former.
+ * Even if we are wrong the wost thing that would happen
+ * the cursor would jump but we should not get protocol
+ * desynchronization.
+ */
+
+ alps_report_bare_ps2_packet(psmouse, &psmouse->packet[3],
+ false);
+
+ /*
+ * Continue with the standard ALPS protocol handling,
+ * but make sure we won't process it as an interleaved
+ * packet again, which may happen if all buttons are
+ * pressed. To avoid this let's reset the 4th bit which
+ * is normally 1.
+ */
+ psmouse->packet[3] = psmouse->packet[6] & 0xf7;
+ psmouse->pktcnt = 4;
+ }
+
+ return PSMOUSE_GOOD_DATA;
+}
+
+static void alps_flush_packet(unsigned long data)
+{
+ struct psmouse *psmouse = (struct psmouse *)data;
+
+ serio_pause_rx(psmouse->ps2dev.serio);
+
+ if (psmouse->pktcnt == 6) {
+
+ /*
+ * We did not any more data in reasonable amount of time.
+ * Validate the last 3 bytes and process as a standard
+ * ALPS packet.
+ */
+ if ((psmouse->packet[3] |
+ psmouse->packet[4] |
+ psmouse->packet[5]) & 0x80) {
+ dbg("refusing packet %x %x %x "
+ "(suspected interleaved ps/2)\n",
+ psmouse->packet[3], psmouse->packet[4],
+ psmouse->packet[5]);
+ } else {
+ alps_process_packet(psmouse);
+ }
+ psmouse->pktcnt = 0;
+ }
+
+ serio_continue_rx(psmouse->ps2dev.serio);
+}
+
static psmouse_ret_t alps_process_byte(struct psmouse *psmouse)
{
struct alps_data *priv = psmouse->private;
+ const struct alps_model_info *model = priv->i;
if ((psmouse->packet[0] & 0xc8) == 0x08) { /* PS/2 packet */
if (psmouse->pktcnt == 3) {
- alps_process_packet(psmouse);
+ alps_report_bare_ps2_packet(psmouse, psmouse->packet,
+ true);
return PSMOUSE_FULL_PACKET;
}
return PSMOUSE_GOOD_DATA;
}
- if ((psmouse->packet[0] & priv->i->mask0) != priv->i->byte0)
+ /* Check for PS/2 packet stuffed in the middle of ALPS packet. */
+
+ if ((model->flags & ALPS_PS2_INTERLEAVED) &&
+ psmouse->pktcnt >= 4 && (psmouse->packet[3] & 0x0f) == 0x0f) {
+ return alps_handle_interleaved_ps2(psmouse);
+ }
+
+ if (!alps_is_valid_first_byte(model, psmouse->packet[0])) {
+ dbg("refusing packet[0] = %x (mask0 = %x, byte0 = %x)\n",
+ psmouse->packet[0], model->mask0, model->byte0);
return PSMOUSE_BAD_DATA;
+ }
/* Bytes 2 - 6 should have 0 in the highest bit */
if (psmouse->pktcnt >= 2 && psmouse->pktcnt <= 6 &&
- (psmouse->packet[psmouse->pktcnt - 1] & 0x80))
+ (psmouse->packet[psmouse->pktcnt - 1] & 0x80)) {
+ dbg("refusing packet[%i] = %x\n",
+ psmouse->pktcnt - 1, psmouse->packet[psmouse->pktcnt - 1]);
return PSMOUSE_BAD_DATA;
+ }
if (psmouse->pktcnt == 6) {
alps_process_packet(psmouse);
@@ -441,6 +640,7 @@ static void alps_disconnect(struct psmou
struct alps_data *priv = psmouse->private;
psmouse_reset(psmouse);
+ del_timer_sync(&priv->timer);
input_unregister_device(priv->dev2);
kfree(priv);
}
@@ -457,6 +657,8 @@ int alps_init(struct psmouse *psmouse)
goto init_fail;
priv->dev2 = dev2;
+ setup_timer(&priv->timer, alps_flush_packet, (unsigned long)psmouse);
+
psmouse->private = priv;
if (alps_hw_init(psmouse, &version))
--- a/drivers/input/mouse/alps.h
+++ b/drivers/input/mouse/alps.h
@@ -23,6 +23,7 @@ struct alps_data {
char phys[32]; /* Phys */
const struct alps_model_info *i;/* Info */
int prev_fin; /* Finger bit from previous packet */
+ struct timer_list timer;
};
#ifdef CONFIG_MOUSE_PS2_ALPS
^ permalink raw reply [flat|nested] 432+ messages in thread
* [41/89] partitions: read whole sector with EFI GPT header
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (39 preceding siblings ...)
2010-03-30 22:57 ` [40/89] Input: ALPS - add interleaved protocol support (Dell E6x00 series) Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [42/89] partitions: use sector size for EFI GPT Greg KH
` (47 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Karel Zak, Jens Axboe,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Karel Zak <kzak@redhat.com>
commit 87038c2d5bda2418fda8b1456a0ae81cc3ff5bd8 upstream.
The size of EFI GPT header is not static, but whole sector is
allocated for the header. The HeaderSize field must be greater
than 92 (= sizeof(struct gpt_header) and must be less than or
equal to the logical block size.
It means we have to read whole sector with the header, because the
header crc32 checksum is calculated according to HeaderSize.
For more details see UEFI standard (version 2.3, May 2009):
- 5.3.1 GUID Format overview, page 93
- Table 13. GUID Partition Table Header, page 96
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/partitions/efi.c | 7 ++++---
fs/partitions/efi.h | 8 ++++++--
2 files changed, 10 insertions(+), 5 deletions(-)
--- a/fs/partitions/efi.c
+++ b/fs/partitions/efi.c
@@ -257,15 +257,16 @@ static gpt_header *
alloc_read_gpt_header(struct block_device *bdev, u64 lba)
{
gpt_header *gpt;
+ unsigned ssz = bdev_logical_block_size(bdev);
+
if (!bdev)
return NULL;
- gpt = kzalloc(sizeof (gpt_header), GFP_KERNEL);
+ gpt = kzalloc(ssz, GFP_KERNEL);
if (!gpt)
return NULL;
- if (read_lba(bdev, lba, (u8 *) gpt,
- sizeof (gpt_header)) < sizeof (gpt_header)) {
+ if (read_lba(bdev, lba, (u8 *) gpt, ssz) < ssz) {
kfree(gpt);
gpt=NULL;
return NULL;
--- a/fs/partitions/efi.h
+++ b/fs/partitions/efi.h
@@ -37,7 +37,6 @@
#define EFI_PMBR_OSTYPE_EFI 0xEF
#define EFI_PMBR_OSTYPE_EFI_GPT 0xEE
-#define GPT_BLOCK_SIZE 512
#define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
#define GPT_HEADER_REVISION_V1 0x00010000
#define GPT_PRIMARY_PARTITION_TABLE_LBA 1
@@ -79,7 +78,12 @@ typedef struct _gpt_header {
__le32 num_partition_entries;
__le32 sizeof_partition_entry;
__le32 partition_entry_array_crc32;
- u8 reserved2[GPT_BLOCK_SIZE - 92];
+
+ /* The rest of the logical block is reserved by UEFI and must be zero.
+ * EFI standard handles this by:
+ *
+ * uint8_t reserved2[ BlockSize - 92 ];
+ */
} __attribute__ ((packed)) gpt_header;
typedef struct _gpt_entry_attributes {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [42/89] partitions: use sector size for EFI GPT
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (40 preceding siblings ...)
2010-03-30 22:57 ` [41/89] partitions: read whole sector with EFI GPT header Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [43/89] sfc: Fix DMA mapping cleanup in case of an error in TSO Greg KH
` (46 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Karel Zak, Jens Axboe,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Karel Zak <kzak@redhat.com>
commit 7d13af3279985f554784a45cc961f706dbcdbdd1 upstream.
Currently, kernel uses strictly 512-byte sectors for EFI GPT parsing.
That's wrong.
UEFI standard (version 2.3, May 2009, 5.3.1 GUID Format overview, page
95) defines that LBA is always based on the logical block size. It
means bdev_logical_block_size() (aka BLKSSZGET) for Linux.
This patch removes static sector size from EFI GPT parser.
The problem is reproducible with the latest GNU Parted:
# modprobe scsi_debug dev_size_mb=50 sector_size=4096
# ./parted /dev/sdb print
Model: Linux scsi_debug (scsi)
Disk /dev/sdb: 52.4MB
Sector size (logical/physical): 4096B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 24.6kB 3002kB 2978kB primary
2 3002kB 6001kB 2998kB primary
3 6001kB 9003kB 3002kB primary
# blockdev --rereadpt /dev/sdb
# dmesg | tail -1
sdb: unknown partition table <---- !!!
with this patch:
# blockdev --rereadpt /dev/sdb
# dmesg | tail -1
sdb: sdb1 sdb2 sdb3
Signed-off-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/partitions/efi.c | 23 +++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)
--- a/fs/partitions/efi.c
+++ b/fs/partitions/efi.c
@@ -1,7 +1,9 @@
/************************************************************
* EFI GUID Partition Table handling
- * Per Intel EFI Specification v1.02
- * http://developer.intel.com/technology/efi/efi.htm
+ *
+ * http://www.uefi.org/specs/
+ * http://www.intel.com/technology/efi/
+ *
* efi.[ch] by Matt Domsch <Matt_Domsch@dell.com>
* Copyright 2000,2001,2002,2004 Dell Inc.
*
@@ -92,6 +94,7 @@
*
************************************************************/
#include <linux/crc32.h>
+#include <linux/math64.h>
#include "check.h"
#include "efi.h"
@@ -141,7 +144,8 @@ last_lba(struct block_device *bdev)
{
if (!bdev || !bdev->bd_inode)
return 0;
- return (bdev->bd_inode->i_size >> 9) - 1ULL;
+ return div_u64(bdev->bd_inode->i_size,
+ bdev_logical_block_size(bdev)) - 1ULL;
}
static inline int
@@ -188,6 +192,7 @@ static size_t
read_lba(struct block_device *bdev, u64 lba, u8 * buffer, size_t count)
{
size_t totalreadcount = 0;
+ sector_t n = lba * (bdev_logical_block_size(bdev) / 512);
if (!bdev || !buffer || lba > last_lba(bdev))
return 0;
@@ -195,7 +200,7 @@ read_lba(struct block_device *bdev, u64
while (count) {
int copied = 512;
Sector sect;
- unsigned char *data = read_dev_sector(bdev, lba++, §);
+ unsigned char *data = read_dev_sector(bdev, n++, §);
if (!data)
break;
if (copied > count)
@@ -602,6 +607,7 @@ efi_partition(struct parsed_partitions *
gpt_header *gpt = NULL;
gpt_entry *ptes = NULL;
u32 i;
+ unsigned ssz = bdev_logical_block_size(bdev) / 512;
if (!find_valid_gpt(bdev, &gpt, &ptes) || !gpt || !ptes) {
kfree(gpt);
@@ -612,13 +618,14 @@ efi_partition(struct parsed_partitions *
pr_debug("GUID Partition Table is valid! Yea!\n");
for (i = 0; i < le32_to_cpu(gpt->num_partition_entries) && i < state->limit-1; i++) {
+ u64 start = le64_to_cpu(ptes[i].starting_lba);
+ u64 size = le64_to_cpu(ptes[i].ending_lba) -
+ le64_to_cpu(ptes[i].starting_lba) + 1ULL;
+
if (!is_pte_valid(&ptes[i], last_lba(bdev)))
continue;
- put_partition(state, i+1, le64_to_cpu(ptes[i].starting_lba),
- (le64_to_cpu(ptes[i].ending_lba) -
- le64_to_cpu(ptes[i].starting_lba) +
- 1ULL));
+ put_partition(state, i+1, start * ssz, size * ssz);
/* If this is a RAID volume, tell md */
if (!efi_guidcmp(ptes[i].partition_type_guid,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [43/89] sfc: Fix DMA mapping cleanup in case of an error in TSO
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (41 preceding siblings ...)
2010-03-30 22:57 ` [42/89] partitions: use sector size for EFI GPT Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [44/89] V4L/DVB: af9015: add new USB ID for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U) Greg KH
` (45 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ben Hutchings,
David S. Miller, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Neil Turton <nturton@solarflare.com>
commit a7ebd27a13757248863cd61e541af7fa9e7727ee upstream.
We need buffer->len to remain valid to work out the correct address to
be unmapped. We therefore need to clear buffer->len after the unmap
operation.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/sfc/tx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/net/sfc/tx.c
+++ b/drivers/net/sfc/tx.c
@@ -823,8 +823,6 @@ static void efx_enqueue_unwind(struct ef
tx_queue->efx->type->txd_ring_mask];
efx_tsoh_free(tx_queue, buffer);
EFX_BUG_ON_PARANOID(buffer->skb);
- buffer->len = 0;
- buffer->continuation = true;
if (buffer->unmap_len) {
unmap_addr = (buffer->dma_addr + buffer->len -
buffer->unmap_len);
@@ -838,6 +836,8 @@ static void efx_enqueue_unwind(struct ef
PCI_DMA_TODEVICE);
buffer->unmap_len = 0;
}
+ buffer->len = 0;
+ buffer->continuation = true;
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [44/89] V4L/DVB: af9015: add new USB ID for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U)
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (42 preceding siblings ...)
2010-03-30 22:57 ` [43/89] sfc: Fix DMA mapping cleanup in case of an error in TSO Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [45/89] ipc ns: fix memory leak (idr) Greg KH
` (44 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Mart Raudsepp,
Antti Palosaari, Mauro Carvalho Chehab, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
commit c92f056308c4a77a833e1cc1e16c1b68974483a6 upstream.
Add new USB ID (1b80:e400) for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U).
The model number on the devices sticker label is "KW-DVB-T 399UR".
Signed-off-by: Mart Raudsepp <mart.raudsepp@artecdesign.ee>
Acked-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/media/dvb/dvb-usb/af9015.c | 4 +++-
drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/media/dvb/dvb-usb/af9015.c
+++ b/drivers/media/dvb/dvb-usb/af9015.c
@@ -1266,6 +1266,7 @@ static struct usb_device_id af9015_usb_t
{USB_DEVICE(USB_VID_KWORLD_2, USB_PID_CONCEPTRONIC_CTVDIGRCU)},
{USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_MC810)},
{USB_DEVICE(USB_VID_KYE, USB_PID_GENIUS_TVGO_DVB_T03)},
+/* 25 */{USB_DEVICE(USB_VID_KWORLD_2, USB_PID_KWORLD_399U_2)},
{0},
};
MODULE_DEVICE_TABLE(usb, af9015_usb_table);
@@ -1346,7 +1347,8 @@ static struct dvb_usb_device_properties
{
.name = "KWorld PlusTV Dual DVB-T Stick " \
"(DVB-T 399U)",
- .cold_ids = {&af9015_usb_table[4], NULL},
+ .cold_ids = {&af9015_usb_table[4],
+ &af9015_usb_table[25], NULL},
.warm_ids = {NULL},
},
{
--- a/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-ids.h
@@ -103,6 +103,7 @@
#define USB_PID_GRANDTEC_DVBT_USB_WARM 0x0fa1
#define USB_PID_INTEL_CE9500 0x9500
#define USB_PID_KWORLD_399U 0xe399
+#define USB_PID_KWORLD_399U_2 0xe400
#define USB_PID_KWORLD_395U 0xe396
#define USB_PID_KWORLD_395U_2 0xe39b
#define USB_PID_KWORLD_395U_3 0xe395
^ permalink raw reply [flat|nested] 432+ messages in thread
* [45/89] ipc ns: fix memory leak (idr)
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (43 preceding siblings ...)
2010-03-30 22:57 ` [44/89] V4L/DVB: af9015: add new USB ID for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U) Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [46/89] fnctl: f_modown should call write_lock_irqsave/restore Greg KH
` (43 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Serge E. Hallyn, Nick Piggin,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Serge E. Hallyn <serue@us.ibm.com>
commit 7d6feeb287c61aafa88f06345387b1188edf4b86 upstream.
We have apparently had a memory leak since
7ca7e564e049d8b350ec9d958ff25eaa24226352 "ipc: store ipcs into IDRs" in
2007. The idr of which 3 exist for each ipc namespace is never freed.
This patch simply frees them when the ipcns is freed. I don't believe any
idr_remove() are done from rcu (and could therefore be delayed until after
this idr_destroy()), so the patch should be safe. Some quick testing
showed no harm, and the memory leak fixed.
Caught by kmemleak.
Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
ipc/msg.c | 1 +
ipc/sem.c | 1 +
ipc/shm.c | 1 +
3 files changed, 3 insertions(+)
--- a/ipc/msg.c
+++ b/ipc/msg.c
@@ -125,6 +125,7 @@ void msg_init_ns(struct ipc_namespace *n
void msg_exit_ns(struct ipc_namespace *ns)
{
free_ipcs(ns, &msg_ids(ns), freeque);
+ idr_destroy(&ns->ids[IPC_MSG_IDS].ipcs_idr);
}
#endif
--- a/ipc/sem.c
+++ b/ipc/sem.c
@@ -129,6 +129,7 @@ void sem_init_ns(struct ipc_namespace *n
void sem_exit_ns(struct ipc_namespace *ns)
{
free_ipcs(ns, &sem_ids(ns), freeary);
+ idr_destroy(&ns->ids[IPC_SEM_IDS].ipcs_idr);
}
#endif
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -101,6 +101,7 @@ static void do_shm_rmid(struct ipc_names
void shm_exit_ns(struct ipc_namespace *ns)
{
free_ipcs(ns, &shm_ids(ns), do_shm_rmid);
+ idr_destroy(&ns->ids[IPC_SHM_IDS].ipcs_idr);
}
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [46/89] fnctl: f_modown should call write_lock_irqsave/restore
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (44 preceding siblings ...)
2010-03-30 22:57 ` [45/89] ipc ns: fix memory leak (idr) Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [47/89] Fix race in tty_fasync() properly Greg KH
` (42 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Eric W. Biederman, Al Viro,
Tavis Ormandy, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Greg Kroah-Hartman <gregkh@suse.de>
commit b04da8bfdfbbd79544cab2fadfdc12e87eb01600 upstream.
Commit 703625118069f9f8960d356676662d3db5a9d116 exposed that f_modown()
should call write_lock_irqsave instead of just write_lock_irq so that
because a caller could have a spinlock held and it would not be good to
renable interrupts.
Cc: Eric W. Biederman <ebiederm@xmission.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Tavis Ormandy <taviso@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
fs/fcntl.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -199,7 +199,9 @@ static int setfl(int fd, struct file * f
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
{
- write_lock_irq(&filp->f_owner.lock);
+ unsigned long flags;
+
+ write_lock_irqsave(&filp->f_owner.lock, flags);
if (force || !filp->f_owner.pid) {
put_pid(filp->f_owner.pid);
filp->f_owner.pid = get_pid(pid);
@@ -211,7 +213,7 @@ static void f_modown(struct file *filp,
filp->f_owner.euid = cred->euid;
}
}
- write_unlock_irq(&filp->f_owner.lock);
+ write_unlock_irqrestore(&filp->f_owner.lock, flags);
}
int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [47/89] Fix race in tty_fasync() properly
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (45 preceding siblings ...)
2010-03-30 22:57 ` [46/89] fnctl: f_modown should call write_lock_irqsave/restore Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [48/89] USB: usbfs: properly clean up the as structure on error paths Greg KH
` (41 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Greg Kroah-Hartman,
Américo Wang
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3053 bytes --]
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 80e1e823989ec44d8e35bdfddadbddcffec90424 upstream.
This reverts commit 703625118069 ("tty: fix race in tty_fasync") and
commit b04da8bfdfbb ("fnctl: f_modown should call write_lock_irqsave/
restore") that tried to fix up some of the fallout but was incomplete.
It turns out that we really cannot hold 'tty->ctrl_lock' over calling
__f_setown, because not only did that cause problems with interrupt
disables (which the second commit fixed), it also causes a potential
ABBA deadlock due to lock ordering.
Thanks to Tetsuo Handa for following up on the issue, and running
lockdep to show the problem. It goes roughly like this:
- f_getown gets filp->f_owner.lock for reading without interrupts
disabled, so an interrupt that happens while that lock is held can
cause a lockdep chain from f_owner.lock -> sighand->siglock.
- at the same time, the tty->ctrl_lock -> f_owner.lock chain that
commit 703625118069 introduced, together with the pre-existing
sighand->siglock -> tty->ctrl_lock chain means that we have a lock
dependency the other way too.
So instead of extending tty->ctrl_lock over the whole __f_setown() call,
we now just take a reference to the 'pid' structure while holding the
lock, and then release it after having done the __f_setown. That still
guarantees that 'struct pid' won't go away from under us, which is all
we really ever needed.
Reported-and-tested-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Américo Wang <xiyou.wangcong@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/char/tty_io.c | 4 +++-
fs/fcntl.c | 6 ++----
2 files changed, 5 insertions(+), 5 deletions(-)
--- a/drivers/char/tty_io.c
+++ b/drivers/char/tty_io.c
@@ -1912,8 +1912,10 @@ static int tty_fasync(int fd, struct fil
pid = task_pid(current);
type = PIDTYPE_PID;
}
- retval = __f_setown(filp, pid, type, 0);
+ get_pid(pid);
spin_unlock_irqrestore(&tty->ctrl_lock, flags);
+ retval = __f_setown(filp, pid, type, 0);
+ put_pid(pid);
if (retval)
goto out;
} else {
--- a/fs/fcntl.c
+++ b/fs/fcntl.c
@@ -199,9 +199,7 @@ static int setfl(int fd, struct file * f
static void f_modown(struct file *filp, struct pid *pid, enum pid_type type,
int force)
{
- unsigned long flags;
-
- write_lock_irqsave(&filp->f_owner.lock, flags);
+ write_lock_irq(&filp->f_owner.lock);
if (force || !filp->f_owner.pid) {
put_pid(filp->f_owner.pid);
filp->f_owner.pid = get_pid(pid);
@@ -213,7 +211,7 @@ static void f_modown(struct file *filp,
filp->f_owner.euid = cred->euid;
}
}
- write_unlock_irqrestore(&filp->f_owner.lock, flags);
+ write_unlock_irq(&filp->f_owner.lock);
}
int __f_setown(struct file *filp, struct pid *pid, enum pid_type type,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [48/89] USB: usbfs: properly clean up the as structure on error paths
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (46 preceding siblings ...)
2010-03-30 22:57 ` [47/89] Fix race in tty_fasync() properly Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [49/89] USB: usbfs: only copy the actual data received Greg KH
` (40 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern, Marcus Meissner,
Greg Kroah-Hartman, Jeff Mahoney
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit ddeee0b2eec2a51b0712b04de4b39e7bec892a53 upstream
USB: usbfs: properly clean up the as structure on error paths
I notice that the processcompl_compat() function seems to be leaking the
'struct async *as' in the error paths.
I think that the calling convention is fundamentally buggered. The
caller is the one that did the "reap_as()" to get the as thing, the
caller should be the one to free it too.
Freeing it in the caller also means that it very clearly always gets
freed, and avoids the need for any "free in the error case too".
From: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Marcus Meissner <meissner@suse.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Jeff Mahoney <jeffm@suse.com>
---
drivers/usb/core/devio.c | 40 ++++++++++++++++++++++++++--------------
1 file changed, 26 insertions(+), 14 deletions(-)
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1262,14 +1262,11 @@ static int processcompl(struct async *as
}
}
- free_async(as);
-
if (put_user(addr, (void __user * __user *)arg))
return -EFAULT;
return 0;
err_out:
- free_async(as);
return -EFAULT;
}
@@ -1299,8 +1296,11 @@ static struct async *reap_as(struct dev_
static int proc_reapurb(struct dev_state *ps, void __user *arg)
{
struct async *as = reap_as(ps);
- if (as)
- return processcompl(as, (void __user * __user *)arg);
+ if (as) {
+ int retval = processcompl(as, (void __user * __user *)arg);
+ free_async(as);
+ return retval;
+ }
if (signal_pending(current))
return -EINTR;
return -EIO;
@@ -1308,11 +1308,16 @@ static int proc_reapurb(struct dev_state
static int proc_reapurbnonblock(struct dev_state *ps, void __user *arg)
{
+ int retval;
struct async *as;
- if (!(as = async_getcompleted(ps)))
- return -EAGAIN;
- return processcompl(as, (void __user * __user *)arg);
+ as = async_getcompleted(ps);
+ retval = -EAGAIN;
+ if (as) {
+ retval = processcompl(as, (void __user * __user *)arg);
+ free_async(as);
+ }
+ return retval;
}
#ifdef CONFIG_COMPAT
@@ -1385,7 +1390,6 @@ static int processcompl_compat(struct as
}
}
- free_async(as);
if (put_user(ptr_to_compat(addr), (u32 __user *)arg))
return -EFAULT;
return 0;
@@ -1394,8 +1398,11 @@ static int processcompl_compat(struct as
static int proc_reapurb_compat(struct dev_state *ps, void __user *arg)
{
struct async *as = reap_as(ps);
- if (as)
- return processcompl_compat(as, (void __user * __user *)arg);
+ if (as) {
+ int retval = processcompl_compat(as, (void __user * __user *)arg);
+ free_async(as);
+ return retval;
+ }
if (signal_pending(current))
return -EINTR;
return -EIO;
@@ -1403,11 +1410,16 @@ static int proc_reapurb_compat(struct de
static int proc_reapurbnonblock_compat(struct dev_state *ps, void __user *arg)
{
+ int retval;
struct async *as;
- if (!(as = async_getcompleted(ps)))
- return -EAGAIN;
- return processcompl_compat(as, (void __user * __user *)arg);
+ retval = -EAGAIN;
+ as = async_getcompleted(ps);
+ if (as) {
+ retval = processcompl_compat(as, (void __user * __user *)arg);
+ free_async(as);
+ }
+ return retval;
}
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [49/89] USB: usbfs: only copy the actual data received
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (47 preceding siblings ...)
2010-03-30 22:57 ` [48/89] USB: usbfs: properly clean up the as structure on error paths Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [50/89] i2c: Do not use device name after device_unregister Greg KH
` (39 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Greg Kroah-Hartman, Jeff Mahoney
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit d4a4683ca054ed9917dfc9e3ff0f7ecf74ad90d6 upstream
We need to only copy the data received by the device to userspace, not
the whole kernel buffer, which can contain "stale" data.
Thanks to Marcus Meissner for pointing this out and testing the fix.
Reported-by: Marcus Meissner <meissner@suse.de>
Tested-by: Marcus Meissner <meissner@suse.de>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Jeff Mahoney <jeffm@suse.com>
---
drivers/usb/core/devio.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1240,9 +1240,9 @@ static int processcompl(struct async *as
void __user *addr = as->userurb;
unsigned int i;
- if (as->userbuffer)
+ if (as->userbuffer && urb->actual_length)
if (copy_to_user(as->userbuffer, urb->transfer_buffer,
- urb->transfer_buffer_length))
+ urb->actual_length))
goto err_out;
if (put_user(as->status, &userurb->status))
goto err_out;
@@ -1368,9 +1368,9 @@ static int processcompl_compat(struct as
void __user *addr = as->userurb;
unsigned int i;
- if (as->userbuffer)
+ if (as->userbuffer && urb->actual_length)
if (copy_to_user(as->userbuffer, urb->transfer_buffer,
- urb->transfer_buffer_length))
+ urb->actual_length))
return -EFAULT;
if (put_user(as->status, &userurb->status))
return -EFAULT;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [50/89] i2c: Do not use device name after device_unregister
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (48 preceding siblings ...)
2010-03-30 22:57 ` [49/89] USB: usbfs: only copy the actual data received Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [51/89] i2c/pca: Dont use *_interruptible Greg KH
` (38 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan,
Thadeu Lima de Souza Cascardo, Jean Delvare, Jean Delvare,
Greg Kroah-Hartman
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1527 bytes --]
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit c556752109794a5ff199b80a1673336b4df8433a upstream.
dev_dbg outputs dev_name, which is released with device_unregister. This bug
resulted in output like this:
i2c Xy2�0: adapter [SMBus I801 adapter at 1880] unregistered
The right output would be:
i2c i2c-0: adapter [SMBus I801 adapter at 1880] unregistered
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/i2c/i2c-core.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -752,6 +752,9 @@ int i2c_del_adapter(struct i2c_adapter *
checking the returned value. */
res = device_for_each_child(&adap->dev, NULL, __unregister_client);
+ /* device name is gone after device_unregister */
+ dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name);
+
/* clean up the sysfs representation */
init_completion(&adap->dev_released);
device_unregister(&adap->dev);
@@ -764,8 +767,6 @@ int i2c_del_adapter(struct i2c_adapter *
idr_remove(&i2c_adapter_idr, adap->nr);
mutex_unlock(&core_lock);
- dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name);
-
/* Clear the device structure in case this adapter is ever going to be
added again */
memset(&adap->dev, 0, sizeof(adap->dev));
^ permalink raw reply [flat|nested] 432+ messages in thread
* [51/89] i2c/pca: Dont use *_interruptible
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (49 preceding siblings ...)
2010-03-30 22:57 ` [50/89] i2c: Do not use device name after device_unregister Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [52/89] i2c-tiny-usb: Fix on big-endian systems Greg KH
` (37 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Wolfram Sang, Jean Delvare,
Jean Delvare, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit 22f8b2695eda496026623020811cae34590ee3d7 upstream.
Unexpected signals can disturb the bus-handling and lock it up. Don't use
interruptible in 'wait_event_*' and 'wake_*' as in commits
dc1972d02747d2170fb1d78d114801f5ecb27506 (for cpm),
1ab082d7cbd0f34e39a5396cc6340c00bc5d66ef (for mpc),
b7af349b175af45f9d87b3bf3f0a221e1831ed39 (for omap).
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
Tested with custom hardware.
drivers/i2c/busses/i2c-pca-isa.c | 4 ++--
drivers/i2c/busses/i2c-pca-platform.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
--- a/drivers/i2c/busses/i2c-pca-isa.c
+++ b/drivers/i2c/busses/i2c-pca-isa.c
@@ -75,7 +75,7 @@ static int pca_isa_waitforcompletion(voi
unsigned long timeout;
if (irq > -1) {
- ret = wait_event_interruptible_timeout(pca_wait,
+ ret = wait_event_timeout(pca_wait,
pca_isa_readbyte(pd, I2C_PCA_CON)
& I2C_PCA_CON_SI, pca_isa_ops.timeout);
} else {
@@ -96,7 +96,7 @@ static void pca_isa_resetchip(void *pd)
}
static irqreturn_t pca_handler(int this_irq, void *dev_id) {
- wake_up_interruptible(&pca_wait);
+ wake_up(&pca_wait);
return IRQ_HANDLED;
}
--- a/drivers/i2c/busses/i2c-pca-platform.c
+++ b/drivers/i2c/busses/i2c-pca-platform.c
@@ -84,7 +84,7 @@ static int i2c_pca_pf_waitforcompletion(
unsigned long timeout;
if (i2c->irq) {
- ret = wait_event_interruptible_timeout(i2c->wait,
+ ret = wait_event_timeout(i2c->wait,
i2c->algo_data.read_byte(i2c, I2C_PCA_CON)
& I2C_PCA_CON_SI, i2c->adap.timeout);
} else {
@@ -122,7 +122,7 @@ static irqreturn_t i2c_pca_pf_handler(in
if ((i2c->algo_data.read_byte(i2c, I2C_PCA_CON) & I2C_PCA_CON_SI) == 0)
return IRQ_NONE;
- wake_up_interruptible(&i2c->wait);
+ wake_up(&i2c->wait);
return IRQ_HANDLED;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [52/89] i2c-tiny-usb: Fix on big-endian systems
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (50 preceding siblings ...)
2010-03-30 22:57 ` [51/89] i2c/pca: Dont use *_interruptible Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [53/89] V4L/DVB (13155): uvcvideo: Add a module parameter to set the streaming control timeout Greg KH
` (36 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Delvare, Till Harbaum,
Jean Delvare, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit 1c010ff8912cbc08d80e865aab9c32b6b00c527d upstream.
The functionality bit vector is always returned as a little-endian
32-bit number by the device, so it must be byte-swapped to the host
endianness.
On the other hand, the delay value is handled by the USB stack, so no
byte swapping is needed on our side.
This fixes bug #15105:
http://bugzilla.kernel.org/show_bug.cgi?id=15105
Reported-by: Jens Richter <jens@richter-stutensee.de>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Jens Richter <jens@richter-stutensee.de>
Cc: Till Harbaum <till@harbaum.org>
Cc: stable@kernel.org
Acked-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/i2c/busses/i2c-tiny-usb.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
--- a/drivers/i2c/busses/i2c-tiny-usb.c
+++ b/drivers/i2c/busses/i2c-tiny-usb.c
@@ -13,6 +13,7 @@
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/module.h>
+#include <linux/types.h>
/* include interfaces to usb layer */
#include <linux/usb.h>
@@ -31,8 +32,8 @@
#define CMD_I2C_IO_END (1<<1)
/* i2c bit delay, default is 10us -> 100kHz */
-static int delay = 10;
-module_param(delay, int, 0);
+static unsigned short delay = 10;
+module_param(delay, ushort, 0);
MODULE_PARM_DESC(delay, "bit delay in microseconds, "
"e.g. 10 for 100kHz (default is 100kHz)");
@@ -109,7 +110,7 @@ static int usb_xfer(struct i2c_adapter *
static u32 usb_func(struct i2c_adapter *adapter)
{
- u32 func;
+ __le32 func;
/* get functionality from adapter */
if (usb_read(adapter, CMD_GET_FUNC, 0, 0, &func, sizeof(func)) !=
@@ -118,7 +119,7 @@ static u32 usb_func(struct i2c_adapter *
return 0;
}
- return func;
+ return le32_to_cpu(func);
}
/* This is the actual algorithm we define */
@@ -216,8 +217,7 @@ static int i2c_tiny_usb_probe(struct usb
"i2c-tiny-usb at bus %03d device %03d",
dev->usb_dev->bus->busnum, dev->usb_dev->devnum);
- if (usb_write(&dev->adapter, CMD_SET_DELAY,
- cpu_to_le16(delay), 0, NULL, 0) != 0) {
+ if (usb_write(&dev->adapter, CMD_SET_DELAY, delay, 0, NULL, 0) != 0) {
dev_err(&dev->adapter.dev,
"failure setting delay to %dus\n", delay);
retval = -EIO;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [53/89] V4L/DVB (13155): uvcvideo: Add a module parameter to set the streaming control timeout
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (51 preceding siblings ...)
2010-03-30 22:57 ` [52/89] i2c-tiny-usb: Fix on big-endian systems Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [54/89] hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT Greg KH
` (35 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Laurent Pinchart,
Mauro Carvalho Chehab, Brandon Philips, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit b232a012adfea9f535702e8296ea6b76e691f436 upstream
The default streaming control timeout was found by Ondrej Zary to be too low
for some Logitech webcams. With kernel 2.6.22 and newer they would timeout
during initialization unles the audio function was initialized before the
video function.
Add a module parameter to set the streaming control timeout and increase the
default value from 1000ms to 3000ms to fix the above problem.
Thanks to Ondrej Zary for investigating the issue and providing an initial
patch.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Brandon Philips <bphilips@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/media/video/uvc/uvc_driver.c | 3 +++
drivers/media/video/uvc/uvc_video.c | 4 ++--
drivers/media/video/uvc/uvcvideo.h | 3 ++-
3 files changed, 7 insertions(+), 3 deletions(-)
--- a/drivers/media/video/uvc/uvc_driver.c
+++ b/drivers/media/video/uvc/uvc_driver.c
@@ -46,6 +46,7 @@
unsigned int uvc_no_drop_param;
static unsigned int uvc_quirks_param;
unsigned int uvc_trace_param;
+unsigned int uvc_timeout_param = UVC_CTRL_STREAMING_TIMEOUT;
/* ------------------------------------------------------------------------
* Video formats
@@ -2034,6 +2035,8 @@ module_param_named(quirks, uvc_quirks_pa
MODULE_PARM_DESC(quirks, "Forced device quirks");
module_param_named(trace, uvc_trace_param, uint, S_IRUGO|S_IWUSR);
MODULE_PARM_DESC(trace, "Trace level bitmask");
+module_param_named(timeout, uvc_timeout_param, uint, S_IRUGO|S_IWUSR);
+MODULE_PARM_DESC(timeout, "Streaming control requests timeout");
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
--- a/drivers/media/video/uvc/uvc_video.c
+++ b/drivers/media/video/uvc/uvc_video.c
@@ -130,7 +130,7 @@ static int uvc_get_video_ctrl(struct uvc
ret = __uvc_query_ctrl(video->dev, query, 0, video->streaming->intfnum,
probe ? VS_PROBE_CONTROL : VS_COMMIT_CONTROL, data, size,
- UVC_CTRL_STREAMING_TIMEOUT);
+ uvc_timeout_param);
if ((query == GET_MIN || query == GET_MAX) && ret == 2) {
/* Some cameras, mostly based on Bison Electronics chipsets,
@@ -235,7 +235,7 @@ static int uvc_set_video_ctrl(struct uvc
ret = __uvc_query_ctrl(video->dev, SET_CUR, 0,
video->streaming->intfnum,
probe ? VS_PROBE_CONTROL : VS_COMMIT_CONTROL, data, size,
- UVC_CTRL_STREAMING_TIMEOUT);
+ uvc_timeout_param);
if (ret != size) {
uvc_printk(KERN_ERR, "Failed to set UVC %s control : "
"%d (exp. %u).\n", probe ? "probe" : "commit",
--- a/drivers/media/video/uvc/uvcvideo.h
+++ b/drivers/media/video/uvc/uvcvideo.h
@@ -304,7 +304,7 @@ struct uvc_xu_control {
#define UVC_MAX_STATUS_SIZE 16
#define UVC_CTRL_CONTROL_TIMEOUT 300
-#define UVC_CTRL_STREAMING_TIMEOUT 1000
+#define UVC_CTRL_STREAMING_TIMEOUT 3000
/* Devices quirks */
#define UVC_QUIRK_STATUS_INTERVAL 0x00000001
@@ -695,6 +695,7 @@ struct uvc_driver {
extern unsigned int uvc_no_drop_param;
extern unsigned int uvc_trace_param;
+extern unsigned int uvc_timeout_param;
#define uvc_trace(flag, msg...) \
do { \
^ permalink raw reply [flat|nested] 432+ messages in thread
* [54/89] hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (52 preceding siblings ...)
2010-03-30 22:57 ` [53/89] V4L/DVB (13155): uvcvideo: Add a module parameter to set the streaming control timeout Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [55/89] hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog Greg KH
` (34 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ray Copeland,
Darrick J. Wong, Jean Delvare, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit 85f8d3e5faea8bd36c3e5196f8334f7db45e19b2 upstream.
The #define ADT7462_VOLT_COUNT is wrong, it should be 13 not 12. All the
for loops that use this as a limit count are of the typical form, "for
(n = 0; n < ADT7462_VOLT_COUNT; n++)", so to loop through all voltages
w/o missing the last one it is necessary for the count to be one greater
than it is. (Specifically, you will miss the +1.5V 3GPIO input with count
= 12 vs. 13.)
Signed-off-by: Ray Copeland <ray.copeland@aprius.com>
Acked-by: "Darrick J. Wong" <djwong@us.ibm.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/adt7462.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hwmon/adt7462.c
+++ b/drivers/hwmon/adt7462.c
@@ -182,7 +182,7 @@ I2C_CLIENT_INSMOD_1(adt7462);
*
* Some, but not all, of these voltages have low/high limits.
*/
-#define ADT7462_VOLT_COUNT 12
+#define ADT7462_VOLT_COUNT 13
#define ADT7462_VENDOR 0x41
#define ADT7462_DEVICE 0x62
^ permalink raw reply [flat|nested] 432+ messages in thread
* [55/89] hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (53 preceding siblings ...)
2010-03-30 22:57 ` [54/89] hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [56/89] hwmon: (lm78) Request I/O ports individually for probing Greg KH
` (33 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Hans de Goede, Jean Delvare,
Jean Delvare, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit c453615f77aa51593c1c9c9031b4278797d3fd19 upstream.
When /dev/watchdog gets opened a second time we return -EBUSY, but
we already have got a kref then, so we end up leaking our data struct.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/fschmd.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
--- a/drivers/hwmon/fschmd.c
+++ b/drivers/hwmon/fschmd.c
@@ -767,6 +767,7 @@ leave:
static int watchdog_open(struct inode *inode, struct file *filp)
{
struct fschmd_data *pos, *data = NULL;
+ int watchdog_is_open;
/* We get called from drivers/char/misc.c with misc_mtx hold, and we
call misc_register() from fschmd_probe() with watchdog_data_mutex
@@ -781,10 +782,12 @@ static int watchdog_open(struct inode *i
}
}
/* Note we can never not have found data, so we don't check for this */
- kref_get(&data->kref);
+ watchdog_is_open = test_and_set_bit(0, &data->watchdog_is_open);
+ if (!watchdog_is_open)
+ kref_get(&data->kref);
mutex_unlock(&watchdog_data_mutex);
- if (test_and_set_bit(0, &data->watchdog_is_open))
+ if (watchdog_is_open)
return -EBUSY;
/* Start the watchdog */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [56/89] hwmon: (lm78) Request I/O ports individually for probing
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (54 preceding siblings ...)
2010-03-30 22:57 ` [55/89] hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:57 ` [57/89] hwmon: (w83781d) " Greg KH
` (32 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Delvare, Jean Delvare,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit 197027e6ef830d60e10f76efc8d12bf3b6c35db5 upstream.
Different motherboards have different PNP declarations for LM78/LM79
chips. Some declare the whole range of I/O ports (8 ports), some
declare only the useful ports (2 ports at offset 5) and some declare
fancy ranges, for example 4 ports at offset 4. To properly handle all
cases, request all ports individually for probing. After we have
determined that we really have an LM78 or LM79 chip, the useful port
range will be requested again, as a single block.
This fixes the driver on the Olivetti M3000 DT 540, at least.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/lm78.c | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
--- a/drivers/hwmon/lm78.c
+++ b/drivers/hwmon/lm78.c
@@ -870,17 +870,16 @@ static struct lm78_data *lm78_update_dev
static int __init lm78_isa_found(unsigned short address)
{
int val, save, found = 0;
+ int port;
- /* We have to request the region in two parts because some
- boards declare base+4 to base+7 as a PNP device */
- if (!request_region(address, 4, "lm78")) {
- pr_debug("lm78: Failed to request low part of region\n");
- return 0;
- }
- if (!request_region(address + 4, 4, "lm78")) {
- pr_debug("lm78: Failed to request high part of region\n");
- release_region(address, 4);
- return 0;
+ /* Some boards declare base+0 to base+7 as a PNP device, some base+4
+ * to base+7 and some base+5 to base+6. So we better request each port
+ * individually for the probing phase. */
+ for (port = address; port < address + LM78_EXTENT; port++) {
+ if (!request_region(port, 1, "lm78")) {
+ pr_debug("lm78: Failed to request port 0x%x\n", port);
+ goto release;
+ }
}
#define REALLY_SLOW_IO
@@ -944,8 +943,8 @@ static int __init lm78_isa_found(unsigne
val & 0x80 ? "LM79" : "LM78", (int)address);
release:
- release_region(address + 4, 4);
- release_region(address, 4);
+ for (port--; port >= address; port--)
+ release_region(port, 1);
return found;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [57/89] hwmon: (w83781d) Request I/O ports individually for probing
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (55 preceding siblings ...)
2010-03-30 22:57 ` [56/89] hwmon: (lm78) Request I/O ports individually for probing Greg KH
@ 2010-03-30 22:57 ` Greg KH
2010-03-30 22:58 ` [58/89] dnotify: ignore FS_EVENT_ON_CHILD Greg KH
` (31 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:57 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jean Delvare, Jean Delvare,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
commit b0bcdd3cd0adb85a7686b396ba50493871b1135c upstream.
Different motherboards have different PNP declarations for
W83781D/W83782D chips. Some declare the whole range of I/O ports (8
ports), some declare only the useful ports (2 ports at offset 5) and
some declare fancy ranges, for example 4 ports at offset 4. To
properly handle all cases, request all ports individually for probing.
After we have determined that we really have a W83781D or W83782D
chip, the useful port range will be requested again, as a single
block.
I did not see a board which needs this yet, but I know of one for lm78
driver and I'd like to keep the logic of these two drivers in sync.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/w83781d.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -1818,17 +1818,17 @@ static int __init
w83781d_isa_found(unsigned short address)
{
int val, save, found = 0;
+ int port;
- /* We have to request the region in two parts because some
- boards declare base+4 to base+7 as a PNP device */
- if (!request_region(address, 4, "w83781d")) {
- pr_debug("w83781d: Failed to request low part of region\n");
- return 0;
- }
- if (!request_region(address + 4, 4, "w83781d")) {
- pr_debug("w83781d: Failed to request high part of region\n");
- release_region(address, 4);
- return 0;
+ /* Some boards declare base+0 to base+7 as a PNP device, some base+4
+ * to base+7 and some base+5 to base+6. So we better request each port
+ * individually for the probing phase. */
+ for (port = address; port < address + W83781D_EXTENT; port++) {
+ if (!request_region(port, 1, "w83781d")) {
+ pr_debug("w83781d: Failed to request port 0x%x\n",
+ port);
+ goto release;
+ }
}
#define REALLY_SLOW_IO
@@ -1902,8 +1902,8 @@ w83781d_isa_found(unsigned short address
val == 0x30 ? "W83782D" : "W83781D", (int)address);
release:
- release_region(address + 4, 4);
- release_region(address, 4);
+ for (port--; port >= address; port--)
+ release_region(port, 1);
return found;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [58/89] dnotify: ignore FS_EVENT_ON_CHILD
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (56 preceding siblings ...)
2010-03-30 22:57 ` [57/89] hwmon: (w83781d) " Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [59/89] inotify: fix coalesce duplicate events into a single event in special case Greg KH
` (30 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andreas Gruenbacher,
Eric Paris, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andreas Gruenbacher <agruen@suse.de>
commit 945526846a84c00adac1efd1c6befdaa77039623 upstream.
Mask off FS_EVENT_ON_CHILD in dnotify_handle_event(). Otherwise, when there
is more than one watch on a directory and dnotify_should_send_event()
succeeds, events with FS_EVENT_ON_CHILD set will trigger all watches and cause
spurious events.
This case was overlooked in commit e42e2773.
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <string.h>
static void create_event(int s, siginfo_t* si, void* p)
{
printf("create\n");
}
static void delete_event(int s, siginfo_t* si, void* p)
{
printf("delete\n");
}
int main (void) {
struct sigaction action;
char *tmpdir, *file;
int fd1, fd2;
sigemptyset (&action.sa_mask);
action.sa_flags = SA_SIGINFO;
action.sa_sigaction = create_event;
sigaction (SIGRTMIN + 0, &action, NULL);
action.sa_sigaction = delete_event;
sigaction (SIGRTMIN + 1, &action, NULL);
# define TMPDIR "/tmp/test.XXXXXX"
tmpdir = malloc(strlen(TMPDIR) + 1);
strcpy(tmpdir, TMPDIR);
mkdtemp(tmpdir);
# define TMPFILE "/file"
file = malloc(strlen(tmpdir) + strlen(TMPFILE) + 1);
sprintf(file, "%s/%s", tmpdir, TMPFILE);
fd1 = open (tmpdir, O_RDONLY);
fcntl(fd1, F_SETSIG, SIGRTMIN);
fcntl(fd1, F_NOTIFY, DN_MULTISHOT | DN_CREATE);
fd2 = open (tmpdir, O_RDONLY);
fcntl(fd2, F_SETSIG, SIGRTMIN + 1);
fcntl(fd2, F_NOTIFY, DN_MULTISHOT | DN_DELETE);
if (fork()) {
/* This triggers a create event */
creat(file, 0600);
/* This triggers a create and delete event (!) */
unlink(file);
} else {
sleep(1);
rmdir(tmpdir);
}
return 0;
}
Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/notify/dnotify/dnotify.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/notify/dnotify/dnotify.c
+++ b/fs/notify/dnotify/dnotify.c
@@ -91,6 +91,7 @@ static int dnotify_handle_event(struct f
struct dnotify_struct *dn;
struct dnotify_struct **prev;
struct fown_struct *fown;
+ __u32 test_mask = event->mask & ~FS_EVENT_ON_CHILD;
to_tell = event->to_tell;
@@ -106,7 +107,7 @@ static int dnotify_handle_event(struct f
spin_lock(&entry->lock);
prev = &dnentry->dn;
while ((dn = *prev) != NULL) {
- if ((dn->dn_mask & event->mask) == 0) {
+ if ((dn->dn_mask & test_mask) == 0) {
prev = &dn->dn_next;
continue;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [59/89] inotify: fix coalesce duplicate events into a single event in special case
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (57 preceding siblings ...)
2010-03-30 22:58 ` [58/89] dnotify: ignore FS_EVENT_ON_CHILD Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [60/89] fix LOOKUP_FOLLOW on automount "symlinks" Greg KH
` (29 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Wei Yongjun, Eric Paris,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Wei Yongjun <yjwei@cn.fujitsu.com>
commit 3de0ef4f2067da58fa5126d821a56dcb98cdb565 upstream.
If we do rename a dir entry, like this:
rename("/tmp/ino7UrgoJ.rename1", "/tmp/ino7UrgoJ.rename2")
rename("/tmp/ino7UrgoJ.rename2", "/tmp/ino7UrgoJ")
The duplicate events should be coalesced into a single event. But those two
events do not be coalesced into a single event, due to some bad check in
event_compare(). It can not match the two NULL inodes as the same event.
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Eric Paris <eparis@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/notify/notification.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/fs/notify/notification.c
+++ b/fs/notify/notification.c
@@ -143,7 +143,7 @@ static bool event_compare(struct fsnotif
/* remember, after old was put on the wait_q we aren't
* allowed to look at the inode any more, only thing
* left to check was if the file_name is the same */
- if (old->name_len &&
+ if (!old->name_len ||
!strcmp(old->file_name, new->file_name))
return true;
break;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [60/89] fix LOOKUP_FOLLOW on automount "symlinks"
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (58 preceding siblings ...)
2010-03-30 22:58 ` [59/89] inotify: fix coalesce duplicate events into a single event in special case Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [61/89] mm: replace various uses of num_physpages by totalram_pages Greg KH
` (28 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Al Viro, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Al Viro <viro@ZenIV.linux.org.uk>
commit ac278a9c505092dd82077a2446af8f9fc0d9c095 upstream.
Make sure that automount "symlinks" are followed regardless of LOOKUP_FOLLOW;
it should have no effect on them.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/namei.c | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -823,6 +823,17 @@ fail:
}
/*
+ * This is a temporary kludge to deal with "automount" symlinks; proper
+ * solution is to trigger them on follow_mount(), so that do_lookup()
+ * would DTRT. To be killed before 2.6.34-final.
+ */
+static inline int follow_on_final(struct inode *inode, unsigned lookup_flags)
+{
+ return inode && unlikely(inode->i_op->follow_link) &&
+ ((lookup_flags & LOOKUP_FOLLOW) || S_ISDIR(inode->i_mode));
+}
+
+/*
* Name resolution.
* This is the basic name resolution function, turning a pathname into
* the final dentry. We expect 'base' to be positive and a directory.
@@ -964,8 +975,7 @@ last_component:
if (err)
break;
inode = next.dentry->d_inode;
- if ((lookup_flags & LOOKUP_FOLLOW)
- && inode && inode->i_op->follow_link) {
+ if (follow_on_final(inode, lookup_flags)) {
err = do_follow_link(&next, nd);
if (err)
goto return_err;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [61/89] mm: replace various uses of num_physpages by totalram_pages
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (59 preceding siblings ...)
2010-03-30 22:58 ` [60/89] fix LOOKUP_FOLLOW on automount "symlinks" Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [62/89] NFS: Fix a bug in nfs_fscache_release_page() Greg KH
` (27 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jan Beulich, Rusty Russell,
Ingo Molnar, Dave Airlie, Kyle McMartin, Jeremy Fitzhardinge,
Pekka Enberg, Hugh Dickins, David S. Miller, Patrick McHardy,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Beulich <JBeulich@novell.com>
commit 4481374ce88ba8f460c8b89f2572027bd27057d0 upstream.
Sizing of memory allocations shouldn't depend on the number of physical
pages found in a system, as that generally includes (perhaps a huge amount
of) non-RAM pages. The amount of what actually is usable as storage
should instead be used as a basis here.
Some of the calculations (i.e. those not intending to use high memory)
should likely even use (totalram_pages - totalhigh_pages).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Dave Airlie <airlied@linux.ie>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
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>
---
arch/x86/kernel/microcode_core.c | 4 ++--
drivers/char/agp/backend.c | 4 ++--
drivers/parisc/ccio-dma.c | 4 ++--
drivers/parisc/sba_iommu.c | 4 ++--
drivers/xen/balloon.c | 4 ----
fs/ntfs/malloc.h | 2 +-
include/linux/mm.h | 1 +
init/main.c | 4 ++--
mm/slab.c | 2 +-
mm/swap.c | 2 +-
mm/vmalloc.c | 4 ++--
net/core/sock.c | 4 ++--
net/dccp/proto.c | 6 +++---
net/decnet/dn_route.c | 2 +-
net/ipv4/route.c | 2 +-
net/ipv4/tcp.c | 4 ++--
net/netfilter/nf_conntrack_core.c | 4 ++--
net/netfilter/x_tables.c | 2 +-
net/netfilter/xt_hashlimit.c | 8 ++++----
net/netlink/af_netlink.c | 6 +++---
net/sctp/protocol.c | 6 +++---
21 files changed, 38 insertions(+), 41 deletions(-)
--- a/arch/x86/kernel/microcode_core.c
+++ b/arch/x86/kernel/microcode_core.c
@@ -210,8 +210,8 @@ static ssize_t microcode_write(struct fi
{
ssize_t ret = -EINVAL;
- if ((len >> PAGE_SHIFT) > num_physpages) {
- pr_err("microcode: too much data (max %ld pages)\n", num_physpages);
+ if ((len >> PAGE_SHIFT) > totalram_pages) {
+ pr_err("microcode: too much data (max %ld pages)\n", totalram_pages);
return ret;
}
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -114,9 +114,9 @@ static int agp_find_max(void)
long memory, index, result;
#if PAGE_SHIFT < 20
- memory = num_physpages >> (20 - PAGE_SHIFT);
+ memory = totalram_pages >> (20 - PAGE_SHIFT);
#else
- memory = num_physpages << (PAGE_SHIFT - 20);
+ memory = totalram_pages << (PAGE_SHIFT - 20);
#endif
index = 1;
--- a/drivers/parisc/ccio-dma.c
+++ b/drivers/parisc/ccio-dma.c
@@ -1266,7 +1266,7 @@ ccio_ioc_init(struct ioc *ioc)
** Hot-Plug/Removal of PCI cards. (aka PCI OLARD).
*/
- iova_space_size = (u32) (num_physpages / count_parisc_driver(&ccio_driver));
+ iova_space_size = (u32) (totalram_pages / count_parisc_driver(&ccio_driver));
/* limit IOVA space size to 1MB-1GB */
@@ -1305,7 +1305,7 @@ ccio_ioc_init(struct ioc *ioc)
DBG_INIT("%s() hpa 0x%p mem %luMB IOV %dMB (%d bits)\n",
__func__, ioc->ioc_regs,
- (unsigned long) num_physpages >> (20 - PAGE_SHIFT),
+ (unsigned long) totalram_pages >> (20 - PAGE_SHIFT),
iova_space_size>>20,
iov_order + PAGE_SHIFT);
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -1390,7 +1390,7 @@ sba_ioc_init(struct parisc_device *sba,
** for DMA hints - ergo only 30 bits max.
*/
- iova_space_size = (u32) (num_physpages/global_ioc_cnt);
+ iova_space_size = (u32) (totalram_pages/global_ioc_cnt);
/* limit IOVA space size to 1MB-1GB */
if (iova_space_size < (1 << (20 - PAGE_SHIFT))) {
@@ -1415,7 +1415,7 @@ sba_ioc_init(struct parisc_device *sba,
DBG_INIT("%s() hpa 0x%lx mem %ldMB IOV %dMB (%d bits)\n",
__func__,
ioc->ioc_hpa,
- (unsigned long) num_physpages >> (20 - PAGE_SHIFT),
+ (unsigned long) totalram_pages >> (20 - PAGE_SHIFT),
iova_space_size>>20,
iov_order + PAGE_SHIFT);
--- a/drivers/xen/balloon.c
+++ b/drivers/xen/balloon.c
@@ -96,11 +96,7 @@ static struct balloon_stats balloon_stat
/* We increase/decrease in batches which fit in a page */
static unsigned long frame_list[PAGE_SIZE / sizeof(unsigned long)];
-/* VM /proc information for memory */
-extern unsigned long totalram_pages;
-
#ifdef CONFIG_HIGHMEM
-extern unsigned long totalhigh_pages;
#define inc_totalhigh_pages() (totalhigh_pages++)
#define dec_totalhigh_pages() (totalhigh_pages--)
#else
--- a/fs/ntfs/malloc.h
+++ b/fs/ntfs/malloc.h
@@ -47,7 +47,7 @@ static inline void *__ntfs_malloc(unsign
return kmalloc(PAGE_SIZE, gfp_mask & ~__GFP_HIGHMEM);
/* return (void *)__get_free_page(gfp_mask); */
}
- if (likely(size >> PAGE_SHIFT < num_physpages))
+ if (likely((size >> PAGE_SHIFT) < totalram_pages))
return __vmalloc(size, gfp_mask, PAGE_KERNEL);
return NULL;
}
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -25,6 +25,7 @@ extern unsigned long max_mapnr;
#endif
extern unsigned long num_physpages;
+extern unsigned long totalram_pages;
extern void * high_memory;
extern int page_cluster;
--- a/init/main.c
+++ b/init/main.c
@@ -686,12 +686,12 @@ asmlinkage void __init start_kernel(void
#endif
thread_info_cache_init();
cred_init();
- fork_init(num_physpages);
+ fork_init(totalram_pages);
proc_caches_init();
buffer_init();
key_init();
security_init();
- vfs_caches_init(num_physpages);
+ vfs_caches_init(totalram_pages);
radix_tree_init();
signals_init();
/* rootfs populating might need page-writeback */
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -1384,7 +1384,7 @@ void __init kmem_cache_init(void)
* Fragmentation resistance on low memory - only use bigger
* page orders on machines with more than 32MB of memory.
*/
- if (num_physpages > (32 << 20) >> PAGE_SHIFT)
+ if (totalram_pages > (32 << 20) >> PAGE_SHIFT)
slab_break_gfp_order = BREAK_GFP_ORDER_HI;
/* Bootstrap is tricky, because several objects are allocated
--- a/mm/swap.c
+++ b/mm/swap.c
@@ -496,7 +496,7 @@ EXPORT_SYMBOL(pagevec_lookup_tag);
*/
void __init swap_setup(void)
{
- unsigned long megs = num_physpages >> (20 - PAGE_SHIFT);
+ unsigned long megs = totalram_pages >> (20 - PAGE_SHIFT);
#ifdef CONFIG_SWAP
bdi_init(swapper_space.backing_dev_info);
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -1366,7 +1366,7 @@ void *vmap(struct page **pages, unsigned
might_sleep();
- if (count > num_physpages)
+ if (count > totalram_pages)
return NULL;
area = get_vm_area_caller((count << PAGE_SHIFT), flags,
@@ -1473,7 +1473,7 @@ static void *__vmalloc_node(unsigned lon
unsigned long real_size = size;
size = PAGE_ALIGN(size);
- if (!size || (size >> PAGE_SHIFT) > num_physpages)
+ if (!size || (size >> PAGE_SHIFT) > totalram_pages)
return NULL;
area = __get_vm_area_node(size, VM_ALLOC, VMALLOC_START, VMALLOC_END,
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1196,12 +1196,12 @@ EXPORT_SYMBOL_GPL(sk_setup_caps);
void __init sk_init(void)
{
- if (num_physpages <= 4096) {
+ if (totalram_pages <= 4096) {
sysctl_wmem_max = 32767;
sysctl_rmem_max = 32767;
sysctl_wmem_default = 32767;
sysctl_rmem_default = 32767;
- } else if (num_physpages >= 131072) {
+ } else if (totalram_pages >= 131072) {
sysctl_wmem_max = 131071;
sysctl_rmem_max = 131071;
}
--- a/net/dccp/proto.c
+++ b/net/dccp/proto.c
@@ -1049,10 +1049,10 @@ static int __init dccp_init(void)
*
* The methodology is similar to that of the buffer cache.
*/
- if (num_physpages >= (128 * 1024))
- goal = num_physpages >> (21 - PAGE_SHIFT);
+ if (totalram_pages >= (128 * 1024))
+ goal = totalram_pages >> (21 - PAGE_SHIFT);
else
- goal = num_physpages >> (23 - PAGE_SHIFT);
+ goal = totalram_pages >> (23 - PAGE_SHIFT);
if (thash_entries)
goal = (thash_entries *
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1750,7 +1750,7 @@ void __init dn_route_init(void)
dn_route_timer.expires = jiffies + decnet_dst_gc_interval * HZ;
add_timer(&dn_route_timer);
- goal = num_physpages >> (26 - PAGE_SHIFT);
+ goal = totalram_pages >> (26 - PAGE_SHIFT);
for(order = 0; (1UL << order) < goal; order++)
/* NOTHING */;
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -3412,7 +3412,7 @@ int __init ip_rt_init(void)
alloc_large_system_hash("IP route cache",
sizeof(struct rt_hash_bucket),
rhash_entries,
- (num_physpages >= 128 * 1024) ?
+ (totalram_pages >= 128 * 1024) ?
15 : 17,
0,
&rt_hash_log,
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -2862,7 +2862,7 @@ void __init tcp_init(void)
alloc_large_system_hash("TCP established",
sizeof(struct inet_ehash_bucket),
thash_entries,
- (num_physpages >= 128 * 1024) ?
+ (totalram_pages >= 128 * 1024) ?
13 : 15,
0,
&tcp_hashinfo.ehash_size,
@@ -2879,7 +2879,7 @@ void __init tcp_init(void)
alloc_large_system_hash("TCP bind",
sizeof(struct inet_bind_hashbucket),
tcp_hashinfo.ehash_size,
- (num_physpages >= 128 * 1024) ?
+ (totalram_pages >= 128 * 1024) ?
13 : 15,
0,
&tcp_hashinfo.bhash_size,
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1245,9 +1245,9 @@ static int nf_conntrack_init_init_net(vo
* machine has 512 buckets. >= 1GB machines have 16384 buckets. */
if (!nf_conntrack_htable_size) {
nf_conntrack_htable_size
- = (((num_physpages << PAGE_SHIFT) / 16384)
+ = (((totalram_pages << PAGE_SHIFT) / 16384)
/ sizeof(struct hlist_head));
- if (num_physpages > (1024 * 1024 * 1024 / PAGE_SIZE))
+ if (totalram_pages > (1024 * 1024 * 1024 / PAGE_SIZE))
nf_conntrack_htable_size = 16384;
if (nf_conntrack_htable_size < 32)
nf_conntrack_htable_size = 32;
--- a/net/netfilter/x_tables.c
+++ b/net/netfilter/x_tables.c
@@ -617,7 +617,7 @@ struct xt_table_info *xt_alloc_table_inf
int cpu;
/* Pedantry: prevent them from hitting BUG() in vmalloc.c --RR */
- if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > num_physpages)
+ if ((SMP_ALIGN(size) >> PAGE_SHIFT) + 2 > totalram_pages)
return NULL;
newinfo = kzalloc(XT_TABLE_INFO_SZ, GFP_KERNEL);
--- a/net/netfilter/xt_hashlimit.c
+++ b/net/netfilter/xt_hashlimit.c
@@ -194,9 +194,9 @@ static int htable_create_v0(struct xt_ha
if (minfo->cfg.size)
size = minfo->cfg.size;
else {
- size = ((num_physpages << PAGE_SHIFT) / 16384) /
+ size = ((totalram_pages << PAGE_SHIFT) / 16384) /
sizeof(struct list_head);
- if (num_physpages > (1024 * 1024 * 1024 / PAGE_SIZE))
+ if (totalram_pages > (1024 * 1024 * 1024 / PAGE_SIZE))
size = 8192;
if (size < 16)
size = 16;
@@ -266,9 +266,9 @@ static int htable_create(struct xt_hashl
if (minfo->cfg.size) {
size = minfo->cfg.size;
} else {
- size = (num_physpages << PAGE_SHIFT) / 16384 /
+ size = (totalram_pages << PAGE_SHIFT) / 16384 /
sizeof(struct list_head);
- if (num_physpages > 1024 * 1024 * 1024 / PAGE_SIZE)
+ if (totalram_pages > 1024 * 1024 * 1024 / PAGE_SIZE)
size = 8192;
if (size < 16)
size = 16;
--- a/net/netlink/af_netlink.c
+++ b/net/netlink/af_netlink.c
@@ -2026,10 +2026,10 @@ static int __init netlink_proto_init(voi
if (!nl_table)
goto panic;
- if (num_physpages >= (128 * 1024))
- limit = num_physpages >> (21 - PAGE_SHIFT);
+ if (totalram_pages >= (128 * 1024))
+ limit = totalram_pages >> (21 - PAGE_SHIFT);
else
- limit = num_physpages >> (23 - PAGE_SHIFT);
+ limit = totalram_pages >> (23 - PAGE_SHIFT);
order = get_bitmask_order(limit) - 1 + PAGE_SHIFT;
limit = (1UL << order) / sizeof(struct hlist_head);
--- a/net/sctp/protocol.c
+++ b/net/sctp/protocol.c
@@ -1186,10 +1186,10 @@ SCTP_STATIC __init int sctp_init(void)
/* Size and allocate the association hash table.
* The methodology is similar to that of the tcp hash tables.
*/
- if (num_physpages >= (128 * 1024))
- goal = num_physpages >> (22 - PAGE_SHIFT);
+ if (totalram_pages >= (128 * 1024))
+ goal = totalram_pages >> (22 - PAGE_SHIFT);
else
- goal = num_physpages >> (24 - PAGE_SHIFT);
+ goal = totalram_pages >> (24 - PAGE_SHIFT);
for (order = 0; (1UL << order) < goal; order++)
;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [62/89] NFS: Fix a bug in nfs_fscache_release_page()
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (60 preceding siblings ...)
2010-03-30 22:58 ` [61/89] mm: replace various uses of num_physpages by totalram_pages Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [63/89] cifs: fix length calculation for converted unicode readdir names Greg KH
` (26 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Trond Myklebust,
David Howells, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Trond Myklebust <Trond.Myklebust@netapp.com>
commit 2c1740098c708b465e87637b237feb2fd98f129a upstream.
Not having an fscache cookie is perfectly valid if the user didn't mount
with the fscache option.
This patch fixes http://bugzilla.kernel.org/show_bug.cgi?id=15234
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Acked-by: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/nfs/fscache.c | 21 ++++++++++-----------
1 file changed, 10 insertions(+), 11 deletions(-)
--- a/fs/nfs/fscache.c
+++ b/fs/nfs/fscache.c
@@ -337,21 +337,20 @@ void nfs_fscache_reset_inode_cookie(stru
*/
int nfs_fscache_release_page(struct page *page, gfp_t gfp)
{
- struct nfs_inode *nfsi = NFS_I(page->mapping->host);
- struct fscache_cookie *cookie = nfsi->fscache;
-
- BUG_ON(!cookie);
-
- if (fscache_check_page_write(cookie, page)) {
- if (!(gfp & __GFP_WAIT))
- return 0;
- fscache_wait_on_page_write(cookie, page);
- }
-
if (PageFsCache(page)) {
+ struct nfs_inode *nfsi = NFS_I(page->mapping->host);
+ struct fscache_cookie *cookie = nfsi->fscache;
+
+ BUG_ON(!cookie);
dfprintk(FSCACHE, "NFS: fscache releasepage (0x%p/0x%p/0x%p)\n",
cookie, page, nfsi);
+ if (fscache_check_page_write(cookie, page)) {
+ if (!(gfp & __GFP_WAIT))
+ return 0;
+ fscache_wait_on_page_write(cookie, page);
+ }
+
fscache_uncache_page(cookie, page);
nfs_add_fscache_stats(page->mapping->host,
NFSIOS_FSCACHE_PAGES_UNCACHED, 1);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [63/89] cifs: fix length calculation for converted unicode readdir names
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (61 preceding siblings ...)
2010-03-30 22:58 ` [62/89] NFS: Fix a bug in nfs_fscache_release_page() Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [64/89] drm/r128: Add test for initialisation to all ioctls that require it Greg KH
` (25 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dave Kleikamp, Jeff Layton,
Steve French, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jeff Layton <jlayton@redhat.com>
commit f12f98dba6ea1517cd7fbb912208893b9c014c15 upstream.
cifs_from_ucs2 returns the length of the converted name, including the
length of the NULL terminator. We don't want to include the NULL
terminator in the dentry name length however since that'll throw off the
hash calculation for the dentry cache.
I believe that this is the root cause of several problems that have
cropped up recently that seem to be papered over with the "noserverino"
mount option. More confirmation of that would be good, but this is
clearly a bug and it fixes at least one reproducible problem that
was reported.
This patch fixes at least this reproducer in this kernel.org bug:
http://bugzilla.kernel.org/show_bug.cgi?id=15088#c12
Reported-by: Bjorn Tore Sund <bjorn.sund@it.uib.no>
Acked-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/cifs/readdir.c | 1 +
1 file changed, 1 insertion(+)
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -666,6 +666,7 @@ static int cifs_get_name_from_search_buf
min(len, max_len), nlt,
cifs_sb->mnt_cifs_flags &
CIFS_MOUNT_MAP_SPECIAL_CHR);
+ pqst->len -= nls_nullsize(nlt);
} else {
pqst->name = filename;
pqst->len = len;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [64/89] drm/r128: Add test for initialisation to all ioctls that require it
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (62 preceding siblings ...)
2010-03-30 22:58 ` [63/89] cifs: fix length calculation for converted unicode readdir names Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [65/89] ALSA: hda-intel: Avoid divide by zero crash Greg KH
` (24 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ben Hutchings, Dave Airlie,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ben Hutchings <ben@decadent.org.uk>
commit 7dc482dfeeeefcfd000d4271c4626937406756d7 upstream.
Almost all r128's private ioctls require that the CCE state has
already been initialised. However, most do not test that this has
been done, and will proceed to dereference a null pointer. This may
result in a security vulnerability, since some ioctls are
unprivileged.
This adds a macro for the common initialisation test and changes all
ioctl implementations that require prior initialisation to use that
macro.
Also, r128_do_init_cce() does not test that the CCE state has not
been initialised already. Repeated initialisation may lead to a crash
or resource leak. This adds that test.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/gpu/drm/r128/r128_cce.c | 18 ++++++++++++++----
drivers/gpu/drm/r128/r128_drv.h | 8 ++++++++
drivers/gpu/drm/r128/r128_state.c | 36 +++++++++++++++++++-----------------
3 files changed, 41 insertions(+), 21 deletions(-)
--- a/drivers/gpu/drm/r128/r128_cce.c
+++ b/drivers/gpu/drm/r128/r128_cce.c
@@ -353,6 +353,11 @@ static int r128_do_init_cce(struct drm_d
DRM_DEBUG("\n");
+ if (dev->dev_private) {
+ DRM_DEBUG("called when already initialized\n");
+ return -EINVAL;
+ }
+
dev_priv = kzalloc(sizeof(drm_r128_private_t), GFP_KERNEL);
if (dev_priv == NULL)
return -ENOMEM;
@@ -649,6 +654,8 @@ int r128_cce_start(struct drm_device *de
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
if (dev_priv->cce_running || dev_priv->cce_mode == R128_PM4_NONPM4) {
DRM_DEBUG("while CCE running\n");
return 0;
@@ -671,6 +678,8 @@ int r128_cce_stop(struct drm_device *dev
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
/* Flush any pending CCE commands. This ensures any outstanding
* commands are exectuted by the engine before we turn it off.
*/
@@ -708,10 +717,7 @@ int r128_cce_reset(struct drm_device *de
LOCK_TEST_WITH_RETURN(dev, file_priv);
- if (!dev_priv) {
- DRM_DEBUG("called before init done\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
r128_do_cce_reset(dev_priv);
@@ -728,6 +734,8 @@ int r128_cce_idle(struct drm_device *dev
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
if (dev_priv->cce_running) {
r128_do_cce_flush(dev_priv);
}
@@ -741,6 +749,8 @@ int r128_engine_reset(struct drm_device
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev->dev_private);
+
return r128_do_engine_reset(dev);
}
--- a/drivers/gpu/drm/r128/r128_drv.h
+++ b/drivers/gpu/drm/r128/r128_drv.h
@@ -422,6 +422,14 @@ static __inline__ void r128_update_ring_
* Misc helper macros
*/
+#define DEV_INIT_TEST_WITH_RETURN(_dev_priv) \
+do { \
+ if (!_dev_priv) { \
+ DRM_ERROR("called with no initialization\n"); \
+ return -EINVAL; \
+ } \
+} while (0)
+
#define RING_SPACE_TEST_WITH_RETURN( dev_priv ) \
do { \
drm_r128_ring_buffer_t *ring = &dev_priv->ring; int i; \
--- a/drivers/gpu/drm/r128/r128_state.c
+++ b/drivers/gpu/drm/r128/r128_state.c
@@ -1244,14 +1244,18 @@ static void r128_cce_dispatch_stipple(st
static int r128_cce_clear(struct drm_device *dev, void *data, struct drm_file *file_priv)
{
drm_r128_private_t *dev_priv = dev->dev_private;
- drm_r128_sarea_t *sarea_priv = dev_priv->sarea_priv;
+ drm_r128_sarea_t *sarea_priv;
drm_r128_clear_t *clear = data;
DRM_DEBUG("\n");
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
RING_SPACE_TEST_WITH_RETURN(dev_priv);
+ sarea_priv = dev_priv->sarea_priv;
+
if (sarea_priv->nbox > R128_NR_SAREA_CLIPRECTS)
sarea_priv->nbox = R128_NR_SAREA_CLIPRECTS;
@@ -1312,6 +1316,8 @@ static int r128_cce_flip(struct drm_devi
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
RING_SPACE_TEST_WITH_RETURN(dev_priv);
if (!dev_priv->page_flipping)
@@ -1331,6 +1337,8 @@ static int r128_cce_swap(struct drm_devi
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
RING_SPACE_TEST_WITH_RETURN(dev_priv);
if (sarea_priv->nbox > R128_NR_SAREA_CLIPRECTS)
@@ -1354,10 +1362,7 @@ static int r128_cce_vertex(struct drm_de
LOCK_TEST_WITH_RETURN(dev, file_priv);
- if (!dev_priv) {
- DRM_ERROR("called with no initialization\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
DRM_DEBUG("pid=%d index=%d count=%d discard=%d\n",
DRM_CURRENTPID, vertex->idx, vertex->count, vertex->discard);
@@ -1410,10 +1415,7 @@ static int r128_cce_indices(struct drm_d
LOCK_TEST_WITH_RETURN(dev, file_priv);
- if (!dev_priv) {
- DRM_ERROR("called with no initialization\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
DRM_DEBUG("pid=%d buf=%d s=%d e=%d d=%d\n", DRM_CURRENTPID,
elts->idx, elts->start, elts->end, elts->discard);
@@ -1476,6 +1478,8 @@ static int r128_cce_blit(struct drm_devi
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
DRM_DEBUG("pid=%d index=%d\n", DRM_CURRENTPID, blit->idx);
if (blit->idx < 0 || blit->idx >= dma->buf_count) {
@@ -1501,6 +1505,8 @@ static int r128_cce_depth(struct drm_dev
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
RING_SPACE_TEST_WITH_RETURN(dev_priv);
ret = -EINVAL;
@@ -1531,6 +1537,8 @@ static int r128_cce_stipple(struct drm_d
LOCK_TEST_WITH_RETURN(dev, file_priv);
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
+
if (DRM_COPY_FROM_USER(&mask, stipple->mask, 32 * sizeof(u32)))
return -EFAULT;
@@ -1555,10 +1563,7 @@ static int r128_cce_indirect(struct drm_
LOCK_TEST_WITH_RETURN(dev, file_priv);
- if (!dev_priv) {
- DRM_ERROR("called with no initialization\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
DRM_DEBUG("idx=%d s=%d e=%d d=%d\n",
indirect->idx, indirect->start, indirect->end,
@@ -1620,10 +1625,7 @@ static int r128_getparam(struct drm_devi
drm_r128_getparam_t *param = data;
int value;
- if (!dev_priv) {
- DRM_ERROR("called with no initialization\n");
- return -EINVAL;
- }
+ DEV_INIT_TEST_WITH_RETURN(dev_priv);
DRM_DEBUG("pid=%d\n", DRM_CURRENTPID);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [65/89] ALSA: hda-intel: Avoid divide by zero crash
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (63 preceding siblings ...)
2010-03-30 22:58 ` [64/89] drm/r128: Add test for initialisation to all ioctls that require it Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [66/89] b43: Fix throughput regression Greg KH
` (23 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jody Bruchon, Takashi Iwai,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jody Bruchon <jody@nctritech.com>
commit fed08d036f2aabd8d0c684439de37f8ebec2bbc2 upstream.
On my AMD780V chipset, hda_intel.c can crash the kernel with a divide by
zero
for as-yet unknown reasons. A simple check for zero prevents it, though
the problem that causes it remains. Since the workaround is harmless and
won't affect anyone except victims of this bug, it should be safe;
moreover,
because this crash can be triggered by a user-mode application, there are
denial of service implications on the systems affected by the bug without
the patch.
Signed-off-by: Jody Bruchon <jody@nctritech.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
sound/pci/hda/hda_intel.c | 6 ++++++
1 file changed, 6 insertions(+)
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1839,6 +1839,12 @@ static int azx_position_ok(struct azx *c
if (!bdl_pos_adj[chip->dev_index])
return 1; /* no delayed ack */
+ if (azx_dev->period_bytes == 0) {
+ printk(KERN_WARNING
+ "hda-intel: Divide by zero was avoided "
+ "in azx_dev->period_bytes.\n");
+ return 0;
+ }
if (pos % azx_dev->period_bytes > azx_dev->period_bytes / 2)
return 0; /* NG - it's below the period boundary */
return 1; /* OK, it's fine */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [66/89] b43: Fix throughput regression
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (64 preceding siblings ...)
2010-03-30 22:58 ` [65/89] ALSA: hda-intel: Avoid divide by zero crash Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [67/89] class: Free the class private data in class_release Greg KH
` (22 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Larry Finger,
John W. Linville, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Larry Finger <Larry.Finger@lwfinger.net>
commit b6c3f5be7c6ac3375f44de4545c1ffe216b34022 upstream.
Commit c7ab5ef9bcd281135c21b4732c9be779585181be entitled "b43: implement
short slot and basic rate handling" reduced the transmit throughput for
my BCM4311 device from 18 Mb/s to 0.7 Mb/s. The basic rate handling
portion is OK, the problem is in the short slot handling.
Prior to this change, the short slot enable/disable routines were never
called. Experimentation showed that the critical part was changing the
value at offset 0x0010 in the shared memory. This is supposed to contain
the 802.11 Slot Time in usec, but if it is changed from its initial value
of zero, performance is destroyed. On the other hand, changing the value
in the MMIO register corresponding to the Interframe Slot Time increased
performance from 18 to 22 Mb/s. A BCM4306/3 also shows dramatic
improvement of the transmit rate from 5.3 to 19.0 Mb/s.
Other changes in the patch include removal of the magic number for the
MMIO register, and allowing the slot time to be set for any PHY operating
in the 2.4 GHz band. Previously, the routine was executed only for G PHYs.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/b43/b43.h | 1 +
drivers/net/wireless/b43/main.c | 13 ++++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
--- a/drivers/net/wireless/b43/b43.h
+++ b/drivers/net/wireless/b43/b43.h
@@ -117,6 +117,7 @@
#define B43_MMIO_TSF_2 0x636 /* core rev < 3 only */
#define B43_MMIO_TSF_3 0x638 /* core rev < 3 only */
#define B43_MMIO_RNG 0x65A
+#define B43_MMIO_IFSSLOT 0x684 /* Interframe slot time */
#define B43_MMIO_IFSCTL 0x688 /* Interframe space control */
#define B43_MMIO_IFSCTL_USE_EDCF 0x0004
#define B43_MMIO_POWERUP_DELAY 0x6A8
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -664,10 +664,17 @@ static void b43_upload_card_macaddress(s
static void b43_set_slot_time(struct b43_wldev *dev, u16 slot_time)
{
/* slot_time is in usec. */
- if (dev->phy.type != B43_PHYTYPE_G)
+ /* This test used to exit for all but a G PHY. */
+ if (b43_current_band(dev->wl) == IEEE80211_BAND_5GHZ)
return;
- b43_write16(dev, 0x684, 510 + slot_time);
- b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time);
+ b43_write16(dev, B43_MMIO_IFSSLOT, 510 + slot_time);
+ /* Shared memory location 0x0010 is the slot time and should be
+ * set to slot_time; however, this register is initially 0 and changing
+ * the value adversely affects the transmit rate for BCM4311
+ * devices. Until this behavior is unterstood, delete this step
+ *
+ * b43_shm_write16(dev, B43_SHM_SHARED, 0x0010, slot_time);
+ */
}
static void b43_short_slot_timing_enable(struct b43_wldev *dev)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [67/89] class: Free the class private data in class_release
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (65 preceding siblings ...)
2010-03-30 22:58 ` [66/89] b43: Fix throughput regression Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [68/89] serial: 8250: add serial transmitter fully empty test Greg KH
` (21 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Laurent Pinchart,
Artem Bityutskiy, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
commit 18d19c96457d172d913510c083bc7411ed40cb10 upstream.
Fix a memory leak by freeing the memory allocated in __class_register
for the class private data.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/base/class.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -59,6 +59,8 @@ static void class_release(struct kobject
else
pr_debug("class '%s' does not have a release() function, "
"be careful\n", class->name);
+
+ kfree(cp);
}
static struct sysfs_ops class_sysfs_ops = {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [68/89] serial: 8250: add serial transmitter fully empty test
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (66 preceding siblings ...)
2010-03-30 22:58 ` [67/89] class: Free the class private data in class_release Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [69/89] ACPI: Be in TS_POLLING state during mwait based C-state entry Greg KH
` (20 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dick Hollenbeck, Alan Cox,
Kees Schoenmakers, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dick Hollenbeck <dick@softplc.com>
commit bca476139d2ded86be146dae09b06e22548b67f3 upstream.
When controlling an industrial radio modem it can be necessary to
manipulate the handshake lines in order to control the radio modem's
transmitter, from userspace.
The transmitter should not be turned off before all characters have been
transmitted. serial8250_tx_empty() was reporting that all characters were
transmitted before they actually were.
===
Discovered in parallel with more testing and analysis by Kees Schoenmakers
as follows:
I ran into an NetMos 9835 serial pci board which behaves a little
different than the standard. This type of expansion board is very common.
"Standard" 8250 compatible devices clear the 'UART_LST_TEMT" bit together
with the "UART_LSR_THRE" bit when writing data to the device.
The NetMos device does it slightly different
I believe that the TEMT bit is coupled to the shift register. The problem
is that after writing data to the device and very quickly after that one
does call serial8250_tx_empty, it returns the wrong information.
My patch makes the test more robust (and solves the problem) and it does
not affect the already correct devices.
Alan:
We may yet need to quirk this but now we know which chips we have a
way to do that should we find this breaks some other 8250 clone with
dodgy THRE.
Signed-off-by: Dick Hollenbeck <dick@softplc.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: Kees Schoenmakers <k.schoenmakers@sigmae.nl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/serial/8250.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -81,6 +81,9 @@ static int serial_index(struct uart_port
#define PASS_LIMIT 256
+#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
+
+
/*
* We default to IRQ0 for the "no irq" hack. Some
* machine types want others as well - they're free
@@ -1790,7 +1793,7 @@ static unsigned int serial8250_tx_empty(
up->lsr_saved_flags |= lsr & LSR_SAVE_FLAGS;
spin_unlock_irqrestore(&up->port.lock, flags);
- return lsr & UART_LSR_TEMT ? TIOCSER_TEMT : 0;
+ return (lsr & BOTH_EMPTY) == BOTH_EMPTY ? TIOCSER_TEMT : 0;
}
static unsigned int serial8250_get_mctrl(struct uart_port *port)
@@ -1848,8 +1851,6 @@ static void serial8250_break_ctl(struct
spin_unlock_irqrestore(&up->port.lock, flags);
}
-#define BOTH_EMPTY (UART_LSR_TEMT | UART_LSR_THRE)
-
/*
* Wait for transmitter & holding register to empty
*/
^ permalink raw reply [flat|nested] 432+ messages in thread
* [69/89] ACPI: Be in TS_POLLING state during mwait based C-state entry
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (67 preceding siblings ...)
2010-03-30 22:58 ` [68/89] serial: 8250: add serial transmitter fully empty test Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [70/89] airo: fix setting zero length WEP key Greg KH
` (19 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Venkatesh Pallipadi,
Len Brown, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Pallipadi, Venkatesh <venkatesh.pallipadi@intel.com>
commit d306ebc28649b89877a22158fe0076f06cc46f60 upstream.
ACPI deep C-state entry had a long standing bug/missing feature, wherein we were sending
resched IPIs when an idle CPU is in mwait based deep C-state. Only mwait based C1 was using
the write to the monitored address to wake up mwait'ing CPU.
This patch changes the code to retain TS_POLLING bit if we are entering an mwait based
deep C-state.
The patch has been verified to reduce the number of resched IPIs in general and also
improves the performance/power on workloads with low system utilization (i.e., when mwait based
deep C-states are being used).
Fixes "netperf ~50% regression with 2.6.33-rc1, bisect to 1b9508f"
http://marc.info/?l=linux-kernel&m=126441481427331&w=4
Reported-by: Lin Ming <ming.m.lin@intel.com>
Tested-by: Alex Shi <alex.shi@intel.com>
Signed-off-by: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/acpi/processor_idle.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
--- a/drivers/acpi/processor_idle.c
+++ b/drivers/acpi/processor_idle.c
@@ -876,12 +876,14 @@ static int acpi_idle_enter_simple(struct
return(acpi_idle_enter_c1(dev, state));
local_irq_disable();
- current_thread_info()->status &= ~TS_POLLING;
- /*
- * TS_POLLING-cleared state must be visible before we test
- * NEED_RESCHED:
- */
- smp_mb();
+ if (cx->entry_method != ACPI_CSTATE_FFH) {
+ current_thread_info()->status &= ~TS_POLLING;
+ /*
+ * TS_POLLING-cleared state must be visible before we test
+ * NEED_RESCHED:
+ */
+ smp_mb();
+ }
if (unlikely(need_resched())) {
current_thread_info()->status |= TS_POLLING;
@@ -961,12 +963,14 @@ static int acpi_idle_enter_bm(struct cpu
}
local_irq_disable();
- current_thread_info()->status &= ~TS_POLLING;
- /*
- * TS_POLLING-cleared state must be visible before we test
- * NEED_RESCHED:
- */
- smp_mb();
+ if (cx->entry_method != ACPI_CSTATE_FFH) {
+ current_thread_info()->status &= ~TS_POLLING;
+ /*
+ * TS_POLLING-cleared state must be visible before we test
+ * NEED_RESCHED:
+ */
+ smp_mb();
+ }
if (unlikely(need_resched())) {
current_thread_info()->status |= TS_POLLING;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [70/89] airo: fix setting zero length WEP key
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (68 preceding siblings ...)
2010-03-30 22:58 ` [69/89] ACPI: Be in TS_POLLING state during mwait based C-state entry Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [71/89] [SCSI] mpt2sas: Delete volume before HBA detach Greg KH
` (18 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dan Williams,
Stanislaw Gruszka, John W. Linville, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Stanislaw Gruszka <sgruszka@redhat.com>
commit f09c256375c7cf1e112b8ef6306cdd313490d7c0 upstream.
Patch prevents call set_wep_key() with zero key length. That fix long
standing regression since commit c0380693520b1a1e4f756799a0edc379378b462a
"airo: clean up WEP key operations". Additionally print call trace when
someone will try to use improper parameters, and remove key.len = 0
assignment, because it is in not possible code path.
Reported-by: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu>
Bisected-by: Chris Siebenmann <cks-rhbugzilla@cs.toronto.edu>
Tested-by: Chris Siebenmann <cks@cs.toronto.edu>
Cc: Dan Williams <dcbw@redhat.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/net/wireless/airo.c | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
--- a/drivers/net/wireless/airo.c
+++ b/drivers/net/wireless/airo.c
@@ -5249,11 +5249,7 @@ static int set_wep_key(struct airo_info
WepKeyRid wkr;
int rc;
- if (keylen == 0) {
- airo_print_err(ai->dev->name, "%s: key length to set was zero",
- __func__);
- return -1;
- }
+ WARN_ON(keylen == 0);
memset(&wkr, 0, sizeof(wkr));
wkr.len = cpu_to_le16(sizeof(wkr));
@@ -6399,11 +6395,7 @@ static int airo_set_encode(struct net_de
if (dwrq->length > MIN_KEY_SIZE)
key.len = MAX_KEY_SIZE;
else
- if (dwrq->length > 0)
- key.len = MIN_KEY_SIZE;
- else
- /* Disable the key */
- key.len = 0;
+ key.len = MIN_KEY_SIZE;
/* Check if the key is not marked as invalid */
if(!(dwrq->flags & IW_ENCODE_NOKEY)) {
/* Cleanup */
@@ -6584,12 +6576,22 @@ static int airo_set_encodeext(struct net
default:
return -EINVAL;
}
- /* Send the key to the card */
- rc = set_wep_key(local, idx, key.key, key.len, perm, 1);
- if (rc < 0) {
- airo_print_err(local->dev->name, "failed to set WEP key"
- " at index %d: %d.", idx, rc);
- return rc;
+ if (key.len == 0) {
+ rc = set_wep_tx_idx(local, idx, perm, 1);
+ if (rc < 0) {
+ airo_print_err(local->dev->name,
+ "failed to set WEP transmit index to %d: %d.",
+ idx, rc);
+ return rc;
+ }
+ } else {
+ rc = set_wep_key(local, idx, key.key, key.len, perm, 1);
+ if (rc < 0) {
+ airo_print_err(local->dev->name,
+ "failed to set WEP key at index %d: %d.",
+ idx, rc);
+ return rc;
+ }
}
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [71/89] [SCSI] mpt2sas: Delete volume before HBA detach.
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (69 preceding siblings ...)
2010-03-30 22:58 ` [70/89] airo: fix setting zero length WEP key Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [72/89] V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion Greg KH
` (17 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Kashyap Desai,
James Bottomley, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Kashyap, Desai <kashyap.desai@lsi.com>
commit d7384b28afb2bf2b7be835ddc8c852bdc5e0ce1c upstream.
The driver hangs when doing `rmmod mpt2sas` if there are any
IR volumes present.The hang is due the scsi midlayer trying to access the
IR volumes after the driver releases controller resources. Perhaps when
scsi_remove_host is called,the scsi mid layer is sending some request.
This doesn't occur for bare drives becuase the driver is already reporting
those drives deleted prior to calling mpt2sas_base_detach.
To solve this issue, we need to delete the volumes as well.
Signed-off-by: Kashyap Desai <kashyap.desai@lsi.com>
Reviewed-by: Eric Moore <eric.moore@lsi.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
--- a/drivers/scsi/mpt2sas/mpt2sas_scsih.c
+++ b/drivers/scsi/mpt2sas/mpt2sas_scsih.c
@@ -5496,6 +5496,8 @@ _scsih_remove(struct pci_dev *pdev)
struct _sas_port *mpt2sas_port;
struct _sas_device *sas_device;
struct _sas_node *expander_sibling;
+ struct _raid_device *raid_device, *next;
+ struct MPT2SAS_TARGET *sas_target_priv_data;
struct workqueue_struct *wq;
unsigned long flags;
@@ -5509,6 +5511,21 @@ _scsih_remove(struct pci_dev *pdev)
if (wq)
destroy_workqueue(wq);
+ /* release all the volumes */
+ list_for_each_entry_safe(raid_device, next, &ioc->raid_device_list,
+ list) {
+ if (raid_device->starget) {
+ sas_target_priv_data =
+ raid_device->starget->hostdata;
+ sas_target_priv_data->deleted = 1;
+ scsi_remove_target(&raid_device->starget->dev);
+ }
+ printk(MPT2SAS_INFO_FMT "removing handle(0x%04x), wwid"
+ "(0x%016llx)\n", ioc->name, raid_device->handle,
+ (unsigned long long) raid_device->wwid);
+ _scsih_raid_device_remove(ioc, raid_device);
+ }
+
/* free ports attached to the sas_host */
retry_again:
list_for_each_entry(mpt2sas_port,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [72/89] V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion.
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (70 preceding siblings ...)
2010-03-30 22:58 ` [71/89] [SCSI] mpt2sas: Delete volume before HBA detach Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [73/89] x86: Fix SCI on IOAPIC != 0 Greg KH
` (16 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Laurent Pinchart,
Martin Fuzzey, Mauro Carvalho Chehab, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Martin Fuzzey <mfuzzey@gmail.com>
commit 53f68607caba85db9a73846ccd289e4b7fa96295 upstream.
Regression was caused by my commit 6b35ca0d3d586b8ecb8396821af21186e20afaf0
which determined message size using sizeof rather than hardcoded constants.
Unfortunately pwc_set_shutter_speed reuses a 2 byte buffer for a one byte
message too so the sizeof was bogus in this case.
All other uses of sizeof checked and are ok.
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Martin Fuzzey <mfuzzey@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/media/video/pwc/pwc-ctrl.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/media/video/pwc/pwc-ctrl.c
+++ b/drivers/media/video/pwc/pwc-ctrl.c
@@ -753,7 +753,7 @@ int pwc_set_shutter_speed(struct pwc_dev
buf[0] = 0xff; /* fixed */
ret = send_control_msg(pdev,
- SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, sizeof(buf));
+ SET_LUM_CTL, SHUTTER_MODE_FORMATTER, &buf, 1);
if (!mode && ret >= 0) {
if (value < 0)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [73/89] x86: Fix SCI on IOAPIC != 0
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (71 preceding siblings ...)
2010-03-30 22:58 ` [72/89] V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [74/89] x86, ia32_aout: do not kill argument mapping Greg KH
` (15 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Yinghai Lu, H. Peter Anvin,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Yinghai Lu <yinghai@kernel.org>
commit 18dce6ba5c8c6bd0f3ab4efa4cbdd698dab5c40a upstream.
Thomas Renninger <trenn@suse.de> reported on IBM x3330
booting a latest kernel on this machine results in:
PCI: PCI BIOS revision 2.10 entry at 0xfd61c, last bus=1
PCI: Using configuration type 1 for base access bio: create slab <bio-0> at 0
ACPI: SCI (IRQ30) allocation failed
ACPI Exception: AE_NOT_ACQUIRED, Unable to install System Control Interrupt handler (20090903/evevent-161)
ACPI: Unable to start the ACPI Interpreter
Later all kind of devices fail...
and bisect it down to this commit:
commit b9c61b70075c87a8612624736faf4a2de5b1ed30
x86/pci: update pirq_enable_irq() to setup io apic routing
it turns out we need to set irq routing for the sci on ioapic1 early.
-v2: make it work without sparseirq too.
-v3: fix checkpatch.pl warning, and cc to stable
Reported-by: Thomas Renninger <trenn@suse.de>
Bisected-by: Thomas Renninger <trenn@suse.de>
Tested-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
LKML-Reference: <1265793639-15071-2-git-send-email-yinghai@kernel.org>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/include/asm/io_apic.h | 1
arch/x86/kernel/acpi/boot.c | 9 ++++++-
arch/x86/kernel/apic/io_apic.c | 50 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 59 insertions(+), 1 deletion(-)
--- a/arch/x86/include/asm/io_apic.h
+++ b/arch/x86/include/asm/io_apic.h
@@ -159,6 +159,7 @@ extern int io_apic_get_redir_entries(int
struct io_apic_irq_attr;
extern int io_apic_set_pci_routing(struct device *dev, int irq,
struct io_apic_irq_attr *irq_attr);
+void setup_IO_APIC_irq_extra(u32 gsi);
extern int (*ioapic_renumber_irq)(int ioapic, int irq);
extern void ioapic_init_mappings(void);
extern void ioapic_insert_resources(void);
--- a/arch/x86/kernel/acpi/boot.c
+++ b/arch/x86/kernel/acpi/boot.c
@@ -446,6 +446,12 @@ void __init acpi_pic_sci_set_trigger(uns
int acpi_gsi_to_irq(u32 gsi, unsigned int *irq)
{
*irq = gsi;
+
+#ifdef CONFIG_X86_IO_APIC
+ if (acpi_irq_model == ACPI_IRQ_MODEL_IOAPIC)
+ setup_IO_APIC_irq_extra(gsi);
+#endif
+
return 0;
}
@@ -473,7 +479,8 @@ int acpi_register_gsi(struct device *dev
plat_gsi = mp_register_gsi(dev, gsi, trigger, polarity);
}
#endif
- acpi_gsi_to_irq(plat_gsi, &irq);
+ irq = plat_gsi;
+
return irq;
}
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1558,6 +1558,56 @@ static void __init setup_IO_APIC_irqs(vo
}
/*
+ * for the gsit that is not in first ioapic
+ * but could not use acpi_register_gsi()
+ * like some special sci in IBM x3330
+ */
+void setup_IO_APIC_irq_extra(u32 gsi)
+{
+ int apic_id = 0, pin, idx, irq;
+ int node = cpu_to_node(boot_cpu_id);
+ struct irq_desc *desc;
+ struct irq_cfg *cfg;
+
+ /*
+ * Convert 'gsi' to 'ioapic.pin'.
+ */
+ apic_id = mp_find_ioapic(gsi);
+ if (apic_id < 0)
+ return;
+
+ pin = mp_find_ioapic_pin(apic_id, gsi);
+ idx = find_irq_entry(apic_id, pin, mp_INT);
+ if (idx == -1)
+ return;
+
+ irq = pin_2_irq(idx, apic_id, pin);
+#ifdef CONFIG_SPARSE_IRQ
+ desc = irq_to_desc(irq);
+ if (desc)
+ return;
+#endif
+ desc = irq_to_desc_alloc_node(irq, node);
+ if (!desc) {
+ printk(KERN_INFO "can not get irq_desc for %d\n", irq);
+ return;
+ }
+
+ cfg = desc->chip_data;
+ add_pin_to_irq_node(cfg, node, apic_id, pin);
+
+ if (test_bit(pin, mp_ioapic_routing[apic_id].pin_programmed)) {
+ pr_debug("Pin %d-%d already programmed\n",
+ mp_ioapics[apic_id].apicid, pin);
+ return;
+ }
+ set_bit(pin, mp_ioapic_routing[apic_id].pin_programmed);
+
+ setup_IO_APIC_irq(apic_id, pin, irq, desc,
+ irq_trigger(idx), irq_polarity(idx));
+}
+
+/*
* Set up the timer pin, possibly with the 8259A-master behind.
*/
static void __init setup_timer_IRQ0_pin(unsigned int apic_id, unsigned int pin,
^ permalink raw reply [flat|nested] 432+ messages in thread
* [74/89] x86, ia32_aout: do not kill argument mapping
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (72 preceding siblings ...)
2010-03-30 22:58 ` [73/89] x86: Fix SCI on IOAPIC != 0 Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [75/89] Split flush_old_exec into two functions Greg KH
` (14 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jiri Slaby, Ingo Molnar,
Thomas Gleixner, Ollie Wild, x86, H. Peter Anvin,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jiri Slaby <jslaby@suse.cz>
commit 318f6b228ba88a394ef560efc1bfe028ad5ae6b6 upstream.
Do not set current->mm->mmap to NULL in 32-bit emulation on 64-bit
load_aout_binary after flush_old_exec as it would destroy already
set brpm mapping with arguments.
Introduced by b6a2fea39318e43fee84fa7b0b90d68bed92d2ba
mm: variable length argument support
where the argument mapping in bprm was added.
[ hpa: this is a regression from 2.6.22... time to kill a.out? ]
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
LKML-Reference: <1265831716-7668-1-git-send-email-jslaby@suse.cz>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ollie Wild <aaw@google.com>
Cc: x86@kernel.org
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/ia32/ia32_aout.c | 1 -
1 file changed, 1 deletion(-)
--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -326,7 +326,6 @@ static int load_aout_binary(struct linux
current->mm->free_area_cache = TASK_UNMAPPED_BASE;
current->mm->cached_hole_size = 0;
- current->mm->mmap = NULL;
install_exec_creds(bprm);
current->flags &= ~PF_FORKNOEXEC;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [75/89] Split flush_old_exec into two functions
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (73 preceding siblings ...)
2010-03-30 22:58 ` [74/89] x86, ia32_aout: do not kill argument mapping Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [76/89] sparc: TIF_ABI_PENDING bit removal Greg KH
` (13 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, H. Peter Anvin,
Greg Kroah-Hartman, Stefan Bader
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 221af7f87b97431e3ee21ce4b0e77d5411cf1549 upstream.
'flush_old_exec()' is the point of no return when doing an execve(), and
it is pretty badly misnamed. It doesn't just flush the old executable
environment, it also starts up the new one.
Which is very inconvenient for things like setting up the new
personality, because we want the new personality to affect the starting
of the new environment, but at the same time we do _not_ want the new
personality to take effect if flushing the old one fails.
As a result, the x86-64 '32-bit' personality is actually done using this
insane "I'm going to change the ABI, but I haven't done it yet" bit
(TIF_ABI_PENDING), with SET_PERSONALITY() not actually setting the
personality, but just the "pending" bit, so that "flush_thread()" can do
the actual personality magic.
This patch in no way changes any of that insanity, but it does split the
'flush_old_exec()' function up into a preparatory part that can fail
(still called flush_old_exec()), and a new part that will actually set
up the new exec environment (setup_new_exec()). All callers are changed
to trivially comply with the new world order.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
arch/sh/kernel/process_64.c | 2 +-
arch/x86/ia32/ia32_aout.c | 10 ++++++----
fs/binfmt_aout.c | 1 +
fs/binfmt_elf.c | 27 ++-------------------------
fs/binfmt_elf_fdpic.c | 3 +++
fs/binfmt_flat.c | 1 +
fs/binfmt_som.c | 1 +
fs/exec.c | 26 ++++++++++++++++----------
include/linux/binfmts.h | 1 +
include/linux/sched.h | 2 +-
10 files changed, 33 insertions(+), 41 deletions(-)
--- a/arch/sh/kernel/process_64.c
+++ b/arch/sh/kernel/process_64.c
@@ -367,7 +367,7 @@ void exit_thread(void)
void flush_thread(void)
{
- /* Called by fs/exec.c (flush_old_exec) to remove traces of a
+ /* Called by fs/exec.c (setup_new_exec) to remove traces of a
* previously running executable. */
#ifdef CONFIG_SH_FPU
if (last_task_used_math == current) {
--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -308,15 +308,17 @@ static int load_aout_binary(struct linux
if (retval)
return retval;
- regs->cs = __USER32_CS;
- regs->r8 = regs->r9 = regs->r10 = regs->r11 = regs->r12 =
- regs->r13 = regs->r14 = regs->r15 = 0;
-
/* OK, This is the point of no return */
set_personality(PER_LINUX);
set_thread_flag(TIF_IA32);
clear_thread_flag(TIF_ABI_PENDING);
+ setup_new_exec(bprm);
+
+ regs->cs = __USER32_CS;
+ regs->r8 = regs->r9 = regs->r10 = regs->r11 = regs->r12 =
+ regs->r13 = regs->r14 = regs->r15 = 0;
+
current->mm->end_code = ex.a_text +
(current->mm->start_code = N_TXTADDR(ex));
current->mm->end_data = ex.a_data +
--- a/fs/binfmt_aout.c
+++ b/fs/binfmt_aout.c
@@ -263,6 +263,7 @@ static int load_aout_binary(struct linux
#else
set_personality(PER_LINUX);
#endif
+ setup_new_exec(bprm);
current->mm->end_code = ex.a_text +
(current->mm->start_code = N_TXTADDR(ex));
--- a/fs/binfmt_elf.c
+++ b/fs/binfmt_elf.c
@@ -662,27 +662,6 @@ static int load_elf_binary(struct linux_
if (elf_interpreter[elf_ppnt->p_filesz - 1] != '\0')
goto out_free_interp;
- /*
- * The early SET_PERSONALITY here is so that the lookup
- * for the interpreter happens in the namespace of the
- * to-be-execed image. SET_PERSONALITY can select an
- * alternate root.
- *
- * However, SET_PERSONALITY is NOT allowed to switch
- * this task into the new images's memory mapping
- * policy - that is, TASK_SIZE must still evaluate to
- * that which is appropriate to the execing application.
- * This is because exit_mmap() needs to have TASK_SIZE
- * evaluate to the size of the old image.
- *
- * So if (say) a 64-bit application is execing a 32-bit
- * application it is the architecture's responsibility
- * to defer changing the value of TASK_SIZE until the
- * switch really is going to happen - do this in
- * flush_thread(). - akpm
- */
- SET_PERSONALITY(loc->elf_ex);
-
interpreter = open_exec(elf_interpreter);
retval = PTR_ERR(interpreter);
if (IS_ERR(interpreter))
@@ -730,9 +709,6 @@ static int load_elf_binary(struct linux_
/* Verify the interpreter has a valid arch */
if (!elf_check_arch(&loc->interp_elf_ex))
goto out_free_dentry;
- } else {
- /* Executables without an interpreter also need a personality */
- SET_PERSONALITY(loc->elf_ex);
}
/* Flush all traces of the currently running executable */
@@ -752,7 +728,8 @@ static int load_elf_binary(struct linux_
if (!(current->personality & ADDR_NO_RANDOMIZE) && randomize_va_space)
current->flags |= PF_RANDOMIZE;
- arch_pick_mmap_layout(current->mm);
+
+ setup_new_exec(bprm);
/* Do this so that we can load the interpreter, if need be. We will
change some of these later */
--- a/fs/binfmt_elf_fdpic.c
+++ b/fs/binfmt_elf_fdpic.c
@@ -313,6 +313,9 @@ static int load_elf_fdpic_binary(struct
* defunct, deceased, etc. after this point we have to exit via
* error_kill */
set_personality(PER_LINUX_FDPIC);
+
+ setup_new_exec(bprm);
+
set_binfmt(&elf_fdpic_format);
current->mm->start_code = 0;
--- a/fs/binfmt_flat.c
+++ b/fs/binfmt_flat.c
@@ -521,6 +521,7 @@ static int load_flat_file(struct linux_b
/* OK, This is the point of no return */
set_personality(PER_LINUX_32BIT);
+ setup_new_exec(bprm);
}
/*
--- a/fs/binfmt_som.c
+++ b/fs/binfmt_som.c
@@ -227,6 +227,7 @@ load_som_binary(struct linux_binprm * bp
/* OK, This is the point of no return */
current->flags &= ~PF_FORKNOEXEC;
current->personality = PER_HPUX;
+ setup_new_exec(bprm);
/* Set the task size for HP-UX processes such that
* the gateway page is outside the address space.
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -928,9 +928,7 @@ void set_task_comm(struct task_struct *t
int flush_old_exec(struct linux_binprm * bprm)
{
- char * name;
- int i, ch, retval;
- char tcomm[sizeof(current->comm)];
+ int retval;
/*
* Make sure we have a private signal table and that
@@ -950,6 +948,20 @@ int flush_old_exec(struct linux_binprm *
goto out;
bprm->mm = NULL; /* We're using it now */
+ return 0;
+
+out:
+ return retval;
+}
+EXPORT_SYMBOL(flush_old_exec);
+
+void setup_new_exec(struct linux_binprm * bprm)
+{
+ int i, ch;
+ char * name;
+ char tcomm[sizeof(current->comm)];
+
+ arch_pick_mmap_layout(current->mm);
/* This is the point of no return */
current->sas_ss_sp = current->sas_ss_size = 0;
@@ -1006,14 +1018,8 @@ int flush_old_exec(struct linux_binprm *
flush_signal_handlers(current, 0);
flush_old_files(current->files);
-
- return 0;
-
-out:
- return retval;
}
-
-EXPORT_SYMBOL(flush_old_exec);
+EXPORT_SYMBOL(setup_new_exec);
/*
* Prepare credentials and lock ->cred_guard_mutex.
--- a/include/linux/binfmts.h
+++ b/include/linux/binfmts.h
@@ -101,6 +101,7 @@ extern int prepare_binprm(struct linux_b
extern int __must_check remove_arg_zero(struct linux_binprm *);
extern int search_binary_handler(struct linux_binprm *,struct pt_regs *);
extern int flush_old_exec(struct linux_binprm * bprm);
+extern void setup_new_exec(struct linux_binprm * bprm);
extern int suid_dumpable;
#define SUID_DUMP_DISABLE 0 /* No setuid dumping */
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1296,7 +1296,7 @@ struct task_struct {
char comm[TASK_COMM_LEN]; /* executable name excluding path
- access with [gs]et_task_comm (which lock
it with task_lock())
- - initialized normally by flush_old_exec */
+ - initialized normally by setup_new_exec */
/* file system info */
int link_count, total_link_count;
#ifdef CONFIG_SYSVIPC
^ permalink raw reply [flat|nested] 432+ messages in thread
* [76/89] sparc: TIF_ABI_PENDING bit removal
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (74 preceding siblings ...)
2010-03-30 22:58 ` [75/89] Split flush_old_exec into two functions Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-31 12:32 ` Stefan Bader
2010-03-30 22:58 ` [77/89] x86: get rid of the insane TIF_ABI_PENDING bit Greg KH
` (12 subsequent siblings)
88 siblings, 1 reply; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, David S. Miller,
Greg Kroah-Hartman, Stefan Bader
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: David Miller <davem@davemloft.net>
commit 94673e968cbcce07fa78dac4b0ae05d24b5816e1 upstream.
Here are the sparc bits to remove TIF_ABI_PENDING now that
set_personality() is called at the appropriate place in exec.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
arch/sparc/include/asm/elf_64.h | 13 +++----------
arch/sparc/include/asm/thread_info_64.h | 4 +---
arch/sparc/kernel/process_64.c | 8 --------
3 files changed, 4 insertions(+), 21 deletions(-)
--- a/arch/sparc/include/asm/elf_64.h
+++ b/arch/sparc/include/asm/elf_64.h
@@ -196,17 +196,10 @@ static inline unsigned int sparc64_elf_h
#define ELF_PLATFORM (NULL)
#define SET_PERSONALITY(ex) \
-do { unsigned long new_flags = current_thread_info()->flags; \
- new_flags &= _TIF_32BIT; \
- if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
- new_flags |= _TIF_32BIT; \
+do { if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
+ set_thread_flag(TIF_32BIT); \
else \
- new_flags &= ~_TIF_32BIT; \
- if ((current_thread_info()->flags & _TIF_32BIT) \
- != new_flags) \
- set_thread_flag(TIF_ABI_PENDING); \
- else \
- clear_thread_flag(TIF_ABI_PENDING); \
+ clear_thread_flag(TIF_32BIT); \
/* flush_thread will update pgd cache */ \
if (personality(current->personality) != PER_LINUX32) \
set_personality(PER_LINUX | \
--- a/arch/sparc/include/asm/thread_info_64.h
+++ b/arch/sparc/include/asm/thread_info_64.h
@@ -227,12 +227,11 @@ register struct thread_info *current_thr
/* flag bit 8 is available */
#define TIF_SECCOMP 9 /* secure computing */
#define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */
-/* flag bit 11 is available */
/* NOTE: Thread flags >= 12 should be ones we have no interest
* in using in assembly, else we can't use the mask as
* an immediate value in instructions such as andcc.
*/
-#define TIF_ABI_PENDING 12
+/* flag bit 12 is available */
#define TIF_MEMDIE 13
#define TIF_POLLING_NRFLAG 14
#define TIF_FREEZE 15 /* is freezing for suspend */
@@ -246,7 +245,6 @@ register struct thread_info *current_thr
#define _TIF_32BIT (1<<TIF_32BIT)
#define _TIF_SECCOMP (1<<TIF_SECCOMP)
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
-#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_FREEZE (1<<TIF_FREEZE)
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -365,14 +365,6 @@ void flush_thread(void)
struct thread_info *t = current_thread_info();
struct mm_struct *mm;
- if (test_ti_thread_flag(t, TIF_ABI_PENDING)) {
- clear_ti_thread_flag(t, TIF_ABI_PENDING);
- if (test_ti_thread_flag(t, TIF_32BIT))
- clear_ti_thread_flag(t, TIF_32BIT);
- else
- set_ti_thread_flag(t, TIF_32BIT);
- }
-
mm = t->task->mm;
if (mm)
tsb_context_switch(mm);
^ permalink raw reply [flat|nested] 432+ messages in thread
* [77/89] x86: get rid of the insane TIF_ABI_PENDING bit
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (75 preceding siblings ...)
2010-03-30 22:58 ` [76/89] sparc: TIF_ABI_PENDING bit removal Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-31 12:33 ` Stefan Bader
2010-03-30 22:58 ` [78/89] [PATCH 4/5] Fix flush_old_exec()/setup_new_exec() split Greg KH
` (11 subsequent siblings)
88 siblings, 1 reply; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, H. Peter Anvin,
Greg Kroah-Hartman, Stefan Bader
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: H. Peter Anvin <hpa@zytor.com>
commit 05d43ed8a89c159ff641d472f970e3f1baa66318 upstream.
Now that the previous commit made it possible to do the personality
setting at the point of no return, we do just that for ELF binaries.
And suddenly all the reasons for that insane TIF_ABI_PENDING bit go
away, and we can just make SET_PERSONALITY() just do the obvious thing
for a 32-bit compat process.
Everything becomes much more straightforward this way.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
arch/x86/ia32/ia32_aout.c | 1 -
arch/x86/include/asm/elf.h | 10 ++--------
arch/x86/include/asm/thread_info.h | 2 --
arch/x86/kernel/process.c | 12 ------------
arch/x86/kernel/process_64.c | 11 +++++++++++
5 files changed, 13 insertions(+), 23 deletions(-)
--- a/arch/x86/ia32/ia32_aout.c
+++ b/arch/x86/ia32/ia32_aout.c
@@ -311,7 +311,6 @@ static int load_aout_binary(struct linux
/* OK, This is the point of no return */
set_personality(PER_LINUX);
set_thread_flag(TIF_IA32);
- clear_thread_flag(TIF_ABI_PENDING);
setup_new_exec(bprm);
--- a/arch/x86/include/asm/elf.h
+++ b/arch/x86/include/asm/elf.h
@@ -197,14 +197,8 @@ do { \
set_fs(USER_DS); \
} while (0)
-#define COMPAT_SET_PERSONALITY(ex) \
-do { \
- if (test_thread_flag(TIF_IA32)) \
- clear_thread_flag(TIF_ABI_PENDING); \
- else \
- set_thread_flag(TIF_ABI_PENDING); \
- current->personality |= force_personality32; \
-} while (0)
+void set_personality_ia32(void);
+#define COMPAT_SET_PERSONALITY(ex) set_personality_ia32()
#define COMPAT_ELF_PLATFORM ("i686")
--- a/arch/x86/include/asm/thread_info.h
+++ b/arch/x86/include/asm/thread_info.h
@@ -86,7 +86,6 @@ struct thread_info {
#define TIF_NOTSC 16 /* TSC is not accessible in userland */
#define TIF_IA32 17 /* 32bit process */
#define TIF_FORK 18 /* ret_from_fork */
-#define TIF_ABI_PENDING 19
#define TIF_MEMDIE 20
#define TIF_DEBUG 21 /* uses debug registers */
#define TIF_IO_BITMAP 22 /* uses I/O bitmap */
@@ -110,7 +109,6 @@ struct thread_info {
#define _TIF_NOTSC (1 << TIF_NOTSC)
#define _TIF_IA32 (1 << TIF_IA32)
#define _TIF_FORK (1 << TIF_FORK)
-#define _TIF_ABI_PENDING (1 << TIF_ABI_PENDING)
#define _TIF_DEBUG (1 << TIF_DEBUG)
#define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
#define _TIF_FREEZE (1 << TIF_FREEZE)
--- a/arch/x86/kernel/process.c
+++ b/arch/x86/kernel/process.c
@@ -94,18 +94,6 @@ void flush_thread(void)
{
struct task_struct *tsk = current;
-#ifdef CONFIG_X86_64
- if (test_tsk_thread_flag(tsk, TIF_ABI_PENDING)) {
- clear_tsk_thread_flag(tsk, TIF_ABI_PENDING);
- if (test_tsk_thread_flag(tsk, TIF_IA32)) {
- clear_tsk_thread_flag(tsk, TIF_IA32);
- } else {
- set_tsk_thread_flag(tsk, TIF_IA32);
- current_thread_info()->status |= TS_COMPAT;
- }
- }
-#endif
-
clear_tsk_thread_flag(tsk, TIF_DEBUG);
tsk->thread.debugreg0 = 0;
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -534,6 +534,17 @@ sys_clone(unsigned long clone_flags, uns
return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
}
+void set_personality_ia32(void)
+{
+ /* inherit personality from parent */
+
+ /* Make sure to be in 32bit mode */
+ set_thread_flag(TIF_IA32);
+
+ /* Prepare the first "return" to user space */
+ current_thread_info()->status |= TS_COMPAT;
+}
+
unsigned long get_wchan(struct task_struct *p)
{
unsigned long stack;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [78/89] [PATCH 4/5] Fix flush_old_exec()/setup_new_exec() split
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (76 preceding siblings ...)
2010-03-30 22:58 ` [77/89] x86: get rid of the insane TIF_ABI_PENDING bit Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [79/89] powerpc: TIF_ABI_PENDING bit removal Greg KH
` (10 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Peter Anvin,
Greg Kroah-Hartman, Stefan Bader
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Linus Torvalds <torvalds@linux-foundation.org>
commit 7ab02af428c2d312c0cf8fb0b01cc1eb21131a3d upstream.
Commit 221af7f87b9 ("Split 'flush_old_exec' into two functions") split
the function at the point of no return - ie right where there were no
more error cases to check. That made sense from a technical standpoint,
but when we then also combined it with the actual personality setting
going in between flush_old_exec() and setup_new_exec(), it needs to be a
bit more careful.
In particular, we need to make sure that we really flush the old
personality bits in the 'flush' stage, rather than later in the 'setup'
stage, since otherwise we might be flushing the _new_ personality state
that we're just setting up.
So this moves the flags and personality flushing (and 'flush_thread()',
which is the arch-specific function that generally resets lazy FP state
etc) of the old process into flush_old_exec(), so that it doesn't affect
any state that execve() is setting up for the new process environment.
This was reported by Michal Simek as breaking his Microblaze qemu
environment.
Reported-and-tested-by: Michal Simek <michal.simek@petalogix.com>
Cc: Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
fs/exec.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -948,6 +948,11 @@ int flush_old_exec(struct linux_binprm *
goto out;
bprm->mm = NULL; /* We're using it now */
+
+ current->flags &= ~PF_RANDOMIZE;
+ flush_thread();
+ current->personality &= ~bprm->per_clear;
+
return 0;
out:
@@ -984,9 +989,6 @@ void setup_new_exec(struct linux_binprm
tcomm[i] = '\0';
set_task_comm(current, tcomm);
- current->flags &= ~PF_RANDOMIZE;
- flush_thread();
-
/* Set the new mm task size. We have to do that late because it may
* depend on TIF_32BIT which is only updated in flush_thread() on
* some architectures like powerpc
@@ -1002,8 +1004,6 @@ void setup_new_exec(struct linux_binprm
set_dumpable(current->mm, suid_dumpable);
}
- current->personality &= ~bprm->per_clear;
-
/*
* Flush performance counters when crossing a
* security domain:
^ permalink raw reply [flat|nested] 432+ messages in thread
* [79/89] powerpc: TIF_ABI_PENDING bit removal
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (77 preceding siblings ...)
2010-03-30 22:58 ` [78/89] [PATCH 4/5] Fix flush_old_exec()/setup_new_exec() split Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [80/89] coredump: suppress uid comparison test if core output files are pipes Greg KH
` (9 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Andreas Schwab,
Benjamin Herrenschmidt, Greg Kroah-Hartman, Stefan Bader
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Andreas Schwab <schwab@linux-m68k.org>
commit 94f28da8409c6059135e89ac64a0839993124155 upstream.
Here are the powerpc bits to remove TIF_ABI_PENDING now that
set_personality() is called at the appropriate place in exec.
Signed-off-by: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
arch/powerpc/include/asm/elf.h | 8 ++------
arch/powerpc/include/asm/thread_info.h | 2 --
arch/powerpc/kernel/process.c | 12 ------------
3 files changed, 2 insertions(+), 20 deletions(-)
--- a/arch/powerpc/include/asm/elf.h
+++ b/arch/powerpc/include/asm/elf.h
@@ -236,14 +236,10 @@ typedef elf_vrregset_t elf_fpxregset_t;
#ifdef __powerpc64__
# define SET_PERSONALITY(ex) \
do { \
- unsigned long new_flags = 0; \
if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
- new_flags = _TIF_32BIT; \
- if ((current_thread_info()->flags & _TIF_32BIT) \
- != new_flags) \
- set_thread_flag(TIF_ABI_PENDING); \
+ set_thread_flag(TIF_32BIT); \
else \
- clear_thread_flag(TIF_ABI_PENDING); \
+ clear_thread_flag(TIF_32BIT); \
if (personality(current->personality) != PER_LINUX32) \
set_personality(PER_LINUX | \
(current->personality & (~PER_MASK))); \
--- a/arch/powerpc/include/asm/thread_info.h
+++ b/arch/powerpc/include/asm/thread_info.h
@@ -111,7 +111,6 @@ static inline struct thread_info *curren
#define TIF_NOTIFY_RESUME 13 /* callback before returning to user */
#define TIF_FREEZE 14 /* Freezing for suspend */
#define TIF_RUNLATCH 15 /* Is the runlatch enabled? */
-#define TIF_ABI_PENDING 16 /* 32/64 bit switch needed */
/* as above, but as bit values */
#define _TIF_SYSCALL_TRACE (1<<TIF_SYSCALL_TRACE)
@@ -129,7 +128,6 @@ static inline struct thread_info *curren
#define _TIF_NOTIFY_RESUME (1<<TIF_NOTIFY_RESUME)
#define _TIF_FREEZE (1<<TIF_FREEZE)
#define _TIF_RUNLATCH (1<<TIF_RUNLATCH)
-#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_SYSCALL_T_OR_A (_TIF_SYSCALL_TRACE|_TIF_SYSCALL_AUDIT|_TIF_SECCOMP)
#define _TIF_USER_WORK_MASK (_TIF_SIGPENDING | _TIF_NEED_RESCHED | \
--- a/arch/powerpc/kernel/process.c
+++ b/arch/powerpc/kernel/process.c
@@ -554,18 +554,6 @@ void exit_thread(void)
void flush_thread(void)
{
-#ifdef CONFIG_PPC64
- struct thread_info *t = current_thread_info();
-
- if (test_ti_thread_flag(t, TIF_ABI_PENDING)) {
- clear_ti_thread_flag(t, TIF_ABI_PENDING);
- if (test_ti_thread_flag(t, TIF_32BIT))
- clear_ti_thread_flag(t, TIF_32BIT);
- else
- set_ti_thread_flag(t, TIF_32BIT);
- }
-#endif
-
discard_lazy_cpu_state();
if (current->thread.dabr) {
^ permalink raw reply [flat|nested] 432+ messages in thread
* [80/89] coredump: suppress uid comparison test if core output files are pipes
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (78 preceding siblings ...)
2010-03-30 22:58 ` [79/89] powerpc: TIF_ABI_PENDING bit removal Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [81/89] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
` (8 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Neil Horman, Andi Kleen,
Oleg Nesterov, Al Viro, Ingo Molnar, maximilian attems,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Neil Horman <nhorman@tuxdriver.com>
commit 76595f79d76fbe6267a51b3a866a028d150f06d4 upstream.
Modify uid check in do_coredump so as to not apply it in the case of
pipes.
This just got noticed in testing. The end of do_coredump validates the
uid of the inode for the created file against the uid of the crashing
process to ensure that no one can pre-create a core file with different
ownership and grab the information contained in the core when they
shouldn' tbe able to. This causes failures when using pipes for a core
dumps if the crashing process is not root, which is the uid of the pipe
when it is created.
The fix is simple. Since the check for matching uid's isn't relevant for
pipes (a process can't create a pipe that the uermodehelper code will open
anyway), we can just just skip it in the event ispipe is non-zero
Reverts a pipe-affecting change which was accidentally made in
: commit c46f739dd39db3b07ab5deb4e3ec81e1c04a91af
: Author: Ingo Molnar <mingo@elte.hu>
: AuthorDate: Wed Nov 28 13:59:18 2007 +0100
: Commit: Linus Torvalds <torvalds@woody.linux-foundation.org>
: CommitDate: Wed Nov 28 10:58:01 2007 -0800
:
: vfs: coredumping fix
Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Cc: Andi Kleen <andi@firstfloor.org>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
fs/exec.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -1861,8 +1861,9 @@ void do_coredump(long signr, int exit_co
/*
* Dont allow local users get cute and trick others to coredump
* into their pre-created files:
+ * Note, this is not relevant for pipes
*/
- if (inode->i_uid != current_fsuid())
+ if (!ispipe && (inode->i_uid != current_fsuid()))
goto close_fail;
if (!file->f_op)
goto close_fail;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [81/89] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini()
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (79 preceding siblings ...)
2010-03-30 22:58 ` [80/89] coredump: suppress uid comparison test if core output files are pipes Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [82/89] tmpfs: fix oops on mounts with mpol=default Greg KH
` (7 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Francesco Lavra,
Mauro Carvalho Chehab, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Francesco Lavra <francescolavra@interfree.it>
commit 19f48cb105b7fa18d0dcab435919a3a29b7a7c4c upstream.
this patch fixes a memory leak which occurs when an em28xx card with DVB
extension is unplugged or its DVB extension driver is unloaded. In
dvb_fini(), dev->dvb must be freed before being set to NULL, as is done
in dvb_init() in case of error.
Note that this bug is also present in the latest stable kernel release.
Signed-off-by: Francesco Lavra <francescolavra@interfree.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/media/video/em28xx/em28xx-dvb.c | 1 +
1 file changed, 1 insertion(+)
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -591,6 +591,7 @@ static int dvb_fini(struct em28xx *dev)
if (dev->dvb) {
unregister_dvb(dev->dvb);
+ kfree(dev->dvb);
dev->dvb = NULL;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [82/89] tmpfs: fix oops on mounts with mpol=default
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (80 preceding siblings ...)
2010-03-30 22:58 ` [81/89] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [83/89] tmpfs: mpol=bind:0 dont cause mount error Greg KH
` (6 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Ravikiran Thirumalai,
KOSAKI Motohiro, Christoph Lameter, Mel Gorman, Lee Schermerhorn,
Hugh Dickins, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Ravikiran G Thirumalai <kiran@scalex86.org>
commit 413b43deab8377819aba1dbad2abf0c15d59b491 upstream.
Fix an 'oops' when a tmpfs mount point is mounted with the mpol=default
mempolicy.
Upon remounting a tmpfs mount point with 'mpol=default' option, the mount
code crashed with a null pointer dereference. The initial problem report
was on 2.6.27, but the problem exists in mainline 2.6.34-rc as well. On
examining the code, we see that mpol_new returns NULL if default mempolicy
was requested. This 'NULL' mempolicy is accessed to store the node mask
resulting in oops.
The following patch fixes it.
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2142,10 +2142,15 @@ int mpol_parse_str(char *str, struct mem
goto out;
mode = MPOL_PREFERRED;
break;
-
+ case MPOL_DEFAULT:
+ /*
+ * Insist on a empty nodelist
+ */
+ if (!nodelist)
+ err = 0;
+ goto out;
/*
* case MPOL_BIND: mpol_new() enforces non-empty nodemask.
- * case MPOL_DEFAULT: mpol_new() enforces empty nodemask, ignores flags.
*/
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* [83/89] tmpfs: mpol=bind:0 dont cause mount error.
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (81 preceding siblings ...)
2010-03-30 22:58 ` [82/89] tmpfs: fix oops on mounts with mpol=default Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [84/89] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
` (5 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit d69b2e63e9172afb4d07c305601b79a55509ac4c upstream.
Currently, following mount operation cause mount error.
% mount -t tmpfs -ompol=bind:0 none /tmp
Because commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) corrupted MPOL_BIND parse code.
This patch restore the needed one.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2149,9 +2149,13 @@ int mpol_parse_str(char *str, struct mem
if (!nodelist)
err = 0;
goto out;
- /*
- * case MPOL_BIND: mpol_new() enforces non-empty nodemask.
- */
+ case MPOL_BIND:
+ /*
+ * Insist on a nodelist
+ */
+ if (!nodelist)
+ goto out;
+ err = 0;
}
mode_flags = 0;
^ permalink raw reply [flat|nested] 432+ messages in thread
* [84/89] tmpfs: handle MPOL_LOCAL mount option properly
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (82 preceding siblings ...)
2010-03-30 22:58 ` [83/89] tmpfs: mpol=bind:0 dont cause mount error Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [85/89] tmpfs: cleanup mpol_parse_str() Greg KH
` (4 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 12821f5fb942e795f8009ece14bde868893bd811 upstream.
commit 71fe804b6d5 (mempolicy: use struct mempolicy pointer in
shmem_sb_info) added mpol=local mount option. but its feature is broken
since it was born. because such code always return 1 (i.e. mount
failure).
This patch fixes it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 1 +
1 file changed, 1 insertion(+)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2141,6 +2141,7 @@ int mpol_parse_str(char *str, struct mem
if (nodelist)
goto out;
mode = MPOL_PREFERRED;
+ err = 0;
break;
case MPOL_DEFAULT:
/*
^ permalink raw reply [flat|nested] 432+ messages in thread
* [85/89] tmpfs: cleanup mpol_parse_str()
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (83 preceding siblings ...)
2010-03-30 22:58 ` [84/89] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [86/89] doc: add the documentation for mpol=local Greg KH
` (3 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 926f2ae04f183098cf9a30521776fb2759c8afeb upstream.
mpol_parse_str() made lots 'err' variable related bug. Because it is ugly
and reviewing unfriendly.
This patch simplifies it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
mm/mempolicy.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
--- a/mm/mempolicy.c
+++ b/mm/mempolicy.c
@@ -2122,8 +2122,8 @@ int mpol_parse_str(char *str, struct mem
char *rest = nodelist;
while (isdigit(*rest))
rest++;
- if (!*rest)
- err = 0;
+ if (*rest)
+ goto out;
}
break;
case MPOL_INTERLEAVE:
@@ -2132,7 +2132,6 @@ int mpol_parse_str(char *str, struct mem
*/
if (!nodelist)
nodes = node_states[N_HIGH_MEMORY];
- err = 0;
break;
case MPOL_LOCAL:
/*
@@ -2141,7 +2140,6 @@ int mpol_parse_str(char *str, struct mem
if (nodelist)
goto out;
mode = MPOL_PREFERRED;
- err = 0;
break;
case MPOL_DEFAULT:
/*
@@ -2156,7 +2154,6 @@ int mpol_parse_str(char *str, struct mem
*/
if (!nodelist)
goto out;
- err = 0;
}
mode_flags = 0;
@@ -2170,13 +2167,14 @@ int mpol_parse_str(char *str, struct mem
else if (!strcmp(flags, "relative"))
mode_flags |= MPOL_F_RELATIVE_NODES;
else
- err = 1;
+ goto out;
}
new = mpol_new(mode, mode_flags, &nodes);
if (IS_ERR(new))
- err = 1;
- else {
+ goto out;
+
+ {
int ret;
NODEMASK_SCRATCH(scratch);
if (scratch) {
@@ -2187,13 +2185,15 @@ int mpol_parse_str(char *str, struct mem
ret = -ENOMEM;
NODEMASK_SCRATCH_FREE(scratch);
if (ret) {
- err = 1;
mpol_put(new);
- } else if (no_context) {
- /* save for contextualization */
- new->w.user_nodemask = nodes;
+ goto out;
}
}
+ err = 0;
+ if (no_context) {
+ /* save for contextualization */
+ new->w.user_nodemask = nodes;
+ }
out:
/* Restore string for error message */
^ permalink raw reply [flat|nested] 432+ messages in thread
* [86/89] doc: add the documentation for mpol=local
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (84 preceding siblings ...)
2010-03-30 22:58 ` [85/89] tmpfs: cleanup mpol_parse_str() Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [87/89] USB: fix usbfs regression Greg KH
` (2 subsequent siblings)
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, KOSAKI Motohiro,
Ravikiran Thirumalai, Christoph Lameter, Mel Gorman,
Lee Schermerhorn, Hugh Dickins, Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
commit 5574169613b40b85d6f4c67208fa4846b897a0a1 upstream.
commit 3f226aa1c (mempolicy: support mpol=local tmpfs mount option) added
new mpol=local mount option. but it didn't add a documentation.
This patch does it.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Ravikiran Thirumalai <kiran@scalex86.org>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Mel Gorman <mel@csn.ul.ie>
Acked-by: Lee Schermerhorn <lee.schermerhorn@hp.com>
Cc: Hugh Dickins <hugh.dickins@tiscali.co.uk>
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>
---
Documentation/filesystems/tmpfs.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/Documentation/filesystems/tmpfs.txt
+++ b/Documentation/filesystems/tmpfs.txt
@@ -82,11 +82,13 @@ tmpfs has a mount option to set the NUMA
all files in that instance (if CONFIG_NUMA is enabled) - which can be
adjusted on the fly via 'mount -o remount ...'
-mpol=default prefers to allocate memory from the local node
+mpol=default use the process allocation policy
+ (see set_mempolicy(2))
mpol=prefer:Node prefers to allocate memory from the given Node
mpol=bind:NodeList allocates memory only from nodes in NodeList
mpol=interleave prefers to allocate from each node in turn
mpol=interleave:NodeList allocates from each node of NodeList in turn
+mpol=local prefers to allocate memory from the local node
NodeList format is a comma-separated list of decimal numbers and ranges,
a range being two hyphen-separated decimal numbers, the smallest and
@@ -134,3 +136,5 @@ Author:
Christoph Rohland <cr@sap.com>, 1.12.01
Updated:
Hugh Dickins, 4 June 2007
+Updated:
+ KOSAKI Motohiro, 16 Mar 2010
^ permalink raw reply [flat|nested] 432+ messages in thread
* [87/89] USB: fix usbfs regression
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (85 preceding siblings ...)
2010-03-30 22:58 ` [86/89] doc: add the documentation for mpol=local Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [88/89] x86: Fix placement of FIX_OHCI1394_BASE Greg KH
2010-03-30 22:58 ` [89/89] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Alan Stern,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Alan Stern <stern@rowland.harvard.edu>
commit 7152b592593b9d48b33f8997b1dfd6df9143f7ec upstream.
This patch (as1352) fixes a bug in the way isochronous input data is
returned to userspace for usbfs transfers. The entire buffer must be
copied, not just the first actual_length bytes, because the individual
packets will be discontiguous if any of them are short.
Reported-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/usb/core/devio.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
--- a/drivers/usb/core/devio.c
+++ b/drivers/usb/core/devio.c
@@ -1139,6 +1139,13 @@ static int proc_do_submiturb(struct dev_
free_async(as);
return -ENOMEM;
}
+ /* Isochronous input data may end up being discontiguous
+ * if some of the packets are short. Clear the buffer so
+ * that the gaps don't leak kernel data to userspace.
+ */
+ if (is_in && uurb->type == USBDEVFS_URB_TYPE_ISO)
+ memset(as->urb->transfer_buffer, 0,
+ uurb->buffer_length);
}
as->urb->dev = ps->dev;
as->urb->pipe = (uurb->type << 30) |
@@ -1240,10 +1247,14 @@ static int processcompl(struct async *as
void __user *addr = as->userurb;
unsigned int i;
- if (as->userbuffer && urb->actual_length)
- if (copy_to_user(as->userbuffer, urb->transfer_buffer,
- urb->actual_length))
+ if (as->userbuffer && urb->actual_length) {
+ if (urb->number_of_packets > 0) /* Isochronous */
+ i = urb->transfer_buffer_length;
+ else /* Non-Isoc */
+ i = urb->actual_length;
+ if (copy_to_user(as->userbuffer, urb->transfer_buffer, i))
goto err_out;
+ }
if (put_user(as->status, &userurb->status))
goto err_out;
if (put_user(urb->actual_length, &userurb->actual_length))
^ permalink raw reply [flat|nested] 432+ messages in thread
* [88/89] x86: Fix placement of FIX_OHCI1394_BASE
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (86 preceding siblings ...)
2010-03-30 22:58 ` [87/89] USB: fix usbfs regression Greg KH
@ 2010-03-30 22:58 ` Greg KH
2010-03-30 22:58 ` [89/89] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Jan Beulich, Ingo Molnar,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Jan Beulich <JBeulich@novell.com>
commit ff30a0543e9a6cd732582063e7cae951cdb7acf2 upstream.
Ever for 32-bit with sufficiently high NR_CPUS, and starting
with commit 789d03f584484af85dbdc64935270c8e45f36ef7 also for
64-bit, the statically allocated early fixmap page tables were
not covering FIX_OHCI1394_BASE, leading to a boot time crash
when "ohci1394_dma=early" was used. Despite this entry not being
a permanently used one, it needs to be moved into the permanent
range since it has to be close to FIX_DBGP_BASE and
FIX_EARLYCON_MEM_BASE.
Reported-bisected-and-tested-by: Justin P. Mattock <justinmattock@gmail.com>
Fixes-bug: http://bugzilla.kernel.org/show_bug.cgi?id=14487
Signed-off-by: Jan Beulich <jbeulich@novell.com>
LKML-Reference: <4B9E15D30200007800034D23@vpn.id2.novell.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
arch/x86/include/asm/fixmap.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -82,6 +82,9 @@ enum fixed_addresses {
#endif
FIX_DBGP_BASE,
FIX_EARLYCON_MEM_BASE,
+#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
+ FIX_OHCI1394_BASE,
+#endif
#ifdef CONFIG_X86_LOCAL_APIC
FIX_APIC_BASE, /* local (CPU) APIC) -- required for SMP or not */
#endif
@@ -126,9 +129,6 @@ enum fixed_addresses {
FIX_BTMAP_END = __end_of_permanent_fixed_addresses + 256 -
(__end_of_permanent_fixed_addresses & 255),
FIX_BTMAP_BEGIN = FIX_BTMAP_END + NR_FIX_BTMAPS*FIX_BTMAPS_SLOTS - 1,
-#ifdef CONFIG_PROVIDE_OHCI1394_DMA_INIT
- FIX_OHCI1394_BASE,
-#endif
#ifdef CONFIG_X86_32
FIX_WP_TEST,
#endif
^ permalink raw reply [flat|nested] 432+ messages in thread
* [89/89] hwmon: (coretemp) Add missing newline to dev_warn() message
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (87 preceding siblings ...)
2010-03-30 22:58 ` [88/89] x86: Fix placement of FIX_OHCI1394_BASE Greg KH
@ 2010-03-30 22:58 ` Greg KH
88 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 22:58 UTC (permalink / raw)
To: linux-kernel, stable
Cc: stable-review, torvalds, akpm, alan, Dean Nelson, Jean Delvare,
Greg Kroah-Hartman
2.6.31-stable review patch. If anyone has any objections, please let us know.
------------------
From: Dean Nelson <dnelson@redhat.com>
commit 4d7a5644e4adfafe76c2bd8ee168e3f3b5dae3a8 upstream.
Add missing newline to dev_warn() message string. This is more of an issue
with older kernels that don't automatically add a newline if it was missing
from the end of the previous line.
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
---
drivers/hwmon/coretemp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -191,7 +191,7 @@ static int __devinit adjust_tjmax(struct
if (err) {
dev_warn(dev,
"Unable to access MSR 0xEE, for Tjmax, left"
- " at default");
+ " at default\n");
} else if (eax & 0x40000000) {
tjmax = 85000;
}
^ permalink raw reply [flat|nested] 432+ messages in thread
* 4 stable kernel review cycles starting
@ 2010-03-30 23:03 Greg KH
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
` (4 more replies)
0 siblings, 5 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 23:03 UTC (permalink / raw)
To: linux-kernel, stable, stable-review, torvalds, akpm, alan
Hi all,
Well, I up and moved cities and caused a bunch of stable patches to be
backlogged. I've caught up with all of the ones that were marked as
being wished to be applied to the stable trees, and still have a bunch
of pending requests still queued up in my mailbox.
But, due to the number of the current patches already applied, it is
time to just let these go and work on the other pending stuff after
this.
So don't worry, if anyone has asked for some patches to be applied to
some stable trees, and you don't see it here, just give it some time,
I'm still catching up on things (hey, I'm just happy I have an internet
connection again...)
Oh, and yes, here's a .31 update. I had a bunch of pending patches for
that tree sitting around, and thought it wise to just push it out for
the distros that still rely on it to sync up and make sure they get all
of the bugfixes that are known. I don't think I'll do another .31
releaase again, just this once.
thanks,
greg "surrounded by boxes" k-h
^ permalink raw reply [flat|nested] 432+ messages in thread
* [00/45] 2.6.27.46-stable review
2010-03-30 23:03 4 stable kernel review cycles starting Greg KH
@ 2010-03-30 23:04 ` Greg KH
2010-03-30 22:48 ` [01/45] UBI: fix volume creation input checking Greg KH
` (44 more replies)
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
` (3 subsequent siblings)
4 siblings, 45 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 23:04 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.27.46 release.
There are 45 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 April 1, 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.27.46-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
Documentation/filesystems/tmpfs.txt | 6 +++-
Makefile | 2 +-
arch/x86/ia32/ia32_aout.c | 1 -
arch/x86/kvm/vmx.c | 3 ++
arch/x86/kvm/x86.c | 21 ++++++++++-
arch/x86/kvm/x86_emulate.c | 5 ++-
drivers/char/mem.c | 3 ++
drivers/char/tty_io.c | 4 ++-
drivers/gpu/drm/r128/r128_cce.c | 18 +++++++--
drivers/gpu/drm/r128/r128_drv.h | 8 ++++
drivers/gpu/drm/r128/r128_state.c | 36 ++++++++++---------
drivers/hwmon/coretemp.c | 2 +-
drivers/hwmon/lm78.c | 23 ++++++++----
drivers/i2c/i2c-core.c | 5 ++-
drivers/media/video/em28xx/em28xx-dvb.c | 1 +
drivers/mtd/ubi/cdev.c | 1 -
drivers/net/b44.c | 3 +-
drivers/net/bonding/bond_main.c | 8 ++++
drivers/net/r8169.c | 4 +-
drivers/net/sky2.c | 4 ++-
drivers/parisc/eisa_eeprom.c | 2 +-
drivers/serial/8250.c | 7 ++--
drivers/usb/core/devio.c | 61 +++++++++++++++++++++----------
drivers/usb/host/ehci-hub.c | 7 ++--
drivers/usb/host/ehci-q.c | 11 +++---
drivers/usb/host/ehci-sched.c | 1 +
fs/exec.c | 3 +-
fs/ext4/super.c | 3 +-
fs/fcntl.c | 6 +--
fs/namei.c | 14 ++++++-
include/asm-x86/checksum_32.h | 3 +-
include/asm-x86/kvm_host.h | 1 +
include/asm-x86/kvm_x86_emulate.h | 2 +-
include/linux/sched.h | 24 ++++++++++++-
include/linux/topology.h | 4 +-
kernel/futex.c | 28 +++++++++++++-
kernel/printk.c | 2 +-
kernel/sched.c | 12 +++---
kernel/sched_fair.c | 13 +++++--
kernel/sched_features.h | 1 +
kernel/sched_idletask.c | 6 ++--
kernel/sched_rt.c | 2 +-
mm/mempolicy.c | 34 +++++++++++------
mm/migrate.c | 3 ++
net/ax25/af_ax25.c | 2 +-
net/ipv4/tcp_minisocks.c | 2 +-
net/ipv6/sit.c | 2 +-
net/sched/sch_api.c | 2 +
net/unix/af_unix.c | 5 ++-
49 files changed, 301 insertions(+), 120 deletions(-)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [00/89] 2.6.31.13-stable review
2010-03-30 23:03 4 stable kernel review cycles starting Greg KH
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
@ 2010-03-30 23:05 ` Greg KH
2010-03-30 22:57 ` [01/89] Fix potential crash with sys_move_pages Greg KH
` (88 more replies)
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
` (2 subsequent siblings)
4 siblings, 89 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 23:05 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.31.13 release.
There are 89 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 April 1, 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.31.13-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
Documentation/filesystems/tmpfs.txt | 6 +-
Makefile | 2 +-
arch/powerpc/include/asm/elf.h | 8 +-
arch/powerpc/include/asm/thread_info.h | 2 -
arch/powerpc/kernel/process.c | 12 --
arch/sh/kernel/process_64.c | 2 +-
arch/sparc/include/asm/elf_64.h | 13 +--
arch/sparc/include/asm/thread_info_64.h | 4 +-
arch/sparc/kernel/process_64.c | 8 -
arch/x86/ia32/ia32_aout.c | 12 +-
arch/x86/include/asm/elf.h | 10 +-
arch/x86/include/asm/fixmap.h | 6 +-
arch/x86/include/asm/io_apic.h | 1 +
arch/x86/include/asm/kvm_x86_emulate.h | 2 +-
arch/x86/include/asm/thread_info.h | 2 -
arch/x86/kernel/acpi/boot.c | 9 +-
arch/x86/kernel/apic/apic_flat_64.c | 5 +
arch/x86/kernel/apic/io_apic.c | 50 ++++++
arch/x86/kernel/cpu/cpufreq/powernow-k8.c | 3 +-
arch/x86/kernel/microcode_core.c | 4 +-
arch/x86/kernel/process.c | 12 --
arch/x86/kernel/process_64.c | 11 ++
arch/x86/kvm/x86_emulate.c | 5 +-
arch/x86/pci/i386.c | 9 +
drivers/acpi/processor_idle.c | 28 ++--
drivers/base/class.c | 2 +
drivers/block/cciss.c | 3 +
drivers/char/agp/backend.c | 4 +-
drivers/char/nozomi.c | 2 +-
drivers/char/tty_io.c | 2 +
drivers/connector/connector.c | 175 --------------------
drivers/edac/i5000_edac.c | 8 +-
drivers/gpu/drm/r128/r128_cce.c | 18 ++-
drivers/gpu/drm/r128/r128_drv.h | 8 +
drivers/gpu/drm/r128/r128_state.c | 36 +++--
drivers/hid/hid-apple.c | 7 +
drivers/hid/hid-core.c | 3 +
drivers/hid/hid-ids.h | 3 +
drivers/hwmon/adt7462.c | 2 +-
drivers/hwmon/coretemp.c | 2 +-
drivers/hwmon/fschmd.c | 7 +-
drivers/hwmon/lm78.c | 25 ++--
drivers/hwmon/w83781d.c | 26 ++--
drivers/i2c/busses/i2c-pca-isa.c | 4 +-
drivers/i2c/busses/i2c-pca-platform.c | 4 +-
drivers/i2c/busses/i2c-tiny-usb.c | 12 +-
drivers/i2c/i2c-core.c | 5 +-
drivers/input/mouse/alps.c | 252 ++++++++++++++++++++++++++---
drivers/input/mouse/alps.h | 1 +
drivers/media/dvb/dvb-usb/af9015.c | 4 +-
drivers/media/dvb/dvb-usb/dvb-usb-ids.h | 1 +
drivers/media/video/em28xx/em28xx-dvb.c | 1 +
drivers/media/video/pwc/pwc-ctrl.c | 2 +-
drivers/media/video/uvc/uvc_driver.c | 3 +
drivers/media/video/uvc/uvc_video.c | 4 +-
drivers/media/video/uvc/uvcvideo.h | 3 +-
drivers/misc/enclosure.c | 1 +
drivers/mtd/ubi/cdev.c | 1 -
drivers/net/sfc/tx.c | 4 +-
drivers/net/wireless/airo.c | 34 ++--
drivers/net/wireless/ath/ath5k/eeprom.c | 32 ++++-
drivers/net/wireless/ath/ath5k/eeprom.h | 8 +
drivers/net/wireless/b43/b43.h | 1 +
drivers/net/wireless/b43/main.c | 13 ++-
drivers/parisc/ccio-dma.c | 4 +-
drivers/parisc/sba_iommu.c | 4 +-
drivers/rtc/rtc-fm3130.c | 6 +-
drivers/scsi/megaraid/megaraid_sas.c | 2 +-
drivers/scsi/mpt2sas/mpt2sas_scsih.c | 17 ++
drivers/serial/8250.c | 7 +-
drivers/serial/8250_pnp.c | 10 +-
drivers/usb/core/devices.c | 2 +-
drivers/usb/core/devio.c | 61 +++++---
drivers/usb/core/hub.c | 3 +
drivers/usb/core/message.c | 8 +-
drivers/usb/core/sysfs.c | 6 +
drivers/usb/host/ehci-hcd.c | 5 +-
drivers/usb/host/ehci-hub.c | 20 +++-
drivers/usb/host/ehci-q.c | 11 +-
drivers/usb/host/uhci-hcd.c | 15 ++-
drivers/usb/host/uhci-hub.c | 2 +-
drivers/usb/serial/generic.c | 2 +
drivers/usb/storage/unusual_devs.h | 7 -
drivers/usb/storage/usb.c | 3 +-
drivers/xen/balloon.c | 4 -
fs/binfmt_aout.c | 1 +
fs/binfmt_elf.c | 27 +---
fs/binfmt_elf_fdpic.c | 3 +
fs/binfmt_flat.c | 1 +
fs/binfmt_som.c | 1 +
fs/cifs/readdir.c | 1 +
fs/ecryptfs/crypto.c | 4 +-
fs/ecryptfs/file.c | 14 +-
fs/exec.c | 39 +++--
fs/namei.c | 14 ++-
fs/nfs/fscache.c | 21 ++--
fs/notify/dnotify/dnotify.c | 3 +-
fs/notify/inotify/inotify_fsnotify.c | 2 +-
fs/notify/inotify/inotify_user.c | 4 +-
fs/notify/notification.c | 2 +-
fs/ntfs/malloc.h | 2 +-
fs/partitions/efi.c | 30 +++--
fs/partitions/efi.h | 8 +-
fs/reiserfs/inode.c | 17 ++-
include/linux/binfmts.h | 1 +
include/linux/connector.h | 32 ----
include/linux/enclosure.h | 2 +
include/linux/mm.h | 1 +
include/linux/sched.h | 24 +++-
init/main.c | 4 +-
ipc/msg.c | 1 +
ipc/sem.c | 1 +
ipc/shm.c | 1 +
kernel/futex.c | 30 +++-
kernel/time/clockevents.c | 5 +-
mm/mempolicy.c | 40 +++--
mm/migrate.c | 3 +
mm/page_alloc.c | 2 +-
mm/slab.c | 2 +-
mm/swap.c | 2 +-
mm/vmalloc.c | 8 +-
net/core/sock.c | 4 +-
net/dccp/proto.c | 6 +-
net/decnet/dn_route.c | 2 +-
net/ipv4/route.c | 2 +-
net/ipv4/tcp.c | 4 +-
net/netfilter/nf_conntrack_core.c | 4 +-
net/netfilter/x_tables.c | 2 +-
net/netfilter/xt_hashlimit.c | 8 +-
net/netlink/af_netlink.c | 6 +-
net/sctp/protocol.c | 6 +-
security/selinux/hooks.c | 2 +-
sound/pci/hda/hda_intel.c | 6 +
sound/usb/usbaudio.c | 2 +-
134 files changed, 931 insertions(+), 624 deletions(-)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [000/116] 2.6.32.11-stable review
2010-03-30 23:03 4 stable kernel review cycles starting Greg KH
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
@ 2010-03-30 23:06 ` Greg KH
2010-03-30 22:54 ` [001/116] drm/i915: fix gpio register detection logic for BIOS without VBT Greg KH
` (115 more replies)
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
2010-03-31 4:44 ` 4 stable kernel review cycles starting Dave Chinner
4 siblings, 116 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 23:06 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.32.11 release.
There are 116 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 April 1, 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.32.11-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
Documentation/filesystems/tmpfs.txt | 6 +-
Makefile | 2 +-
arch/arm/boot/compressed/head.S | 50 ++++----
arch/arm/boot/compressed/vmlinux.lds.in | 3 +
arch/mips/mm/tlbex.c | 8 -
arch/sh/boot/compressed/misc.c | 2 +-
arch/sparc/prom/p1275.c | 10 +-
arch/x86/include/asm/fixmap.h | 6 +-
arch/x86/include/asm/msr-index.h | 2 +
arch/x86/kernel/acpi/boot.c | 5 -
arch/x86/kernel/apic/apic.c | 14 --
arch/x86/kernel/apic/probe_32.c | 27 ++++-
arch/x86/kernel/apic/probe_64.c | 13 +--
arch/x86/kernel/cpu/intel.c | 3 +-
arch/x86/kernel/mpparse.c | 7 -
arch/x86/kernel/process.c | 32 ++++-
arch/x86/kernel/process_64.c | 1 +
arch/x86/kernel/smpboot.c | 2 -
block/blk-settings.c | 93 ++++++++++----
drivers/ata/ahci.c | 28 +++-
drivers/char/tty_buffer.c | 6 +-
drivers/edac/edac_mce_amd.c | 8 +-
drivers/gpu/drm/drm_edid.c | 163 +++++++++---------------
drivers/gpu/drm/i915/i915_drv.h | 2 +-
drivers/gpu/drm/i915/i915_gem.c | 21 ++--
drivers/gpu/drm/i915/intel_bios.c | 4 -
drivers/gpu/drm/i915/intel_crt.c | 2 +-
drivers/hwmon/coretemp.c | 2 +-
drivers/i2c/busses/i2c-i801.c | 6 +-
drivers/input/mouse/alps.c | 2 +
drivers/input/serio/i8042-x86ia64io.h | 7 +
drivers/input/tablet/wacom.h | 7 +-
drivers/input/tablet/wacom_sys.c | 7 +-
drivers/isdn/gigaset/ev-layer.c | 12 +-
drivers/isdn/gigaset/interface.c | 1 -
drivers/leds/leds-gpio.c | 3 +-
drivers/media/video/em28xx/em28xx-dvb.c | 1 +
drivers/mmc/host/s3cmci.c | 2 +
drivers/net/e1000e/hw.h | 1 +
drivers/net/e1000e/ich8lan.c | 1 +
drivers/net/e1000e/netdev.c | 1 +
drivers/net/ixgbe/ixgbe_82599.c | 1 +
drivers/net/ixgbe/ixgbe_main.c | 2 +
drivers/net/ixgbe/ixgbe_type.h | 1 +
drivers/net/jme.c | 35 +++++
drivers/net/tg3.c | 23 +++-
drivers/net/tg3.h | 3 +
drivers/net/wireless/ath/ath5k/ath5k.h | 2 +-
drivers/net/wireless/ath/ath5k/base.c | 22 +++-
drivers/net/wireless/ath/ath5k/qcu.c | 5 +-
drivers/net/wireless/ath/ath5k/reset.c | 5 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 1 +
drivers/net/wireless/ath/ath9k/main.c | 26 ++--
drivers/net/wireless/ath/ath9k/xmit.c | 32 +----
drivers/net/wireless/b43/main.c | 11 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 8 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 12 +-
drivers/net/wireless/iwlwifi/iwl-helpers.h | 7 +-
drivers/net/wireless/iwlwifi/iwl-rx.c | 21 ++--
drivers/net/wireless/iwlwifi/iwl-tx.c | 25 ++--
drivers/net/wireless/iwlwifi/iwl3945-base.c | 16 +-
drivers/net/wireless/wl12xx/wl1251_debugfs.c | 3 +-
drivers/pci/pci.c | 43 +++----
drivers/pci/pcie/aer/aerdrv_core.c | 10 +-
drivers/pci/quirks.c | 34 +++++
drivers/scsi/mvsas/mv_init.c | 1 +
drivers/scsi/scsi_transport_fc.c | 24 ++--
drivers/scsi/ses.c | 4 +-
drivers/staging/rt2860/common/2860_rtmp_init.c | 2 +-
drivers/usb/core/devio.c | 17 ++-
drivers/usb/host/ehci-hcd.c | 2 +-
drivers/usb/host/ehci-sched.c | 28 +++-
drivers/usb/host/ehci.h | 5 +-
drivers/usb/host/r8a66597-hcd.c | 16 ++-
drivers/usb/host/xhci-hcd.c | 1 +
drivers/usb/serial/ftdi_sio.c | 1 +
drivers/usb/serial/ftdi_sio_ids.h | 7 +
drivers/usb/serial/option.c | 7 +-
drivers/usb/serial/qcserial.c | 29 ++++
drivers/video/efifb.c | 11 ++-
drivers/virtio/virtio_pci.c | 3 +-
fs/exec.c | 3 +-
fs/gfs2/file.c | 2 +-
fs/nfs/delegation.h | 6 +
fs/nfs/dir.c | 2 +-
fs/nfs/file.c | 3 +-
fs/nfs/inode.c | 2 +-
fs/nfs/pagelist.c | 23 ++--
fs/partitions/msdos.c | 85 +++++++------
fs/quota/dquot.c | 45 ++++++-
include/linux/decompress/mm.h | 14 ++-
include/linux/hrtimer.h | 13 ++-
include/linux/if_tunnel.h | 1 +
include/linux/lcm.h | 8 +
include/linux/quotaops.h | 11 ++-
include/linux/tty.h | 11 ++
include/net/mac80211.h | 4 +
init/main.c | 9 +-
ipc/mqueue.c | 3 +-
kernel/cpuset.c | 20 ++-
kernel/hrtimer.c | 96 ++++++++------
kernel/kthread.c | 2 +-
kernel/perf_event.c | 13 ++-
kernel/sched.c | 76 ++++++-----
kernel/softlockup.c | 4 +-
kernel/time/clocksource.c | 4 +
kernel/time/timer_list.c | 5 +-
kernel/trace/ftrace.c | 2 +-
kernel/trace/ring_buffer.c | 12 +-
kernel/trace/trace.c | 24 +++-
lib/Makefile | 2 +-
lib/lcm.c | 15 ++
mm/mempolicy.c | 40 ++++--
mm/readahead.c | 12 ++
net/bluetooth/l2cap.c | 15 ++-
net/bluetooth/rfcomm/core.c | 15 ++-
net/bluetooth/rfcomm/sock.c | 11 ++-
net/bluetooth/sco.c | 11 ++-
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/main.c | 15 ++
net/mac80211/mlme.c | 20 ++-
net/mac80211/rx.c | 8 +
net/netfilter/xt_recent.c | 2 +-
net/sunrpc/auth_gss/auth_gss.c | 5 +-
net/sunrpc/rpc_pipe.c | 2 +
security/min_addr.c | 3 +
sound/pci/ac97/ac97_patch.c | 2 +
sound/pci/cmipci.c | 14 ++-
sound/pci/hda/hda_intel.c | 10 ++
sound/pci/hda/patch_conexant.c | 15 ++
sound/pci/hda/patch_realtek.c | 11 ++-
tools/perf/Documentation/Makefile | 4 +-
tools/perf/Makefile | 4 +-
133 files changed, 1170 insertions(+), 649 deletions(-)
^ permalink raw reply [flat|nested] 432+ messages in thread
* [000/156] 2.6.33.2-stable review
2010-03-30 23:03 4 stable kernel review cycles starting Greg KH
` (2 preceding siblings ...)
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
@ 2010-03-30 23:06 ` Greg KH
2010-03-30 22:40 ` [001/156] drivers/scsi/ses.c: eliminate double free Greg KH
` (155 more replies)
2010-03-31 4:44 ` 4 stable kernel review cycles starting Dave Chinner
4 siblings, 156 replies; 432+ messages in thread
From: Greg KH @ 2010-03-30 23:06 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.33.2 release.
There are 156 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 April 1, 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.33.2-rc1.gz
and the diffstat can be found below.
thanks,
greg k-h
Documentation/filesystems/tmpfs.txt | 6 +-
Makefile | 2 +-
arch/arm/boot/compressed/head.S | 50 +++---
arch/arm/boot/compressed/vmlinux.lds.in | 3 +
arch/powerpc/kernel/perf_event.c | 8 +-
arch/sh/boot/compressed/misc.c | 2 +-
arch/sparc/kernel/perf_event.c | 4 +-
arch/sparc/prom/p1275.c | 12 +-
arch/x86/include/asm/fixmap.h | 6 +-
arch/x86/include/asm/msr-index.h | 2 +
arch/x86/kernel/cpu/intel.c | 3 +-
arch/x86/kernel/cpu/perf_event.c | 9 +-
arch/x86/kernel/dumpstack_64.c | 12 +-
arch/x86/kernel/hw_breakpoint.c | 5 -
arch/x86/kernel/process.c | 32 +++-
arch/x86/kvm/x86.c | 1 +
arch/x86/mm/pageattr.c | 25 +++-
drivers/ata/ahci.c | 28 +++-
drivers/ata/pata_via.c | 4 +
drivers/char/tty_buffer.c | 6 +-
drivers/edac/edac_mce_amd.c | 7 +-
drivers/gpu/drm/i915/i915_gem.c | 21 ++-
drivers/gpu/drm/i915/intel_overlay.c | 13 +-
drivers/gpu/drm/nouveau/nouveau_connector.c | 6 +-
drivers/gpu/drm/radeon/radeon_irq_kms.c | 8 +-
drivers/hwmon/coretemp.c | 2 +-
drivers/i2c/busses/i2c-i801.c | 6 +-
drivers/i2c/busses/i2c-powermac.c | 25 ++-
drivers/ide/icside.c | 64 +++++++-
drivers/ide/ide-probe.c | 12 +-
drivers/ide/pdc202xx_old.c | 4 +-
drivers/input/mouse/alps.c | 2 +
drivers/input/serio/i8042-x86ia64io.h | 7 +
drivers/isdn/gigaset/capi.c | 46 +++---
drivers/isdn/gigaset/common.c | 6 +-
drivers/isdn/gigaset/dummyll.c | 14 ++-
drivers/isdn/gigaset/ev-layer.c | 12 +-
drivers/isdn/gigaset/gigaset.h | 6 +-
drivers/isdn/gigaset/i4l.c | 28 +++-
drivers/isdn/gigaset/interface.c | 1 -
drivers/leds/leds-gpio.c | 3 +-
drivers/media/video/em28xx/em28xx-dvb.c | 1 +
drivers/net/bonding/bond_main.c | 2 +
drivers/net/can/bfin_can.c | 3 +-
drivers/net/e100.c | 2 +-
drivers/net/jme.c | 35 ++++
drivers/net/pppol2tp.c | 6 +-
drivers/net/r8169.c | 29 +++-
drivers/net/tg3.c | 2 +-
drivers/net/wireless/ath/ath5k/ath5k.h | 2 +-
drivers/net/wireless/ath/ath5k/base.c | 22 ++-
drivers/net/wireless/ath/ath5k/phy.c | 37 ++--
drivers/net/wireless/ath/ath5k/qcu.c | 5 +-
drivers/net/wireless/ath/ath5k/reg.h | 1 +
drivers/net/wireless/ath/ath5k/reset.c | 5 +-
drivers/net/wireless/ath/ath9k/ath9k.h | 1 +
drivers/net/wireless/ath/ath9k/beacon.c | 7 +
drivers/net/wireless/ath/ath9k/hw.c | 7 +-
drivers/net/wireless/ath/ath9k/hw.h | 1 +
drivers/net/wireless/ath/ath9k/main.c | 29 ++--
drivers/net/wireless/ath/ath9k/pci.c | 1 +
drivers/net/wireless/ath/ath9k/rc.c | 6 +-
drivers/net/wireless/ath/ath9k/xmit.c | 32 +---
drivers/net/wireless/b43/main.c | 11 +-
drivers/net/wireless/iwlwifi/iwl-3945.c | 8 +-
drivers/net/wireless/iwlwifi/iwl-core.c | 12 +-
drivers/net/wireless/iwlwifi/iwl-helpers.h | 7 +-
drivers/net/wireless/iwlwifi/iwl-rx.c | 21 ++-
drivers/net/wireless/iwlwifi/iwl-tx.c | 25 ++--
drivers/net/wireless/iwlwifi/iwl3945-base.c | 16 +-
drivers/net/wireless/wl12xx/wl1251_debugfs.c | 3 +-
drivers/pci/pci.c | 43 +++---
drivers/pci/quirks.c | 34 ++++
drivers/platform/x86/classmate-laptop.c | 31 +++-
drivers/scsi/qlogicpti.c | 2 +-
drivers/scsi/scsi_transport_fc.c | 24 ++--
drivers/scsi/ses.c | 4 +-
drivers/usb/core/devio.c | 17 ++-
drivers/usb/host/ehci-hcd.c | 2 +-
drivers/usb/host/ehci-sched.c | 28 +++-
drivers/usb/host/ehci.h | 5 +-
drivers/usb/host/r8a66597-hcd.c | 16 ++-
drivers/usb/host/xhci-hcd.c | 1 +
drivers/usb/serial/ftdi_sio.c | 1 +
drivers/usb/serial/ftdi_sio_ids.h | 7 +
drivers/usb/serial/option.c | 7 +-
drivers/usb/serial/qcserial.c | 29 ++++
drivers/video/Kconfig | 12 ++
drivers/video/Makefile | 1 +
drivers/video/sunxvr1000.c | 228 ++++++++++++++++++++++++++
drivers/virtio/virtio_pci.c | 3 +-
fs/exec.c | 3 +-
fs/gfs2/file.c | 2 +-
fs/nfs/delegation.h | 6 +
fs/nfs/dir.c | 2 +-
fs/nfs/file.c | 3 +-
fs/nfs/inode.c | 2 +-
fs/nfs/pagelist.c | 23 ++-
fs/nilfs2/segment.c | 3 +-
fs/partitions/msdos.c | 85 ++++++----
fs/quota/dquot.c | 45 ++++-
include/linux/decompress/mm.h | 14 ++-
include/linux/if_tunnel.h | 1 +
include/linux/kfifo.h | 2 -
include/linux/kvm.h | 1 +
include/linux/netdevice.h | 8 +-
include/linux/netfilter/nfnetlink.h | 2 +-
include/linux/netlink.h | 2 +-
include/linux/perf_event.h | 7 +
include/linux/quotaops.h | 11 +-
include/linux/skbuff.h | 6 -
include/linux/tty.h | 11 ++
include/net/mac80211.h | 7 +-
include/net/netlink.h | 6 +-
include/net/sock.h | 17 ++-
include/net/xfrm.h | 3 +-
init/main.c | 2 +-
ipc/mqueue.c | 3 +-
kernel/cpuset.c | 20 ++-
kernel/hw_breakpoint.c | 1 -
kernel/irq/chip.c | 31 +++-
kernel/irq/manage.c | 18 ++
kernel/kthread.c | 2 +-
kernel/perf_event.c | 34 +++--
kernel/sched.c | 76 +++++----
kernel/softlockup.c | 4 +-
kernel/time/clocksource.c | 4 +
kernel/trace/ftrace.c | 2 +-
kernel/trace/ring_buffer.c | 12 +-
kernel/trace/trace.c | 25 +++-
mm/mempolicy.c | 40 +++--
net/8021q/vlan_core.c | 4 +-
net/bluetooth/l2cap.c | 15 ++-
net/bluetooth/rfcomm/core.c | 13 ++-
net/bluetooth/rfcomm/sock.c | 11 +-
net/bluetooth/sco.c | 11 +-
net/core/dev.c | 8 +-
net/core/sock.c | 16 ++-
net/dccp/minisocks.c | 2 +-
net/ipv4/ip_gre.c | 4 +-
net/ipv4/route.c | 33 ++--
net/ipv4/tcp.c | 65 +++++---
net/ipv4/tcp_input.c | 3 +
net/ipv4/tcp_ipv4.c | 6 +-
net/ipv4/tcp_minisocks.c | 2 +-
net/ipv4/tcp_output.c | 18 +-
net/ipv4/udp.c | 6 +-
net/ipv4/xfrm4_policy.c | 5 +-
net/ipv6/route.c | 13 +-
net/ipv6/tcp_ipv6.c | 6 +-
net/ipv6/udp.c | 28 ++-
net/ipv6/xfrm6_policy.c | 3 +-
net/llc/llc_c_ac.c | 2 +-
net/llc/llc_conn.c | 3 +-
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/mlme.c | 23 ++-
net/mac80211/rate.h | 5 +-
net/mac80211/status.c | 17 ++-
net/netfilter/nf_conntrack_netlink.c | 3 +-
net/netfilter/nfnetlink.c | 4 +-
net/netfilter/xt_recent.c | 2 +-
net/netlink/af_netlink.c | 17 ++-
net/sctp/input.c | 42 +++--
net/sctp/socket.c | 3 +
net/sunrpc/auth_gss/auth_gss.c | 5 +-
net/sunrpc/rpc_pipe.c | 2 +
net/sunrpc/svc_xprt.c | 13 +-
net/sunrpc/svcsock.c | 1 +
net/tipc/socket.c | 6 +-
net/x25/x25_dev.c | 2 +-
net/xfrm/xfrm_policy.c | 7 +-
sound/pci/ac97/ac97_patch.c | 2 +
sound/pci/cmipci.c | 14 ++-
sound/pci/hda/hda_intel.c | 10 +
sound/pci/hda/patch_conexant.c | 15 ++
sound/pci/hda/patch_realtek.c | 10 +-
tools/perf/Documentation/Makefile | 4 +-
tools/perf/Makefile | 4 +-
tools/perf/builtin-annotate.c | 65 ++++----
tools/perf/builtin-probe.c | 1 -
tools/perf/util/probe-finder.c | 3 +
tools/perf/util/symbol.c | 2 +-
tools/perf/util/symbol.h | 2 +
183 files changed, 1728 insertions(+), 727 deletions(-)
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [087/116] PCI quirk: RS780/RS880: work around missing MSI initialization
2010-03-30 22:56 ` [087/116] PCI quirk: RS780/RS880: work around missing MSI initialization Greg KH
@ 2010-03-31 0:13 ` Linus Torvalds
2010-03-31 21:12 ` Greg KH
0 siblings, 1 reply; 432+ messages in thread
From: Linus Torvalds @ 2010-03-31 0:13 UTC (permalink / raw)
To: Greg KH, Rafael J. Wysocki
Cc: Linux Kernel Mailing List, stable, stable-review, Andrew Morton,
alan, Clemens Ladisch, Jesse Barnes
On Tue, 30 Mar 2010, Greg KH wrote:
>
> 2.6.32-stable review patch. If anyone has any objections, please let us know.
>
> ------------------
>
> From: Clemens Ladisch <clemens@ladisch.de>
>
> commit a5ee4eb75413c145334c30e43f1af9875dad6fd7 upstream.
NAK.
Rafael reports this causes a regression. I don't think we know why, but
more importantly, that definitely means this is not stable material.
Linus
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [Stable-review] [007/116] tg3: Fix 5906 transmit hangs
2010-03-30 22:54 ` [007/116] tg3: Fix 5906 transmit hangs Greg KH
@ 2010-03-31 1:15 ` Chuck Ebbert
2010-03-31 20:39 ` Greg KH
0 siblings, 1 reply; 432+ messages in thread
From: Chuck Ebbert @ 2010-03-31 1:15 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel, stable, mcarlson, David S. Miller, Mike Pagano,
Michael Chan, akpm, torvalds, stable-review, alan
On Tue, 30 Mar 2010 15:54:45 -0700
Greg KH <gregkh@suse.de> wrote:
> 2.6.32-stable review patch. If anyone has any objections, please let
> us know.
>
> ------------------
>
> From: Matt Carlson <mcarlson@broadcom.com>
>
> This is a resubmit backport of commit
> 92c6b8d16a36df3f28b2537bed2a56491fb08f11 to kernel version 2.6.32.
> The gentoo bug report can be found at
> https://bugs.gentoo.org/show_bug.cgi?id=301091. Thanks to Matt
> Carlson for his assistance and working me to fix a regression caused
> by the initial patch. The original description is as follows:
>
I think these two patches should be used instead, as they fix the
bug without needing backports and keep the driver closer to upstream:
0e1406dd404ce55dbe8d68b4b5e2aed7e5c75fdb
"tg3: Assign flags to fixes in start_xmit_dma_bug"
92c6b8d16a36df3f28b2537bed2a56491fb08f11
"tg3: Fix 5906 transmit hangs"
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: 4 stable kernel review cycles starting
2010-03-30 23:03 4 stable kernel review cycles starting Greg KH
` (3 preceding siblings ...)
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
@ 2010-03-31 4:44 ` Dave Chinner
2010-03-31 17:38 ` Greg KH
4 siblings, 1 reply; 432+ messages in thread
From: Dave Chinner @ 2010-03-31 4:44 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan
On Tue, Mar 30, 2010 at 04:03:38PM -0700, Greg KH wrote:
> Hi all,
>
> Well, I up and moved cities and caused a bunch of stable patches to be
> backlogged. I've caught up with all of the ones that were marked as
> being wished to be applied to the stable trees, and still have a bunch
> of pending requests still queued up in my mailbox.
>
> But, due to the number of the current patches already applied, it is
> time to just let these go and work on the other pending stuff after
> this.
Greg, I send a series of 19 patches for XFS updates to stable@kernel.org
back on the 12th March for 2.6.32 (subject was "[PATCH 0/19] xfs:
2.6.32.y stable tree updates").
The patches were cc'd to the XFS list and they made it there:
http://oss.sgi.com/archives/xfs/2010-03/msg00125.html
so I'm wondering if you've got them queued up or not or whether
I need to resend them to you....
> So don't worry, if anyone has asked for some patches to be applied to
> some stable trees, and you don't see it here, just give it some time,
> I'm still catching up on things (hey, I'm just happy I have an internet
> connection again...)
I sent these prior to the last stable release that had this same
comment, so I didn't get worried that they had been missed. Now they
are missing from the next stable release, I'm getting worried. :/
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [76/89] sparc: TIF_ABI_PENDING bit removal
2010-03-30 22:58 ` [76/89] sparc: TIF_ABI_PENDING bit removal Greg KH
@ 2010-03-31 12:32 ` Stefan Bader
0 siblings, 0 replies; 432+ messages in thread
From: Stefan Bader @ 2010-03-31 12:32 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
David S. Miller
[-- Attachment #1: Type: text/plain, Size: 760 bytes --]
Greg KH wrote:
> 2.6.31-stable review patch. If anyone has any objections, please let us know.
>
> ------------------
> --- a/arch/sparc/include/asm/thread_info_64.h
> +++ b/arch/sparc/include/asm/thread_info_64.h
> @@ -227,12 +227,11 @@ register struct thread_info *current_thr
> /* flag bit 8 is available */
> #define TIF_SECCOMP 9 /* secure computing */
> #define TIF_SYSCALL_AUDIT 10 /* syscall auditing active */
> -/* flag bit 11 is available */
> /* NOTE: Thread flags >= 12 should be ones we have no interest
> * in using in assembly, else we can't use the mask as
> * an immediate value in instructions such as andcc.
> */
For some reason I accidentally dropped the comment about bit 11. Replacment
patch attached.
Stefan
[-- Attachment #2: 0002-sparc-TIF_ABI_PENDING-bit-removal.patch --]
[-- Type: text/x-diff, Size: 3352 bytes --]
>From d021848a33c6d276b8ab81aef14002f88e20d0d7 Mon Sep 17 00:00:00 2001
From: David Miller <davem@davemloft.net>
Date: Thu, 28 Jan 2010 21:42:02 -0800
Subject: [PATCH] sparc: TIF_ABI_PENDING bit removal
commit 94673e968cbcce07fa78dac4b0ae05d24b5816e1 upstream.
Here are the sparc bits to remove TIF_ABI_PENDING now that
set_personality() is called at the appropriate place in exec.
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
arch/sparc/include/asm/elf_64.h | 13 +++----------
arch/sparc/include/asm/thread_info_64.h | 3 +--
arch/sparc/kernel/process_64.c | 8 --------
3 files changed, 4 insertions(+), 20 deletions(-)
diff --git a/arch/sparc/include/asm/elf_64.h b/arch/sparc/include/asm/elf_64.h
index d42e393..9968085 100644
--- a/arch/sparc/include/asm/elf_64.h
+++ b/arch/sparc/include/asm/elf_64.h
@@ -196,17 +196,10 @@ static inline unsigned int sparc64_elf_hwcap(void)
#define ELF_PLATFORM (NULL)
#define SET_PERSONALITY(ex) \
-do { unsigned long new_flags = current_thread_info()->flags; \
- new_flags &= _TIF_32BIT; \
- if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
- new_flags |= _TIF_32BIT; \
+do { if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
+ set_thread_flag(TIF_32BIT); \
else \
- new_flags &= ~_TIF_32BIT; \
- if ((current_thread_info()->flags & _TIF_32BIT) \
- != new_flags) \
- set_thread_flag(TIF_ABI_PENDING); \
- else \
- clear_thread_flag(TIF_ABI_PENDING); \
+ clear_thread_flag(TIF_32BIT); \
/* flush_thread will update pgd cache */ \
if (personality(current->personality) != PER_LINUX32) \
set_personality(PER_LINUX | \
diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
index 1b45a7b..14c25fe 100644
--- a/arch/sparc/include/asm/thread_info_64.h
+++ b/arch/sparc/include/asm/thread_info_64.h
@@ -232,7 +232,7 @@ register struct thread_info *current_thread_info_reg asm("g6");
* in using in assembly, else we can't use the mask as
* an immediate value in instructions such as andcc.
*/
-#define TIF_ABI_PENDING 12
+/* flag bit 12 is available */
#define TIF_MEMDIE 13
#define TIF_POLLING_NRFLAG 14
#define TIF_FREEZE 15 /* is freezing for suspend */
@@ -246,7 +246,6 @@ register struct thread_info *current_thread_info_reg asm("g6");
#define _TIF_32BIT (1<<TIF_32BIT)
#define _TIF_SECCOMP (1<<TIF_SECCOMP)
#define _TIF_SYSCALL_AUDIT (1<<TIF_SYSCALL_AUDIT)
-#define _TIF_ABI_PENDING (1<<TIF_ABI_PENDING)
#define _TIF_POLLING_NRFLAG (1<<TIF_POLLING_NRFLAG)
#define _TIF_FREEZE (1<<TIF_FREEZE)
diff --git a/arch/sparc/kernel/process_64.c b/arch/sparc/kernel/process_64.c
index 4041f94..3714fdb 100644
--- a/arch/sparc/kernel/process_64.c
+++ b/arch/sparc/kernel/process_64.c
@@ -365,14 +365,6 @@ void flush_thread(void)
struct thread_info *t = current_thread_info();
struct mm_struct *mm;
- if (test_ti_thread_flag(t, TIF_ABI_PENDING)) {
- clear_ti_thread_flag(t, TIF_ABI_PENDING);
- if (test_ti_thread_flag(t, TIF_32BIT))
- clear_ti_thread_flag(t, TIF_32BIT);
- else
- set_ti_thread_flag(t, TIF_32BIT);
- }
-
mm = t->task->mm;
if (mm)
tsb_context_switch(mm);
--
1.6.3.3
^ permalink raw reply related [flat|nested] 432+ messages in thread
* Re: [77/89] x86: get rid of the insane TIF_ABI_PENDING bit
2010-03-30 22:58 ` [77/89] x86: get rid of the insane TIF_ABI_PENDING bit Greg KH
@ 2010-03-31 12:33 ` Stefan Bader
0 siblings, 0 replies; 432+ messages in thread
From: Stefan Bader @ 2010-03-31 12:33 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
H. Peter Anvin
[-- Attachment #1: Type: text/plain, Size: 4041 bytes --]
Greg KH wrote:
> 2.6.31-stable review patch. If anyone has any objections, please let us know.
>
This one had a follow up later (patch attached)
Stefan
> ------------------
>
> From: H. Peter Anvin <hpa@zytor.com>
>
> commit 05d43ed8a89c159ff641d472f970e3f1baa66318 upstream.
>
> Now that the previous commit made it possible to do the personality
> setting at the point of no return, we do just that for ELF binaries.
> And suddenly all the reasons for that insane TIF_ABI_PENDING bit go
> away, and we can just make SET_PERSONALITY() just do the obvious thing
> for a 32-bit compat process.
>
> Everything becomes much more straightforward this way.
>
> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
>
> ---
> arch/x86/ia32/ia32_aout.c | 1 -
> arch/x86/include/asm/elf.h | 10 ++--------
> arch/x86/include/asm/thread_info.h | 2 --
> arch/x86/kernel/process.c | 12 ------------
> arch/x86/kernel/process_64.c | 11 +++++++++++
> 5 files changed, 13 insertions(+), 23 deletions(-)
>
> --- a/arch/x86/ia32/ia32_aout.c
> +++ b/arch/x86/ia32/ia32_aout.c
> @@ -311,7 +311,6 @@ static int load_aout_binary(struct linux
> /* OK, This is the point of no return */
> set_personality(PER_LINUX);
> set_thread_flag(TIF_IA32);
> - clear_thread_flag(TIF_ABI_PENDING);
>
> setup_new_exec(bprm);
>
> --- a/arch/x86/include/asm/elf.h
> +++ b/arch/x86/include/asm/elf.h
> @@ -197,14 +197,8 @@ do { \
> set_fs(USER_DS); \
> } while (0)
>
> -#define COMPAT_SET_PERSONALITY(ex) \
> -do { \
> - if (test_thread_flag(TIF_IA32)) \
> - clear_thread_flag(TIF_ABI_PENDING); \
> - else \
> - set_thread_flag(TIF_ABI_PENDING); \
> - current->personality |= force_personality32; \
> -} while (0)
> +void set_personality_ia32(void);
> +#define COMPAT_SET_PERSONALITY(ex) set_personality_ia32()
>
> #define COMPAT_ELF_PLATFORM ("i686")
>
> --- a/arch/x86/include/asm/thread_info.h
> +++ b/arch/x86/include/asm/thread_info.h
> @@ -86,7 +86,6 @@ struct thread_info {
> #define TIF_NOTSC 16 /* TSC is not accessible in userland */
> #define TIF_IA32 17 /* 32bit process */
> #define TIF_FORK 18 /* ret_from_fork */
> -#define TIF_ABI_PENDING 19
> #define TIF_MEMDIE 20
> #define TIF_DEBUG 21 /* uses debug registers */
> #define TIF_IO_BITMAP 22 /* uses I/O bitmap */
> @@ -110,7 +109,6 @@ struct thread_info {
> #define _TIF_NOTSC (1 << TIF_NOTSC)
> #define _TIF_IA32 (1 << TIF_IA32)
> #define _TIF_FORK (1 << TIF_FORK)
> -#define _TIF_ABI_PENDING (1 << TIF_ABI_PENDING)
> #define _TIF_DEBUG (1 << TIF_DEBUG)
> #define _TIF_IO_BITMAP (1 << TIF_IO_BITMAP)
> #define _TIF_FREEZE (1 << TIF_FREEZE)
> --- a/arch/x86/kernel/process.c
> +++ b/arch/x86/kernel/process.c
> @@ -94,18 +94,6 @@ void flush_thread(void)
> {
> struct task_struct *tsk = current;
>
> -#ifdef CONFIG_X86_64
> - if (test_tsk_thread_flag(tsk, TIF_ABI_PENDING)) {
> - clear_tsk_thread_flag(tsk, TIF_ABI_PENDING);
> - if (test_tsk_thread_flag(tsk, TIF_IA32)) {
> - clear_tsk_thread_flag(tsk, TIF_IA32);
> - } else {
> - set_tsk_thread_flag(tsk, TIF_IA32);
> - current_thread_info()->status |= TS_COMPAT;
> - }
> - }
> -#endif
> -
> clear_tsk_thread_flag(tsk, TIF_DEBUG);
>
> tsk->thread.debugreg0 = 0;
> --- a/arch/x86/kernel/process_64.c
> +++ b/arch/x86/kernel/process_64.c
> @@ -534,6 +534,17 @@ sys_clone(unsigned long clone_flags, uns
> return do_fork(clone_flags, newsp, regs, 0, parent_tid, child_tid);
> }
>
> +void set_personality_ia32(void)
> +{
> + /* inherit personality from parent */
> +
> + /* Make sure to be in 32bit mode */
> + set_thread_flag(TIF_IA32);
> +
> + /* Prepare the first "return" to user space */
> + current_thread_info()->status |= TS_COMPAT;
> +}
> +
> unsigned long get_wchan(struct task_struct *p)
> {
> unsigned long stack;
>
>
[-- Attachment #2: 0006-x86-set_personality_ia32-misses-force_personality32.patch --]
[-- Type: text/x-diff, Size: 1094 bytes --]
>From 27567323dbf8d04f6b9be03190e8745f7b43df48 Mon Sep 17 00:00:00 2001
From: Oleg Nesterov <oleg@redhat.com>
Date: Tue, 16 Feb 2010 15:02:13 +0100
Subject: [PATCH 6/6] x86: set_personality_ia32() misses force_personality32
commit 1252f238db48ec419f40c1bdf30fda649860eed9 upstream
05d43ed8a "x86: get rid of the insane TIF_ABI_PENDING bit" forgot about
force_personality32. Fix.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
---
arch/x86/kernel/process_64.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/x86/kernel/process_64.c b/arch/x86/kernel/process_64.c
index 80c2372..6553691 100644
--- a/arch/x86/kernel/process_64.c
+++ b/arch/x86/kernel/process_64.c
@@ -540,6 +540,7 @@ void set_personality_ia32(void)
/* Make sure to be in 32bit mode */
set_thread_flag(TIF_IA32);
+ current->personality |= force_personality32;
/* Prepare the first "return" to user space */
current_thread_info()->status |= TS_COMPAT;
--
1.6.3.3
^ permalink raw reply related [flat|nested] 432+ messages in thread
* Re: 4 stable kernel review cycles starting
2010-03-31 4:44 ` 4 stable kernel review cycles starting Dave Chinner
@ 2010-03-31 17:38 ` Greg KH
2010-03-31 21:53 ` Dave Chinner
0 siblings, 1 reply; 432+ messages in thread
From: Greg KH @ 2010-03-31 17:38 UTC (permalink / raw)
To: Dave Chinner; +Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan
On Wed, Mar 31, 2010 at 03:44:45PM +1100, Dave Chinner wrote:
> On Tue, Mar 30, 2010 at 04:03:38PM -0700, Greg KH wrote:
> > Hi all,
> >
> > Well, I up and moved cities and caused a bunch of stable patches to be
> > backlogged. I've caught up with all of the ones that were marked as
> > being wished to be applied to the stable trees, and still have a bunch
> > of pending requests still queued up in my mailbox.
> >
> > But, due to the number of the current patches already applied, it is
> > time to just let these go and work on the other pending stuff after
> > this.
>
> Greg, I send a series of 19 patches for XFS updates to stable@kernel.org
> back on the 12th March for 2.6.32 (subject was "[PATCH 0/19] xfs:
> 2.6.32.y stable tree updates").
>
> The patches were cc'd to the XFS list and they made it there:
>
> http://oss.sgi.com/archives/xfs/2010-03/msg00125.html
>
> so I'm wondering if you've got them queued up or not or whether
> I need to resend them to you....
>
> > So don't worry, if anyone has asked for some patches to be applied to
> > some stable trees, and you don't see it here, just give it some time,
> > I'm still catching up on things (hey, I'm just happy I have an internet
> > connection again...)
>
> I sent these prior to the last stable release that had this same
> comment, so I didn't get worried that they had been missed. Now they
> are missing from the next stable release, I'm getting worried. :/
Yes, they are still in my "to-apply" queue. I also have a series of
ext4 and kvm patches as well as a mess of wireless patches to wade
through, so you are in good company.
The issue is that applying individual patches like this is more
"difficult" than just handling patches that are already marked in
Linus's kernel tree as to be added to the stable queues. So it takes a
bit more time and effort to get to those patches, while still keeping up
with the series like you, and other developers, sent.
Combine that with packing up my house and moving a few hundred miles
away, loosing internet access for over a week, and trying to catch up
with the patches that accumulated during that time, and we ended up with
these already-large stable releases that I figured was better to get out
now, than wait a few days to add a few hundred more patches to them.
So I will get to these patches, don't worry, hopefully my self-inflicted
mess of moving will calm down soon and I will catch up with the backlog.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [Stable-review] [007/116] tg3: Fix 5906 transmit hangs
2010-03-31 1:15 ` [Stable-review] " Chuck Ebbert
@ 2010-03-31 20:39 ` Greg KH
2010-03-31 21:23 ` Matt Carlson
0 siblings, 1 reply; 432+ messages in thread
From: Greg KH @ 2010-03-31 20:39 UTC (permalink / raw)
To: Chuck Ebbert
Cc: linux-kernel, stable, mcarlson, David S. Miller, Mike Pagano,
Michael Chan, akpm, torvalds, stable-review, alan
On Tue, Mar 30, 2010 at 09:15:22PM -0400, Chuck Ebbert wrote:
> On Tue, 30 Mar 2010 15:54:45 -0700
> Greg KH <gregkh@suse.de> wrote:
>
> > 2.6.32-stable review patch. If anyone has any objections, please let
> > us know.
> >
> > ------------------
> >
> > From: Matt Carlson <mcarlson@broadcom.com>
> >
> > This is a resubmit backport of commit
> > 92c6b8d16a36df3f28b2537bed2a56491fb08f11 to kernel version 2.6.32.
> > The gentoo bug report can be found at
> > https://bugs.gentoo.org/show_bug.cgi?id=301091. Thanks to Matt
> > Carlson for his assistance and working me to fix a regression caused
> > by the initial patch. The original description is as follows:
> >
>
> I think these two patches should be used instead, as they fix the
> bug without needing backports and keep the driver closer to upstream:
>
> 0e1406dd404ce55dbe8d68b4b5e2aed7e5c75fdb
> "tg3: Assign flags to fixes in start_xmit_dma_bug"
>
> 92c6b8d16a36df3f28b2537bed2a56491fb08f11
> "tg3: Fix 5906 transmit hangs"
I don't know, I'll defer to Matt here, this patch has gone in and out of
the stable queue for a while now as he and some users have tested and
had problems lots of times...
Matt?
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [091/156] PCI quirk: RS780/RS880: work around missing MSI initialization
2010-03-30 22:42 ` [091/156] PCI quirk: RS780/RS880: work around missing MSI initialization Greg KH
@ 2010-03-31 20:40 ` Rafael J. Wysocki
2010-03-31 21:11 ` Greg KH
0 siblings, 1 reply; 432+ messages in thread
From: Rafael J. Wysocki @ 2010-03-31 20:40 UTC (permalink / raw)
To: Greg KH
Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
Clemens Ladisch, Jesse Barnes
On Wednesday 31 March 2010, Greg KH wrote:
> 2.6.33-stable review patch. If anyone has any objections, please let us know.
I do, this one causes a regression to happen on my test box.
Rafael
> ------------------
>
> From: Clemens Ladisch <clemens@ladisch.de>
>
> commit a5ee4eb75413c145334c30e43f1af9875dad6fd7 upstream.
>
> AMD says in section 2.5.4 (GFX MSI Enable) of #43291 (AMD 780G Family
> Register Programming Requirements):
>
> The SBIOS must enable internal graphics MSI capability in GCCFG by
> setting the following: NBCFG.NB_CNTL.STRAP_MSI_ENABLE='1'
>
> Quite a few BIOS writers misinterpret this sentence and think that
> enabling MSI is an optional feature. However, clearing that bit just
> prevents delivery of MSI messages but does not remove the MSI PCI
> capabilities registers, and so leaves these devices unusable for any
> driver that attempts to use MSI.
>
> Setting that bit is not possible after the BIOS has locked down the
> configuration registers, so we have to manually disable MSI for the
> affected devices.
>
> This fixes the codec communication errors in the HDA driver when
> accessing the HDMI audio device, and allows us to get rid of the
> overcautious quirk in radeon_irq_kms.c.
>
> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
> Tested-by: Alex Deucher <alexdeucher@gamil.com>
> Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
>
> ---
> drivers/gpu/drm/radeon/radeon_irq_kms.c | 8 -------
> drivers/pci/quirks.c | 33 ++++++++++++++++++++++++++++++++
> 2 files changed, 34 insertions(+), 7 deletions(-)
>
> --- a/drivers/gpu/drm/radeon/radeon_irq_kms.c
> +++ b/drivers/gpu/drm/radeon/radeon_irq_kms.c
> @@ -116,13 +116,7 @@ int radeon_irq_kms_init(struct radeon_de
> }
> /* enable msi */
> rdev->msi_enabled = 0;
> - /* MSIs don't seem to work on my rs780;
> - * not sure about rs880 or other rs780s.
> - * Needs more investigation.
> - */
> - if ((rdev->family >= CHIP_RV380) &&
> - (rdev->family != CHIP_RS780) &&
> - (rdev->family != CHIP_RS880)) {
> + if (rdev->family >= CHIP_RV380) {
> int ret = pci_enable_msi(rdev->pdev);
> if (!ret) {
> rdev->msi_enabled = 1;
> --- a/drivers/pci/quirks.c
> +++ b/drivers/pci/quirks.c
> @@ -2484,6 +2484,39 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AT
> DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ATI, 0x4375,
> quirk_msi_intx_disable_bug);
>
> +/*
> + * MSI does not work with the AMD RS780/RS880 internal graphics and HDMI audio
> + * devices unless the BIOS has initialized the nb_cntl.strap_msi_enable bit.
> + */
> +static void __init rs780_int_gfx_disable_msi(struct pci_dev *int_gfx_bridge)
> +{
> + u32 nb_cntl;
> +
> + if (!int_gfx_bridge->subordinate)
> + return;
> +
> + pci_bus_write_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0),
> + 0x60, 0);
> + pci_bus_read_config_dword(int_gfx_bridge->bus, PCI_DEVFN(0, 0),
> + 0x64, &nb_cntl);
> +
> + if (!(nb_cntl & BIT(10))) {
> + dev_warn(&int_gfx_bridge->dev,
> + FW_WARN "RS780: MSI for internal graphics disabled\n");
> + int_gfx_bridge->subordinate->bus_flags |= PCI_BUS_FLAGS_NO_MSI;
> + }
> +}
> +
> +#define PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX 0x9602
> +
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_AMD,
> + PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
> + rs780_int_gfx_disable_msi);
> +/* wrong vendor ID on M4A785TD motherboard: */
> +DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_ASUSTEK,
> + PCI_DEVICE_ID_AMD_RS780_P2P_INT_GFX,
> + rs780_int_gfx_disable_msi);
> +
> #endif /* CONFIG_PCI_MSI */
>
> #ifdef CONFIG_PCI_IOV
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
>
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [091/156] PCI quirk: RS780/RS880: work around missing MSI initialization
2010-03-31 20:40 ` Rafael J. Wysocki
@ 2010-03-31 21:11 ` Greg KH
0 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-31 21:11 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan,
Clemens Ladisch, Jesse Barnes
On Wed, Mar 31, 2010 at 10:40:39PM +0200, Rafael J. Wysocki wrote:
> On Wednesday 31 March 2010, Greg KH wrote:
> > 2.6.33-stable review patch. If anyone has any objections, please let us know.
>
> I do, this one causes a regression to happen on my test box.
Now dropped.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [087/116] PCI quirk: RS780/RS880: work around missing MSI initialization
2010-03-31 0:13 ` Linus Torvalds
@ 2010-03-31 21:12 ` Greg KH
0 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-31 21:12 UTC (permalink / raw)
To: Linus Torvalds
Cc: Rafael J. Wysocki, Linux Kernel Mailing List, stable,
stable-review, Andrew Morton, alan, Clemens Ladisch, Jesse Barnes
On Tue, Mar 30, 2010 at 05:13:13PM -0700, Linus Torvalds wrote:
>
>
>
> On Tue, 30 Mar 2010, Greg KH wrote:
> >
> > 2.6.32-stable review patch. If anyone has any objections, please let us know.
> >
> > ------------------
> >
> > From: Clemens Ladisch <clemens@ladisch.de>
> >
> > commit a5ee4eb75413c145334c30e43f1af9875dad6fd7 upstream.
>
> NAK.
>
> Rafael reports this causes a regression. I don't think we know why, but
> more importantly, that definitely means this is not stable material.
Thanks, I've now dropped this from the .32 and .33 queues.
greg k-h
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [Stable-review] [007/116] tg3: Fix 5906 transmit hangs
2010-03-31 20:39 ` Greg KH
@ 2010-03-31 21:23 ` Matt Carlson
2010-03-31 22:17 ` Greg KH
0 siblings, 1 reply; 432+ messages in thread
From: Matt Carlson @ 2010-03-31 21:23 UTC (permalink / raw)
To: Greg KH
Cc: Chuck Ebbert, linux-kernel@vger.kernel.org, stable@kernel.org,
Matthew Carlson, David S. Miller, Mike Pagano, Michael Chan,
akpm@linux-foundation.org, torvalds@linux-foundation.org,
stable-review@kernel.org, alan@lxorguk.ukuu.org.uk
On Wed, Mar 31, 2010 at 01:39:26PM -0700, Greg KH wrote:
> On Tue, Mar 30, 2010 at 09:15:22PM -0400, Chuck Ebbert wrote:
> > On Tue, 30 Mar 2010 15:54:45 -0700
> > Greg KH <gregkh@suse.de> wrote:
> >
> > > 2.6.32-stable review patch. If anyone has any objections, please let
> > > us know.
> > >
> > > ------------------
> > >
> > > From: Matt Carlson <mcarlson@broadcom.com>
> > >
> > > This is a resubmit backport of commit
> > > 92c6b8d16a36df3f28b2537bed2a56491fb08f11 to kernel version 2.6.32.
> > > The gentoo bug report can be found at
> > > https://bugs.gentoo.org/show_bug.cgi?id=301091. Thanks to Matt
> > > Carlson for his assistance and working me to fix a regression caused
> > > by the initial patch. The original description is as follows:
> > >
> >
> > I think these two patches should be used instead, as they fix the
> > bug without needing backports and keep the driver closer to upstream:
> >
> > 0e1406dd404ce55dbe8d68b4b5e2aed7e5c75fdb
> > "tg3: Assign flags to fixes in start_xmit_dma_bug"
> >
> > 92c6b8d16a36df3f28b2537bed2a56491fb08f11
> > "tg3: Fix 5906 transmit hangs"
>
> I don't know, I'll defer to Matt here, this patch has gone in and out of
> the stable queue for a while now as he and some users have tested and
> had problems lots of times...
>
> Matt?
I'm O.K. with either path. I supported Mike's patch because it was
minimal. (All the bugs should be shaken out by now.) If that isn't a
goal, then I guess I'd rather rubber stamp my own implementation.
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: 4 stable kernel review cycles starting
2010-03-31 17:38 ` Greg KH
@ 2010-03-31 21:53 ` Dave Chinner
2010-03-31 22:47 ` Greg KH
0 siblings, 1 reply; 432+ messages in thread
From: Dave Chinner @ 2010-03-31 21:53 UTC (permalink / raw)
To: Greg KH; +Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan
On Wed, Mar 31, 2010 at 10:38:31AM -0700, Greg KH wrote:
> On Wed, Mar 31, 2010 at 03:44:45PM +1100, Dave Chinner wrote:
> > On Tue, Mar 30, 2010 at 04:03:38PM -0700, Greg KH wrote:
> > > Hi all,
> > >
> > > Well, I up and moved cities and caused a bunch of stable patches to be
> > > backlogged. I've caught up with all of the ones that were marked as
> > > being wished to be applied to the stable trees, and still have a bunch
> > > of pending requests still queued up in my mailbox.
> > >
> > > But, due to the number of the current patches already applied, it is
> > > time to just let these go and work on the other pending stuff after
> > > this.
> >
> > Greg, I send a series of 19 patches for XFS updates to stable@kernel.org
> > back on the 12th March for 2.6.32 (subject was "[PATCH 0/19] xfs:
> > 2.6.32.y stable tree updates").
> >
> > The patches were cc'd to the XFS list and they made it there:
> >
> > http://oss.sgi.com/archives/xfs/2010-03/msg00125.html
> >
> > so I'm wondering if you've got them queued up or not or whether
> > I need to resend them to you....
> >
> > > So don't worry, if anyone has asked for some patches to be applied to
> > > some stable trees, and you don't see it here, just give it some time,
> > > I'm still catching up on things (hey, I'm just happy I have an internet
> > > connection again...)
> >
> > I sent these prior to the last stable release that had this same
> > comment, so I didn't get worried that they had been missed. Now they
> > are missing from the next stable release, I'm getting worried. :/
>
> Yes, they are still in my "to-apply" queue. I also have a series of
> ext4 and kvm patches as well as a mess of wireless patches to wade
> through, so you are in good company.
Ok, I just wanted to make sure they were in the queue and not some
bit bucket somewhere.
> The issue is that applying individual patches like this is more
> "difficult" than just handling patches that are already marked in
> Linus's kernel tree as to be added to the stable queues. So it
> takes a bit more time and effort to get to those patches, while
> still keeping up with the series like you, and other developers,
> sent.
Understood. Would providing a git tree to pull from for large series
like the XFS one make this easier for you in future? I can do that
bit of extra work if that makes things easier for you...
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [Stable-review] [007/116] tg3: Fix 5906 transmit hangs
2010-03-31 21:23 ` Matt Carlson
@ 2010-03-31 22:17 ` Greg KH
0 siblings, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-03-31 22:17 UTC (permalink / raw)
To: Matt Carlson
Cc: Chuck Ebbert, linux-kernel@vger.kernel.org, stable@kernel.org,
David S. Miller, Mike Pagano, Michael Chan,
akpm@linux-foundation.org, torvalds@linux-foundation.org,
stable-review@kernel.org, alan@lxorguk.ukuu.org.uk
On Wed, Mar 31, 2010 at 02:23:09PM -0700, Matt Carlson wrote:
> On Wed, Mar 31, 2010 at 01:39:26PM -0700, Greg KH wrote:
> > On Tue, Mar 30, 2010 at 09:15:22PM -0400, Chuck Ebbert wrote:
> > > On Tue, 30 Mar 2010 15:54:45 -0700
> > > Greg KH <gregkh@suse.de> wrote:
> > >
> > > > 2.6.32-stable review patch. If anyone has any objections, please let
> > > > us know.
> > > >
> > > > ------------------
> > > >
> > > > From: Matt Carlson <mcarlson@broadcom.com>
> > > >
> > > > This is a resubmit backport of commit
> > > > 92c6b8d16a36df3f28b2537bed2a56491fb08f11 to kernel version 2.6.32.
> > > > The gentoo bug report can be found at
> > > > https://bugs.gentoo.org/show_bug.cgi?id=301091. Thanks to Matt
> > > > Carlson for his assistance and working me to fix a regression caused
> > > > by the initial patch. The original description is as follows:
> > > >
> > >
> > > I think these two patches should be used instead, as they fix the
> > > bug without needing backports and keep the driver closer to upstream:
> > >
> > > 0e1406dd404ce55dbe8d68b4b5e2aed7e5c75fdb
> > > "tg3: Assign flags to fixes in start_xmit_dma_bug"
> > >
> > > 92c6b8d16a36df3f28b2537bed2a56491fb08f11
> > > "tg3: Fix 5906 transmit hangs"
> >
> > I don't know, I'll defer to Matt here, this patch has gone in and out of
> > the stable queue for a while now as he and some users have tested and
> > had problems lots of times...
> >
> > Matt?
>
> I'm O.K. with either path. I supported Mike's patch because it was
> minimal. (All the bugs should be shaken out by now.) If that isn't a
> goal, then I guess I'd rather rubber stamp my own implementation.
I'll live with what we have now as we know it's been tested, and it is
less work for me at the moment :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: 4 stable kernel review cycles starting
2010-03-31 21:53 ` Dave Chinner
@ 2010-03-31 22:47 ` Greg KH
2010-04-01 4:40 ` [Stable-review] " Willy Tarreau
0 siblings, 1 reply; 432+ messages in thread
From: Greg KH @ 2010-03-31 22:47 UTC (permalink / raw)
To: Dave Chinner; +Cc: linux-kernel, stable, stable-review, torvalds, akpm, alan
On Thu, Apr 01, 2010 at 08:53:32AM +1100, Dave Chinner wrote:
> On Wed, Mar 31, 2010 at 10:38:31AM -0700, Greg KH wrote:
> > On Wed, Mar 31, 2010 at 03:44:45PM +1100, Dave Chinner wrote:
> > > On Tue, Mar 30, 2010 at 04:03:38PM -0700, Greg KH wrote:
> > > > Hi all,
> > > >
> > > > Well, I up and moved cities and caused a bunch of stable patches to be
> > > > backlogged. I've caught up with all of the ones that were marked as
> > > > being wished to be applied to the stable trees, and still have a bunch
> > > > of pending requests still queued up in my mailbox.
> > > >
> > > > But, due to the number of the current patches already applied, it is
> > > > time to just let these go and work on the other pending stuff after
> > > > this.
> > >
> > > Greg, I send a series of 19 patches for XFS updates to stable@kernel.org
> > > back on the 12th March for 2.6.32 (subject was "[PATCH 0/19] xfs:
> > > 2.6.32.y stable tree updates").
> > >
> > > The patches were cc'd to the XFS list and they made it there:
> > >
> > > http://oss.sgi.com/archives/xfs/2010-03/msg00125.html
> > >
> > > so I'm wondering if you've got them queued up or not or whether
> > > I need to resend them to you....
> > >
> > > > So don't worry, if anyone has asked for some patches to be applied to
> > > > some stable trees, and you don't see it here, just give it some time,
> > > > I'm still catching up on things (hey, I'm just happy I have an internet
> > > > connection again...)
> > >
> > > I sent these prior to the last stable release that had this same
> > > comment, so I didn't get worried that they had been missed. Now they
> > > are missing from the next stable release, I'm getting worried. :/
> >
> > Yes, they are still in my "to-apply" queue. I also have a series of
> > ext4 and kvm patches as well as a mess of wireless patches to wade
> > through, so you are in good company.
>
> Ok, I just wanted to make sure they were in the queue and not some
> bit bucket somewhere.
>
> > The issue is that applying individual patches like this is more
> > "difficult" than just handling patches that are already marked in
> > Linus's kernel tree as to be added to the stable queues. So it
> > takes a bit more time and effort to get to those patches, while
> > still keeping up with the series like you, and other developers,
> > sent.
>
> Understood. Would providing a git tree to pull from for large series
> like the XFS one make this easier for you in future? I can do that
> bit of extra work if that makes things easier for you...
No, patches are still easier, I would have to convert the git tree to
patches anyway, so for now, this is fine.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [Stable-review] 4 stable kernel review cycles starting
2010-03-31 22:47 ` Greg KH
@ 2010-04-01 4:40 ` Willy Tarreau
2010-04-01 7:26 ` David Miller
0 siblings, 1 reply; 432+ messages in thread
From: Willy Tarreau @ 2010-04-01 4:40 UTC (permalink / raw)
To: Greg KH
Cc: Dave Chinner, linux-kernel, stable, akpm, torvalds, stable-review,
alan
On Wed, Mar 31, 2010 at 03:47:55PM -0700, Greg KH wrote:
> On Thu, Apr 01, 2010 at 08:53:32AM +1100, Dave Chinner wrote:
> > On Wed, Mar 31, 2010 at 10:38:31AM -0700, Greg KH wrote:
> > > The issue is that applying individual patches like this is more
> > > "difficult" than just handling patches that are already marked in
> > > Linus's kernel tree as to be added to the stable queues. So it
> > > takes a bit more time and effort to get to those patches, while
> > > still keeping up with the series like you, and other developers,
> > > sent.
> >
> > Understood. Would providing a git tree to pull from for large series
> > like the XFS one make this easier for you in future? I can do that
> > bit of extra work if that makes things easier for you...
>
> No, patches are still easier, I would have to convert the git tree to
> patches anyway, so for now, this is fine.
I don't know for you, Greg, but one thing that I find time consuming
when merging fixes that I'm not backporting is to try to find the
commit ID of the equivalent mainline fix. And it's not specific to
the kernel, I also have the same issue with other projects.
For this reason, IMHO it helps when submitters can indicate in each
patch the mainline equivalent ID, or alternatively that it's pointless
to look for it because the fix is much different.
Just my 2 cents,
Willy
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [Stable-review] 4 stable kernel review cycles starting
2010-04-01 4:40 ` [Stable-review] " Willy Tarreau
@ 2010-04-01 7:26 ` David Miller
2010-04-01 11:23 ` Stefan Richter
2010-04-01 15:35 ` [Stable-review] 4 stable kernel review cycles starting Greg KH
0 siblings, 2 replies; 432+ messages in thread
From: David Miller @ 2010-04-01 7:26 UTC (permalink / raw)
To: w; +Cc: gregkh, david, linux-kernel, stable, akpm, torvalds,
stable-review, alan
From: Willy Tarreau <w@1wt.eu>
Date: Thu, 1 Apr 2010 06:40:48 +0200
> For this reason, IMHO it helps when submitters can indicate in each
> patch the mainline equivalent ID, or alternatively that it's pointless
> to look for it because the fix is much different.
I put this at the top of every networking/ide/sparc commit message
for -stable submissions I make.
In fact I thought that was a requirement for -stable submissions?
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [Stable-review] 4 stable kernel review cycles starting
2010-04-01 7:26 ` David Miller
@ 2010-04-01 11:23 ` Stefan Richter
2010-04-01 15:35 ` Greg KH
2010-04-01 15:35 ` [Stable-review] 4 stable kernel review cycles starting Greg KH
1 sibling, 1 reply; 432+ messages in thread
From: Stefan Richter @ 2010-04-01 11:23 UTC (permalink / raw)
To: David Miller
Cc: w, gregkh, david, linux-kernel, stable, akpm, torvalds,
stable-review, alan
David Miller wrote:
> From: Willy Tarreau <w@1wt.eu>
> Date: Thu, 1 Apr 2010 06:40:48 +0200
>
>> For this reason, IMHO it helps when submitters can indicate in each
>> patch the mainline equivalent ID, or alternatively that it's pointless
>> to look for it because the fix is much different.
>
> I put this at the top of every networking/ide/sparc commit message
> for -stable submissions I make.
>
> In fact I thought that was a requirement for -stable submissions?
It is a documented requirement, perhaps not very clearly worded in The
Submitter's Guide To Stable...
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=46cdf871d9970b9252469531f9efd4a17243bb0b
--
Stefan Richter
-=====-==-=- -=-- ----=
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [Stable-review] 4 stable kernel review cycles starting
2010-04-01 7:26 ` David Miller
2010-04-01 11:23 ` Stefan Richter
@ 2010-04-01 15:35 ` Greg KH
1 sibling, 0 replies; 432+ messages in thread
From: Greg KH @ 2010-04-01 15:35 UTC (permalink / raw)
To: David Miller
Cc: w, david, linux-kernel, stable, akpm, torvalds, stable-review,
alan
On Thu, Apr 01, 2010 at 12:26:22AM -0700, David Miller wrote:
> From: Willy Tarreau <w@1wt.eu>
> Date: Thu, 1 Apr 2010 06:40:48 +0200
>
> > For this reason, IMHO it helps when submitters can indicate in each
> > patch the mainline equivalent ID, or alternatively that it's pointless
> > to look for it because the fix is much different.
>
> I put this at the top of every networking/ide/sparc commit message
> for -stable submissions I make.
>
> In fact I thought that was a requirement for -stable submissions?
It is. Unfortunatly not everyone remembers it, and I have to go dig
through the git tree to find the commit ids, which slows down the
ability for their patches to get accepted.
The patches that include the git commit ids are trivial to get added to
the tree, almost no extra work on my part.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [Stable-review] 4 stable kernel review cycles starting
2010-04-01 11:23 ` Stefan Richter
@ 2010-04-01 15:35 ` Greg KH
2010-04-01 20:01 ` [PATCH] Documentation: -stable rules: upstream commit ID requirement reworded Stefan Richter
0 siblings, 1 reply; 432+ messages in thread
From: Greg KH @ 2010-04-01 15:35 UTC (permalink / raw)
To: Stefan Richter
Cc: David Miller, w, david, linux-kernel, stable, akpm, torvalds,
stable-review, alan
On Thu, Apr 01, 2010 at 01:23:43PM +0200, Stefan Richter wrote:
> David Miller wrote:
> > From: Willy Tarreau <w@1wt.eu>
> > Date: Thu, 1 Apr 2010 06:40:48 +0200
> >
> >> For this reason, IMHO it helps when submitters can indicate in each
> >> patch the mainline equivalent ID, or alternatively that it's pointless
> >> to look for it because the fix is much different.
> >
> > I put this at the top of every networking/ide/sparc commit message
> > for -stable submissions I make.
> >
> > In fact I thought that was a requirement for -stable submissions?
>
> It is a documented requirement, perhaps not very clearly worded in The
> Submitter's Guide To Stable...
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=46cdf871d9970b9252469531f9efd4a17243bb0b
Patches always welcome to make that file easier to understand.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 432+ messages in thread
* [PATCH] Documentation: -stable rules: upstream commit ID requirement reworded
2010-04-01 15:35 ` Greg KH
@ 2010-04-01 20:01 ` Stefan Richter
2010-04-02 16:11 ` Randy Dunlap
0 siblings, 1 reply; 432+ messages in thread
From: Stefan Richter @ 2010-04-01 20:01 UTC (permalink / raw)
To: Greg KH, Randy Dunlap
Cc: David Miller, Willy Tarreau, linux-kernel, linux-doc
It is a hard requirement to include the upstream commit ID in the
changelog of a -stable submission, not just a courtesy to the stable
team. This concerns only mail submission though, which is no longer
the only way into stable. (Also, fix a double "the".)
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
---
Documentation/stable_kernel_rules.txt | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
Index: b/Documentation/stable_kernel_rules.txt
===================================================================
--- a/Documentation/stable_kernel_rules.txt
+++ b/Documentation/stable_kernel_rules.txt
@@ -18,16 +18,15 @@ Rules on what kind of patches are accept
- It cannot contain any "trivial" fixes in it (spelling changes,
whitespace cleanups, etc).
- It must follow the Documentation/SubmittingPatches rules.
- - It or an equivalent fix must already exist in Linus' tree. Quote the
- respective commit ID in Linus' tree in your patch submission to -stable.
+ - It or an equivalent fix must already exist in Linus' tree (upstream).
Procedure for submitting patches to the -stable tree:
- Send the patch, after verifying that it follows the above rules, to
- stable@kernel.org.
- - To have the patch automatically included in the stable tree, add the
- the tag
+ stable@kernel.org. You must note the upstream commit ID in the changelog
+ of your submission.
+ - To have the patch automatically included in the stable tree, add the tag
Cc: stable@kernel.org
in the sign-off area. Once the patch is merged it will be applied to
the stable tree without anything else needing to be done by the author
--
Stefan Richter
-=====-==-=- -=-- ----=
http://arcgraph.de/sr/
^ permalink raw reply [flat|nested] 432+ messages in thread
* Re: [PATCH] Documentation: -stable rules: upstream commit ID requirement reworded
2010-04-01 20:01 ` [PATCH] Documentation: -stable rules: upstream commit ID requirement reworded Stefan Richter
@ 2010-04-02 16:11 ` Randy Dunlap
0 siblings, 0 replies; 432+ messages in thread
From: Randy Dunlap @ 2010-04-02 16:11 UTC (permalink / raw)
To: Stefan Richter
Cc: Greg KH, David Miller, Willy Tarreau, linux-kernel, linux-doc
On Thu, 1 Apr 2010 22:01:52 +0200 (CEST) Stefan Richter wrote:
> It is a hard requirement to include the upstream commit ID in the
> changelog of a -stable submission, not just a courtesy to the stable
> team. This concerns only mail submission though, which is no longer
> the only way into stable. (Also, fix a double "the".)
>
> Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Looks good to me. Thanks.
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
> ---
> Documentation/stable_kernel_rules.txt | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> Index: b/Documentation/stable_kernel_rules.txt
> ===================================================================
> --- a/Documentation/stable_kernel_rules.txt
> +++ b/Documentation/stable_kernel_rules.txt
> @@ -18,16 +18,15 @@ Rules on what kind of patches are accept
> - It cannot contain any "trivial" fixes in it (spelling changes,
> whitespace cleanups, etc).
> - It must follow the Documentation/SubmittingPatches rules.
> - - It or an equivalent fix must already exist in Linus' tree. Quote the
> - respective commit ID in Linus' tree in your patch submission to -stable.
> + - It or an equivalent fix must already exist in Linus' tree (upstream).
>
>
> Procedure for submitting patches to the -stable tree:
>
> - Send the patch, after verifying that it follows the above rules, to
> - stable@kernel.org.
> - - To have the patch automatically included in the stable tree, add the
> - the tag
> + stable@kernel.org. You must note the upstream commit ID in the changelog
> + of your submission.
> + - To have the patch automatically included in the stable tree, add the tag
> Cc: stable@kernel.org
> in the sign-off area. Once the patch is merged it will be applied to
> the stable tree without anything else needing to be done by the author
---
~Randy
^ permalink raw reply [flat|nested] 432+ messages in thread
end of thread, other threads:[~2010-04-02 16:11 UTC | newest]
Thread overview: 432+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-30 23:03 4 stable kernel review cycles starting Greg KH
2010-03-30 23:04 ` [00/45] 2.6.27.46-stable review Greg KH
2010-03-30 22:48 ` [01/45] UBI: fix volume creation input checking Greg KH
2010-03-30 22:48 ` [02/45] Fix potential crash with sys_move_pages Greg KH
2010-03-30 22:48 ` [03/45] Fix race in tty_fasync() properly Greg KH
2010-03-30 22:48 ` [04/45] futex: Handle futex value corruption gracefully Greg KH
2010-03-30 22:48 ` [05/45] futex: Handle user space " Greg KH
2010-03-30 22:48 ` [06/45] resource: add helpers for fetching rlimits Greg KH
2010-03-30 22:48 ` [07/45] printk: robustify printk, fix #2 Greg KH
2010-03-30 22:48 ` [08/45] hwmon: (lm78) Fix I/O resource conflict with PNP Greg KH
2010-03-30 22:48 ` [09/45] r8169: Fix receive buffer length when MTU is between 1515 and 1536 Greg KH
2010-03-30 22:48 ` [10/45] EHCI: fix bug in keeping track of resuming ports Greg KH
2010-03-30 22:48 ` [11/45] ax25: Fix possible oops in ax25_make_new Greg KH
2010-03-30 22:48 ` [12/45] net: unix: fix sending fds in multiple buffers Greg KH
2010-03-30 22:48 ` [13/45] sit: fix off-by-one in ipip6_tunnel_get_prl Greg KH
2010-03-30 22:48 ` [14/45] tcp: fix CONFIG_TCP_MD5SIG + CONFIG_PREEMPT timer BUG() Greg KH
2010-03-30 22:48 ` [15/45] x86: fix csum_ipv6_magic asm memory clobber Greg KH
2010-03-30 22:48 ` [16/45] sky2: Set SKY2_HW_RAM_BUFFER in sky2_init Greg KH
2010-03-30 22:48 ` [17/45] sched: fine-tune SD_MC_INIT Greg KH
2010-03-30 22:48 ` [18/45] sched: fine-tune SD_SIBLING_INIT Greg KH
2010-03-30 22:48 ` [19/45] sched: wakeup preempt when small overlap Greg KH
2010-03-30 22:48 ` [20/45] drivers/char/mem.c: avoid OOM lockup during large reads from /dev/zero Greg KH
2010-03-30 22:48 ` [21/45] i2c: Do not use device name after device_unregister Greg KH
2010-03-30 22:48 ` [22/45] serial: 8250: add serial transmitter fully empty test Greg KH
2010-03-30 22:48 ` [23/45] USB: usbfs: only copy the actual data received Greg KH
2010-03-30 22:48 ` [24/45] USB: usbfs: properly clean up the as structure on error paths Greg KH
2010-03-30 22:48 ` [25/45] USB: EHCI: fix counting of transaction error retries Greg KH
2010-03-30 22:48 ` [26/45] KVM: x86 emulator: limit instructions to 15 bytes Greg KH
2010-03-30 22:48 ` [27/45] ext4: Avoid null pointer dereference when decoding EROFS w/o a journal Greg KH
2010-03-30 22:48 ` [28/45] KVM: VMX: Check cpl before emulating debug register access Greg KH
2010-03-30 22:48 ` [29/45] drm/r128: Add test for initialisation to all ioctls that require it Greg KH
2010-03-30 22:48 ` [30/45] tc: Fix unitialized kernel memory leak Greg KH
2010-03-30 22:48 ` [31/45] parisc: isa-eeprom - Fix loff_t usage Greg KH
2010-03-30 22:48 ` [32/45] KVM: x86: check for cr3 validity in ioctl_set_sregs Greg KH
2010-03-30 22:48 ` [33/45] fix LOOKUP_FOLLOW on automount "symlinks" Greg KH
2010-03-30 22:48 ` [34/45] x86, ia32_aout: do not kill argument mapping Greg KH
2010-03-30 22:48 ` [35/45] coredump: suppress uid comparison test if core output files are pipes Greg KH
2010-03-30 22:48 ` [36/45] bonding: ignore updelay param when there is no active slave Greg KH
2010-03-30 22:48 ` [37/45] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
2010-03-30 22:48 ` [38/45] b44 WOL setup: one-bit-off stack corruption kernel panic fix Greg KH
2010-03-30 22:48 ` [39/45] tmpfs: fix oops on mounts with mpol=default Greg KH
2010-03-30 22:49 ` [40/45] tmpfs: mpol=bind:0 dont cause mount error Greg KH
2010-03-30 22:49 ` [41/45] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
2010-03-30 22:49 ` [42/45] doc: add the documentation for mpol=local Greg KH
2010-03-30 22:49 ` [43/45] tmpfs: cleanup mpol_parse_str() Greg KH
2010-03-30 22:49 ` [44/45] USB: fix usbfs regression Greg KH
2010-03-30 22:49 ` [45/45] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
2010-03-30 23:05 ` [00/89] 2.6.31.13-stable review Greg KH
2010-03-30 22:57 ` [01/89] Fix potential crash with sys_move_pages Greg KH
2010-03-30 22:57 ` [02/89] futex: Handle futex value corruption gracefully Greg KH
2010-03-30 22:57 ` [03/89] futex: Handle user space " Greg KH
2010-03-30 22:57 ` [04/89] futex_lock_pi() key refcnt fix Greg KH
2010-03-30 22:57 ` [05/89] SECURITY: selinux, fix update_rlimit_cpu parameter Greg KH
2010-03-30 22:57 ` [06/89] UBI: fix volume creation input checking Greg KH
2010-03-30 22:57 ` [07/89] cciss: Make cciss_seq_show handle holes in the h->drv[] array Greg KH
2010-03-30 22:57 ` [08/89] CPUFREQ: Fix use after free of struct powernow_k8_data Greg KH
2010-03-30 22:57 ` [09/89] resource: add helpers for fetching rlimits Greg KH
2010-03-30 22:57 ` [10/89] rtc-fm3130: add missing braces Greg KH
2010-03-30 22:57 ` [11/89] ath5k: Fix eeprom checksum check for custom sized eeproms Greg KH
2010-03-30 22:57 ` [12/89] clockevent: Dont remove broadcast device when cpu is dead Greg KH
2010-03-30 22:57 ` [13/89] connector: Delete buggy notification code Greg KH
2010-03-30 22:57 ` [14/89] KVM: x86 emulator: limit instructions to 15 bytes Greg KH
2010-03-30 22:57 ` [15/89] ALSA: usb-audio - Avoid Oops after disconnect Greg KH
2010-03-30 22:57 ` [16/89] HID: add device IDs for new model of Apple Wireless Keyboard Greg KH
2010-03-30 22:57 ` [17/89] inotify: do not reuse watch descriptors Greg KH
2010-03-30 22:57 ` [18/89] inotify: only warn once for inotify problems Greg KH
2010-03-30 22:57 ` [19/89] edac: i5000_edac critical fix panic out of bounds Greg KH
2010-03-30 22:57 ` [20/89] [SCSI] megaraid_sas: remove sysfs poll_mode_io world writeable permissions Greg KH
2010-03-30 22:57 ` [21/89] page allocator: update NR_FREE_PAGES only when necessary Greg KH
2010-03-30 22:57 ` [22/89] x86, apic: use physical mode for IBM summit platforms Greg KH
2010-03-30 22:57 ` [23/89] reiserfs: truncate blocks not used by a write Greg KH
2010-03-30 22:57 ` [24/89] ecryptfs: initialize private persistent file before dereferencing pointer Greg KH
2010-03-30 22:57 ` [25/89] ecryptfs: use after free Greg KH
2010-03-30 22:57 ` [26/89] nozomi: quick fix for the close/close bug Greg KH
2010-03-30 22:57 ` [27/89] serial: 8250_pnp: use wildcard for serial Wacom tablets Greg KH
2010-03-30 22:57 ` [28/89] tty: fix race in tty_fasync Greg KH
2010-03-30 22:57 ` [29/89] USB: add missing delay during remote wakeup Greg KH
2010-03-30 22:57 ` [30/89] USB: add speed values for USB 3.0 and wireless controllers Greg KH
2010-03-30 22:57 ` [31/89] USB: Dont use GFP_KERNEL while we cannot reset a storage device Greg KH
2010-03-30 22:57 ` [32/89] USB: EHCI: fix handling of unusual interrupt intervals Greg KH
2010-03-30 22:57 ` [33/89] USB: EHCI & UHCI: fix race between root-hub suspend and port resume Greg KH
2010-03-30 22:57 ` [34/89] USB: fix bitmask merge error Greg KH
2010-03-30 22:57 ` [35/89] usb: serial: fix memory leak in generic driver Greg KH
2010-03-30 22:57 ` [36/89] SCSI: enclosure: fix oops while iterating enclosure_status array Greg KH
2010-03-30 22:57 ` [37/89] x86/PCI/PAT: return EINVAL for pci mmap WC request for !pat_enabled Greg KH
2010-03-30 22:57 ` [38/89] USB: fix usbstorage for 2770:915d delivers no FAT Greg KH
2010-03-30 22:57 ` [39/89] vmalloc: remove BUG_ON due to racy counting of VM_LAZY_FREE Greg KH
2010-03-30 22:57 ` [40/89] Input: ALPS - add interleaved protocol support (Dell E6x00 series) Greg KH
2010-03-30 22:57 ` [41/89] partitions: read whole sector with EFI GPT header Greg KH
2010-03-30 22:57 ` [42/89] partitions: use sector size for EFI GPT Greg KH
2010-03-30 22:57 ` [43/89] sfc: Fix DMA mapping cleanup in case of an error in TSO Greg KH
2010-03-30 22:57 ` [44/89] V4L/DVB: af9015: add new USB ID for KWorld PlusTV Dual DVB-T Stick (DVB-T 399U) Greg KH
2010-03-30 22:57 ` [45/89] ipc ns: fix memory leak (idr) Greg KH
2010-03-30 22:57 ` [46/89] fnctl: f_modown should call write_lock_irqsave/restore Greg KH
2010-03-30 22:57 ` [47/89] Fix race in tty_fasync() properly Greg KH
2010-03-30 22:57 ` [48/89] USB: usbfs: properly clean up the as structure on error paths Greg KH
2010-03-30 22:57 ` [49/89] USB: usbfs: only copy the actual data received Greg KH
2010-03-30 22:57 ` [50/89] i2c: Do not use device name after device_unregister Greg KH
2010-03-30 22:57 ` [51/89] i2c/pca: Dont use *_interruptible Greg KH
2010-03-30 22:57 ` [52/89] i2c-tiny-usb: Fix on big-endian systems Greg KH
2010-03-30 22:57 ` [53/89] V4L/DVB (13155): uvcvideo: Add a module parameter to set the streaming control timeout Greg KH
2010-03-30 22:57 ` [54/89] hwmon: (adt7462) Wrong ADT7462_VOLT_COUNT Greg KH
2010-03-30 22:57 ` [55/89] hwmon: (fschmd) Fix a memleak on multiple opens of /dev/watchdog Greg KH
2010-03-30 22:57 ` [56/89] hwmon: (lm78) Request I/O ports individually for probing Greg KH
2010-03-30 22:57 ` [57/89] hwmon: (w83781d) " Greg KH
2010-03-30 22:58 ` [58/89] dnotify: ignore FS_EVENT_ON_CHILD Greg KH
2010-03-30 22:58 ` [59/89] inotify: fix coalesce duplicate events into a single event in special case Greg KH
2010-03-30 22:58 ` [60/89] fix LOOKUP_FOLLOW on automount "symlinks" Greg KH
2010-03-30 22:58 ` [61/89] mm: replace various uses of num_physpages by totalram_pages Greg KH
2010-03-30 22:58 ` [62/89] NFS: Fix a bug in nfs_fscache_release_page() Greg KH
2010-03-30 22:58 ` [63/89] cifs: fix length calculation for converted unicode readdir names Greg KH
2010-03-30 22:58 ` [64/89] drm/r128: Add test for initialisation to all ioctls that require it Greg KH
2010-03-30 22:58 ` [65/89] ALSA: hda-intel: Avoid divide by zero crash Greg KH
2010-03-30 22:58 ` [66/89] b43: Fix throughput regression Greg KH
2010-03-30 22:58 ` [67/89] class: Free the class private data in class_release Greg KH
2010-03-30 22:58 ` [68/89] serial: 8250: add serial transmitter fully empty test Greg KH
2010-03-30 22:58 ` [69/89] ACPI: Be in TS_POLLING state during mwait based C-state entry Greg KH
2010-03-30 22:58 ` [70/89] airo: fix setting zero length WEP key Greg KH
2010-03-30 22:58 ` [71/89] [SCSI] mpt2sas: Delete volume before HBA detach Greg KH
2010-03-30 22:58 ` [72/89] V4L/DVB: Video : pwc : Fix regression in pwc_set_shutter_speed caused by bad constant => sizeof conversion Greg KH
2010-03-30 22:58 ` [73/89] x86: Fix SCI on IOAPIC != 0 Greg KH
2010-03-30 22:58 ` [74/89] x86, ia32_aout: do not kill argument mapping Greg KH
2010-03-30 22:58 ` [75/89] Split flush_old_exec into two functions Greg KH
2010-03-30 22:58 ` [76/89] sparc: TIF_ABI_PENDING bit removal Greg KH
2010-03-31 12:32 ` Stefan Bader
2010-03-30 22:58 ` [77/89] x86: get rid of the insane TIF_ABI_PENDING bit Greg KH
2010-03-31 12:33 ` Stefan Bader
2010-03-30 22:58 ` [78/89] [PATCH 4/5] Fix flush_old_exec()/setup_new_exec() split Greg KH
2010-03-30 22:58 ` [79/89] powerpc: TIF_ABI_PENDING bit removal Greg KH
2010-03-30 22:58 ` [80/89] coredump: suppress uid comparison test if core output files are pipes Greg KH
2010-03-30 22:58 ` [81/89] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
2010-03-30 22:58 ` [82/89] tmpfs: fix oops on mounts with mpol=default Greg KH
2010-03-30 22:58 ` [83/89] tmpfs: mpol=bind:0 dont cause mount error Greg KH
2010-03-30 22:58 ` [84/89] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
2010-03-30 22:58 ` [85/89] tmpfs: cleanup mpol_parse_str() Greg KH
2010-03-30 22:58 ` [86/89] doc: add the documentation for mpol=local Greg KH
2010-03-30 22:58 ` [87/89] USB: fix usbfs regression Greg KH
2010-03-30 22:58 ` [88/89] x86: Fix placement of FIX_OHCI1394_BASE Greg KH
2010-03-30 22:58 ` [89/89] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
2010-03-30 23:06 ` [000/116] 2.6.32.11-stable review Greg KH
2010-03-30 22:54 ` [001/116] drm/i915: fix gpio register detection logic for BIOS without VBT Greg KH
2010-03-30 22:54 ` [002/116] drivers/scsi/ses.c: eliminate double free Greg KH
2010-03-30 22:54 ` [003/116] decompress: fix new decompressor for PIC Greg KH
2010-03-30 22:54 ` [004/116] ARM: Fix decompressors kernel size estimation for ROM=y Greg KH
2010-03-30 22:54 ` [005/116] MIPS: Cleanup forgotten label_module_alloc in tlbex.c Greg KH
2010-03-30 22:54 ` [006/116] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt() Greg KH
2010-03-30 22:54 ` [007/116] tg3: Fix 5906 transmit hangs Greg KH
2010-03-31 1:15 ` [Stable-review] " Chuck Ebbert
2010-03-31 20:39 ` Greg KH
2010-03-31 21:23 ` Matt Carlson
2010-03-31 22:17 ` Greg KH
2010-03-30 22:54 ` [008/116] ALSA: hda - Fix input source elements of secondary ADCs on Realtek Greg KH
2010-03-30 22:54 ` [009/116] ALSA: hda: enable MSI for Gateway M-6866 Greg KH
2010-03-30 22:54 ` [010/116] timekeeping: Prevent oops when GENERIC_TIME=n Greg KH
2010-03-30 22:54 ` [011/116] Input: alps - add support for the touchpad on Toshiba Tecra A11-11L Greg KH
2010-03-30 22:54 ` [012/116] Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table Greg KH
2010-03-30 22:54 ` [013/116] i2c-i801: Dont use the block buffer for I2C block writes Greg KH
2010-03-30 22:54 ` [014/116] ath5k: dont use external sleep clock in AP mode Greg KH
2010-03-30 22:54 ` [015/116] ath5k: fix setup for CAB queue Greg KH
2010-03-30 22:54 ` [016/116] ring-buffer: Move disabled check into preempt disable section Greg KH
2010-03-30 22:54 ` [017/116] function-graph: Init curr_ret_stack with ret_stack Greg KH
2010-03-30 22:54 ` [018/116] Bluetooth: Fix sleeping function in RFCOMM within invalid context Greg KH
2010-03-30 22:54 ` [019/116] tracing: Use same local variable when resetting the ring buffer Greg KH
2010-03-30 22:54 ` [020/116] tracing: Disable buffer switching when starting or stopping trace Greg KH
2010-03-30 22:54 ` [021/116] tracing: Do not record user stack trace from NMI context Greg KH
2010-03-30 22:55 ` [022/116] PCI: unconditionally clear AER uncorr status register during cleanup Greg KH
2010-03-30 22:55 ` [023/116] drm/edid: Unify detailed block parsing between base and extension blocks Greg KH
2010-03-30 22:55 ` [024/116] efifb: fix framebuffer handoff Greg KH
2010-03-30 22:55 ` [025/116] coredump: suppress uid comparison test if core output files are pipes Greg KH
2010-03-30 22:55 ` [026/116] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
2010-03-30 22:55 ` [027/116] hrtimer: Tune hrtimer_interrupt hang logic Greg KH
2010-03-30 22:55 ` [028/116] x86, apic: Dont use logical-flat mode when CPU hotplug may exceed 8 CPUs Greg KH
2010-03-30 22:55 ` [029/116] [SCSI] mvsas: add support for Adaptec ASC-1045/1405 SAS/SATA HBA Greg KH
2010-03-30 22:55 ` [030/116] pci: add support for 82576NS serdes to existing SR-IOV quirk Greg KH
2010-03-30 22:55 ` [031/116] sched: Mark boot-cpu active before smp_init() Greg KH
2010-03-30 22:55 ` [032/116] [PATCH] sparc64: Make prom entry spinlock NMI safe Greg KH
2010-03-30 22:55 ` [033/116] sysctl: require CAP_SYS_RAWIO to set mmap_min_addr Greg KH
2010-03-30 22:55 ` [034/116] e1000e: enable new 82567V-3 device Greg KH
2010-03-30 22:55 ` [035/116] ixgbe: add support for 82599 KR device 0x1517 Greg KH
2010-03-30 22:55 ` [036/116] Input: wacom - ensure the device is initialized properly upon resume Greg KH
2010-03-30 22:55 ` [037/116] ath9k: fix lockdep warning when unloading module Greg KH
2010-03-30 22:55 ` [038/116] mqueue: fix mq_open() file descriptor leak on user-space processes Greg KH
2010-03-30 22:55 ` [039/116] virtio: fix out of range array access Greg KH
2010-03-30 22:55 ` [040/116] x86: set_personality_ia32() misses force_personality32 Greg KH
2010-03-30 22:55 ` [041/116] sched: Fix SCHED_MC regression caused by change in sched cpu_power Greg KH
2010-03-30 22:55 ` [042/116] readahead: add blk_run_backing_dev Greg KH
2010-03-30 22:55 ` [043/116] ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212 Greg KH
2010-03-30 22:55 ` [044/116] ALSA: hda - Disable MSI for Nvidia controller Greg KH
2010-03-30 22:55 ` [045/116] ALSA: hda - Fix secondary ADC of ALC260 basic model Greg KH
2010-03-30 22:55 ` [046/116] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki) Greg KH
2010-03-30 22:55 ` [047/116] ALSA: cmipci: work around invalid PCM pointer Greg KH
2010-03-30 22:55 ` [048/116] gigaset: correct clearing of at_state strings on RING Greg KH
2010-03-30 22:55 ` [049/116] gigaset: prune use of tty_buffer_request_room Greg KH
2010-03-30 22:55 ` [050/116] perf: Make the install relative to DESTDIR if specified Greg KH
2010-03-30 22:55 ` [051/116] perf_event: Fix oops triggered by cpu offline/online Greg KH
2010-03-30 22:55 ` [052/116] tmpfs: fix oops on mounts with mpol=default Greg KH
2010-03-30 22:55 ` [053/116] tmpfs: mpol=bind:0 dont cause mount error Greg KH
2010-03-30 22:55 ` [054/116] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
2010-03-30 22:55 ` [055/116] tmpfs: cleanup mpol_parse_str() Greg KH
2010-03-30 22:55 ` [056/116] doc: add the documentation for mpol=local Greg KH
2010-03-30 22:55 ` [057/116] SCSI: scsi_transport_fc: Fix synchronization issue while deleting vport Greg KH
2010-03-30 22:55 ` [058/116] NFSv4: Dont ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode() Greg KH
2010-03-30 22:55 ` [059/116] NFS: Avoid a deadlock in nfs_release_page Greg KH
2010-03-30 22:55 ` [060/116] NFS: Prevent another deadlock in nfs_release_page() Greg KH
2010-03-30 22:55 ` [061/116] tty: Keep the default buffering to sub-page units Greg KH
2010-03-30 22:55 ` [062/116] tty: Take a 256 byte padding into account when buffering below " Greg KH
2010-03-30 22:55 ` [063/116] USB: fix usbfs regression Greg KH
2010-03-30 22:55 ` [064/116] USB: EHCI: fix ITD list order Greg KH
2010-03-30 22:55 ` [065/116] USB: EHCI: adjust ehci_iso_stream for changes in ehci_qh Greg KH
2010-03-30 22:55 ` [066/116] USB: qcserial: add new device ids Greg KH
2010-03-30 22:55 ` [067/116] USB: xHCI: re-initialize cmd_completion Greg KH
2010-03-30 22:55 ` [068/116] USB: serial: ftdi: add CONTEC vendor and product id Greg KH
2010-03-30 22:55 ` [069/116] USB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH Greg KH
2010-03-30 22:55 ` [070/116] USB: option: move hardcoded PID to a macro in usb/serial/option Greg KH
2010-03-30 22:55 ` [071/116] USB: option: add support for a new CMOTECH device to usb/serial/option Greg KH
2010-03-30 22:55 ` [072/116] usb: r8a66597-hcd: fix removed from an attached hub Greg KH
2010-03-30 22:55 ` [073/116] wl1251: fix potential crash Greg KH
2010-03-30 22:55 ` [074/116] jme: Fix VLAN memory leak Greg KH
2010-03-30 22:55 ` [075/116] jme: Protect vlgrp structure by pause RX actions Greg KH
2010-03-30 22:55 ` [076/116] edac, mce: Filter out invalid values Greg KH
2010-03-30 22:55 ` [077/116] iwlwifi: use dma_alloc_coherent Greg KH
2010-03-30 22:55 ` [078/116] iwlwifi: Silence tfds_in_queue message Greg KH
2010-03-30 22:55 ` [079/116] SUNRPC: Fix a potential memory leak in auth_gss Greg KH
2010-03-30 22:55 ` [080/116] sunrpc: handle allocation errors from __rpc_lookup_create() Greg KH
2010-03-30 22:55 ` [081/116] if_tunnel.h: add missing ams/byteorder.h include Greg KH
2010-03-30 22:56 ` [082/116] fs/partitions/msdos: add support for large disks Greg KH
2010-03-30 22:56 ` [083/116] fs/partition/msdos: fix unusable extended partition for > 512B sector Greg KH
2010-03-30 22:56 ` [084/116] PCI: fix return value from pcix_get_max_mmrbc() Greg KH
2010-03-30 22:56 ` [085/116] PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions Greg KH
2010-03-30 22:56 ` [086/116] PCI: cleanup error return for " Greg KH
2010-03-30 22:56 ` [087/116] PCI quirk: RS780/RS880: work around missing MSI initialization Greg KH
2010-03-31 0:13 ` Linus Torvalds
2010-03-31 21:12 ` Greg KH
2010-03-30 22:56 ` [088/116] rt2860sta: Fix argument to linux_pci_unmap_single() Greg KH
2010-03-30 22:56 ` [089/116] ath9k: fix BUG_ON triggered by PAE frames Greg KH
2010-03-30 22:56 ` [090/116] cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node Greg KH
2010-03-30 22:56 ` [091/116] softlockup: Stop spurious softlockup messages due to overflow Greg KH
2010-03-30 22:56 ` [092/116] drm/i915: Avoid NULL deref in get_pages() unwind after error Greg KH
2010-03-30 22:56 ` [093/116] netfilter: xt_recent: fix regression in rules using a zero hit_count Greg KH
2010-03-30 22:56 ` [094/116] x86: Fix placement of FIX_OHCI1394_BASE Greg KH
2010-03-30 22:56 ` [095/116] x86, amd: Restrict usage of c1e_idle() Greg KH
2010-03-30 22:56 ` [096/116] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
2010-03-30 22:56 ` [097/116] ALSA: hda: Use LPIB for ga-ma770-ud3 board Greg KH
2010-03-30 22:56 ` [098/116] ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist Greg KH
2010-03-30 22:56 ` [099/116] ALSA: ac97: Add IBM ThinkPad R40e to Headphone/Line Jack Sense blacklist Greg KH
2010-03-30 22:56 ` [100/116] ALSA: hda: Use ALC260_WILL quirk for another Acer model (0x1025007f) Greg KH
2010-03-30 22:56 ` [101/116] ath9k: Enable TIM timer interrupt only when needed Greg KH
2010-03-30 22:56 ` [102/116] mac80211: Retry null data frame for power save Greg KH
2010-03-30 22:56 ` [103/116] ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k Greg KH
2010-03-30 22:56 ` [104/116] mac80211: Reset dynamic ps timer in Rx path Greg KH
2010-03-30 22:56 ` [105/116] leds-gpio: fix default state handling on OF platforms Greg KH
2010-03-30 22:56 ` [106/116] quota: manage reserved space when quota is not active [v2] Greg KH
2010-03-30 22:56 ` [107/116] quota: Fix warning when a delayed write happens before quota is enabled Greg KH
2010-03-30 22:56 ` [108/116] ahci: use BIOS date in broken_suspend list Greg KH
2010-03-30 22:56 ` [109/116] Bluetooth: Fix potential bad memory access with sysfs files Greg KH
2010-03-30 22:56 ` [110/116] Bluetooth: Fix kernel crash on L2CAP stress tests Greg KH
2010-03-30 22:56 ` [111/116] [PATCH] sh: Fix zImage boot using fixed PMB Greg KH
2010-03-30 22:56 ` [112/116] b43: Workaround circular locking in hw-tkip key update callback Greg KH
2010-03-30 22:56 ` [113/116] block: Backport of various I/O topology fixes from 2.6.33 and 2.6.34 Greg KH
2010-03-30 22:56 ` [114/116] s3cmci: initialize default platform data no_wprotect and no_detect with 1 Greg KH
2010-03-30 22:56 ` [115/116] x86: Fix sched_clock_cpu for systems with unsynchronized TSC Greg KH
2010-03-30 22:56 ` [116/116] GFS2: Skip check for mandatory locks when unlocking Greg KH
2010-03-30 23:06 ` [000/156] 2.6.33.2-stable review Greg KH
2010-03-30 22:40 ` [001/156] drivers/scsi/ses.c: eliminate double free Greg KH
2010-03-30 22:40 ` [002/156] decompress: fix new decompressor for PIC Greg KH
2010-03-30 22:40 ` [003/156] ARM: Fix decompressors kernel size estimation for ROM=y Greg KH
2010-03-30 22:40 ` [004/156] mac80211: Fix HT rate control configuration Greg KH
2010-03-30 22:40 ` [005/156] tg3: Fix tg3_poll_controller() passing wrong pointer to tg3_interrupt() Greg KH
2010-03-30 22:40 ` [006/156] ALSA: hda - Sound MSI fallout on a Asus mobo NVIDIA MCP55 Greg KH
2010-03-30 22:40 ` [007/156] ALSA: hda - Fix input source elements of secondary ADCs on Realtek Greg KH
2010-03-30 22:40 ` [008/156] timekeeping: Prevent oops when GENERIC_TIME=n Greg KH
2010-03-30 22:40 ` [009/156] Input: alps - add support for the touchpad on Toshiba Tecra A11-11L Greg KH
2010-03-30 22:40 ` [010/156] Input: i8042 - add ALDI/MEDION netbook E1222 to qurik reset table Greg KH
2010-03-30 22:40 ` [011/156] i2c-powermac: Be less verbose in the absence of real errors Greg KH
2010-03-30 22:40 ` [012/156] i2c-i801: Dont use the block buffer for I2C block writes Greg KH
2010-03-30 22:40 ` [013/156] ath5k: fix I/Q calibration (for real) Greg KH
2010-03-30 22:40 ` [014/156] ath5k: dont use external sleep clock in AP mode Greg KH
2010-03-30 22:40 ` [015/156] ath5k: fix setup for CAB queue Greg KH
2010-03-30 22:40 ` [016/156] ring-buffer: Move disabled check into preempt disable section Greg KH
2010-03-30 22:40 ` [017/156] x86_64, cpa: Dont work hard in preserving kernel 2M mappings when using 4K already Greg KH
2010-03-30 22:40 ` [018/156] x86/stacktrace: Dont dereference bad frame pointers Greg KH
2010-03-30 22:40 ` [019/156] hw-breakpoints: Remove stub unthrottle callback Greg KH
2010-03-30 22:40 ` [020/156] function-graph: Init curr_ret_stack with ret_stack Greg KH
2010-03-30 22:40 ` [021/156] tracing: Fix warning in s_next of trace file ops Greg KH
2010-03-30 22:40 ` [022/156] tracing: Use same local variable when resetting the ring buffer Greg KH
2010-03-30 22:40 ` [023/156] tracing: Disable buffer switching when starting or stopping trace Greg KH
2010-03-30 22:40 ` [024/156] tracing: Do not record user stack trace from NMI context Greg KH
2010-03-30 22:40 ` [025/156] coredump: suppress uid comparison test if core output files are pipes Greg KH
2010-03-30 22:41 ` [026/156] V4L/DVB (13961): em28xx-dvb: fix memleak in dvb_fini() Greg KH
2010-03-30 22:41 ` [027/156] KVM: x86: Add KVM_CAP_X86_ROBUST_SINGLESTEP Greg KH
2010-03-30 22:41 ` [028/156] pci: add support for 82576NS serdes to existing SR-IOV quirk Greg KH
2010-03-30 22:41 ` [029/156] sparc64: Make prom entry spinlock NMI safe Greg KH
2010-03-30 22:41 ` [030/156] sh: Fix zImage boot using fixed PMB Greg KH
2010-03-30 22:41 ` [031/156] ath9k: fix lockdep warning when unloading module Greg KH
2010-03-30 22:41 ` [032/156] ath9k: add support for 802.11n bonded out AR2427 Greg KH
2010-03-30 22:41 ` [033/156] mqueue: fix mq_open() file descriptor leak on user-space processes Greg KH
2010-03-30 22:41 ` [034/156] virtio: fix out of range array access Greg KH
2010-03-30 22:41 ` [035/156] iwlwifi: use dma_alloc_coherent Greg KH
2010-03-30 22:41 ` [036/156] can: fix bfin_can build error after alloc_candev() change Greg KH
2010-03-30 22:41 ` [037/156] perf annotate: Defer allocating sym_priv->hist array Greg KH
2010-03-30 22:41 ` [038/156] sched: Fix SCHED_MC regression caused by change in sched cpu_power Greg KH
2010-03-30 22:41 ` [039/156] ALSA: hda: Use LPIB and 6stack-dig for eMachines T5212 Greg KH
2010-03-30 22:41 ` [040/156] ALSA: hda - Disable MSI for Nvidia controller Greg KH
2010-03-30 22:41 ` [041/156] ALSA: hda - Fix secondary ADC of ALC260 basic model Greg KH
2010-03-30 22:41 ` [042/156] ALSA: hda: Fix 0 dB offset for HP laptops using CX20551 (Waikiki) Greg KH
2010-03-30 22:41 ` [043/156] ALSA: cmipci: work around invalid PCM pointer Greg KH
2010-03-30 22:41 ` [044/156] gigaset: correct clearing of at_state strings on RING Greg KH
2010-03-30 22:41 ` [045/156] gigaset: prune use of tty_buffer_request_room Greg KH
2010-03-30 22:41 ` [046/156] gigaset: avoid registering CAPI driver more than once Greg KH
2010-03-30 22:41 ` [047/156] gigaset: fix build failure Greg KH
2010-03-30 22:41 ` [048/156] gigaset: correct range checking off by one error Greg KH
2010-03-30 22:41 ` [049/156] perf: Provide generic perf_sample_data initialization Greg KH
2010-03-30 22:41 ` [050/156] perf: Make the install relative to DESTDIR if specified Greg KH
2010-03-30 22:41 ` [051/156] perf_event: Fix oops triggered by cpu offline/online Greg KH
2010-03-30 22:41 ` [052/156] perf probe: Fix probe_point buffer overrun Greg KH
2010-03-30 22:41 ` [053/156] tmpfs: fix oops on mounts with mpol=default Greg KH
2010-03-30 22:41 ` [054/156] tmpfs: mpol=bind:0 dont cause mount error Greg KH
2010-03-30 22:41 ` [055/156] tmpfs: handle MPOL_LOCAL mount option properly Greg KH
2010-03-30 22:41 ` [056/156] tmpfs: cleanup mpol_parse_str() Greg KH
2010-03-30 22:41 ` [057/156] doc: add the documentation for mpol=local Greg KH
2010-03-30 22:41 ` [058/156] SCSI: scsi_transport_fc: Fix synchronization issue while deleting vport Greg KH
2010-03-30 22:41 ` [059/156] NFSv4: Dont ignore the NFS_INO_REVAL_FORCED flag in nfs_revalidate_inode() Greg KH
2010-03-30 22:41 ` [060/156] NFS: Avoid a deadlock in nfs_release_page Greg KH
2010-03-30 22:41 ` [061/156] NFS: Prevent another deadlock in nfs_release_page() Greg KH
2010-03-30 22:41 ` [062/156] Revert "sunrpc: fix peername failed on closed listener" Greg KH
2010-03-30 22:41 ` [063/156] Revert "sunrpc: move the close processing after do recvfrom method" Greg KH
2010-03-30 22:41 ` [064/156] nfsd: ensure sockets are closed on error Greg KH
2010-03-30 22:41 ` [065/156] tty: Keep the default buffering to sub-page units Greg KH
2010-03-30 22:41 ` [066/156] tty: Take a 256 byte padding into account when buffering below " Greg KH
2010-03-30 22:41 ` [067/156] USB: fix usbfs regression Greg KH
2010-03-30 22:41 ` [068/156] USB: EHCI: fix ITD list order Greg KH
2010-03-30 22:41 ` [069/156] USB: EHCI: adjust ehci_iso_stream for changes in ehci_qh Greg KH
2010-03-30 22:41 ` [070/156] USB: qcserial: add new device ids Greg KH
2010-03-30 22:41 ` [071/156] USB: xHCI: re-initialize cmd_completion Greg KH
2010-03-30 22:41 ` [072/156] USB: serial: ftdi: add CONTEC vendor and product id Greg KH
2010-03-30 22:41 ` [073/156] USB: option: fix incorrect manufacturer name in usb/serial/option: MAXON->CMOTECH Greg KH
2010-03-30 22:41 ` [074/156] USB: option: move hardcoded PID to a macro in usb/serial/option Greg KH
2010-03-30 22:41 ` [075/156] USB: option: add support for a new CMOTECH device to usb/serial/option Greg KH
2010-03-30 22:41 ` [076/156] usb: r8a66597-hcd: fix removed from an attached hub Greg KH
2010-03-30 22:41 ` [077/156] wl1251: fix potential crash Greg KH
2010-03-30 22:41 ` [078/156] jme: Fix VLAN memory leak Greg KH
2010-03-30 22:41 ` [079/156] jme: Protect vlgrp structure by pause RX actions Greg KH
2010-03-30 22:41 ` [080/156] edac, mce: Filter out invalid values Greg KH
2010-03-30 22:41 ` [081/156] iwlwifi: Silence tfds_in_queue message Greg KH
2010-03-30 22:41 ` [082/156] SUNRPC: Fix a potential memory leak in auth_gss Greg KH
2010-03-30 22:41 ` [083/156] sunrpc: handle allocation errors from __rpc_lookup_create() Greg KH
2010-03-30 22:41 ` [084/156] kfifo: fix KFIFO_INIT in include/linux/kfifo.h Greg KH
2010-03-30 22:41 ` [085/156] if_tunnel.h: add missing ams/byteorder.h include Greg KH
2010-03-30 22:42 ` [086/156] fs/partitions/msdos: add support for large disks Greg KH
2010-03-30 22:42 ` [087/156] fs/partition/msdos: fix unusable extended partition for > 512B sector Greg KH
2010-03-30 22:42 ` [088/156] PCI: fix return value from pcix_get_max_mmrbc() Greg KH
2010-03-30 22:42 ` [089/156] PCI: fix access of PCI_X_CMD by pcix get and set mmrbc functions Greg KH
2010-03-30 22:42 ` [090/156] PCI: cleanup error return for " Greg KH
2010-03-30 22:42 ` [091/156] PCI quirk: RS780/RS880: work around missing MSI initialization Greg KH
2010-03-31 20:40 ` Rafael J. Wysocki
2010-03-31 21:11 ` Greg KH
2010-03-30 22:42 ` [092/156] ath9k: fix BUG_ON triggered by PAE frames Greg KH
2010-03-30 22:42 ` [093/156] cpuset: fix the problem that cpuset_mem_spread_node() returns an offline node Greg KH
2010-03-30 22:42 ` [094/156] nilfs2: fix hang-up of cleaner after log writer returned with error Greg KH
2010-03-30 22:42 ` [095/156] genirq: Prevent oneshot irq thread race Greg KH
2010-03-30 22:42 ` [096/156] softlockup: Stop spurious softlockup messages due to overflow Greg KH
2010-03-30 22:42 ` [097/156] drm/i915: fix small leak on overlay error path Greg KH
2010-03-30 22:42 ` [098/156] drm/i915: Avoid NULL deref in get_pages() unwind after error Greg KH
2010-03-30 22:42 ` [099/156] drm/nouveau: report unknown connector state if lid closed Greg KH
2010-03-30 22:42 ` [100/156] netfilter: xt_recent: fix regression in rules using a zero hit_count Greg KH
2010-03-30 22:42 ` [101/156] x86: Fix placement of FIX_OHCI1394_BASE Greg KH
2010-03-30 22:42 ` [102/156] x86, amd: Restrict usage of c1e_idle() Greg KH
2010-03-30 22:42 ` [103/156] hwmon: (coretemp) Add missing newline to dev_warn() message Greg KH
2010-03-30 22:42 ` [104/156] ALSA: hda: Use LPIB for ga-ma770-ud3 board Greg KH
2010-03-30 22:42 ` [105/156] ALSA: ac97: Add Toshiba P500 to ac97 jack sense blacklist Greg KH
2010-03-30 22:42 ` [106/156] ALSA: ac97: Add IBM ThinkPad R40e to Headphone/Line Jack Sense blacklist Greg KH
2010-03-30 22:42 ` [107/156] ath9k: Enable TIM timer interrupt only when needed Greg KH
2010-03-30 22:42 ` [108/156] ath9k: configure the beacon only if the STA is associated Greg KH
2010-03-30 22:42 ` [109/156] mac80211: Retry null data frame for power save Greg KH
2010-03-30 22:42 ` [110/156] ath9k: Enable IEEE80211_HW_REPORTS_TX_ACK_STATUS flag for ath9k Greg KH
2010-03-30 22:42 ` [111/156] leds-gpio: fix default state handling on OF platforms Greg KH
2010-03-30 22:42 ` [112/156] icside: bring back ->maskproc method Greg KH
2010-03-30 22:42 ` [113/156] Revert "ide: skip probe if there are no devices on the port (v2)" Greg KH
2010-03-30 22:42 ` [114/156] ide: Fix Promise UDMA33 IDE driver (pdc202xx_old) Greg KH
2010-03-30 22:42 ` [115/156] qlogicpti: Remove slash in QlogicPTI irq name Greg KH
2010-03-30 22:42 ` [116/156] sparc64: Properly truncate pt_regs framepointer in perf callback Greg KH
2010-03-30 22:42 ` [117/156] sparc64: Add very basic XVR-1000 framebuffer driver Greg KH
2010-03-30 22:42 ` [118/156] l2tp: Fix oops in pppol2tp_xmit Greg KH
2010-03-30 22:42 ` [119/156] l2tp: Fix UDP socket reference count bugs in the pppol2tp driver Greg KH
2010-03-30 22:42 ` [120/156] route: Fix caught BUG_ON during rt_secret_rebuild_oneshot() Greg KH
2010-03-30 22:42 ` [121/156] net: add limit for socket backlog Greg KH
2010-03-30 22:42 ` [122/156] tcp: use limited " Greg KH
2010-03-30 22:42 ` [123/156] udp: " Greg KH
2010-03-30 22:42 ` [124/156] llc: " Greg KH
2010-03-30 22:42 ` [125/156] sctp: " Greg KH
2010-03-30 22:42 ` [126/156] tipc: " Greg KH
2010-03-30 22:42 ` [127/156] x25: " Greg KH
2010-03-30 22:42 ` [128/156] net: backlog functions rename Greg KH
2010-03-30 22:42 ` [129/156] net: add __must_check to sk_add_backlog Greg KH
2010-03-30 22:42 ` [130/156] bonding: fix device leak on error in bond_create() Greg KH
2010-03-30 22:42 ` [131/156] e100: Fix ring parameter change handling regression Greg KH
2010-03-30 22:42 ` [132/156] ip_gre: include route header_len in max_headroom calculation Greg KH
2010-03-30 22:42 ` [133/156] ipsec: Fix bogus bundle flowi Greg KH
2010-03-30 22:42 ` [134/156] ipv4: check rt_genid in dst_check Greg KH
2010-03-30 22:42 ` [135/156] ipv4: Dont drop redirected route cache entry unless PTMU actually expired Greg KH
2010-03-30 22:42 ` [136/156] ipv6: Dont drop cache route entry unless timer " Greg KH
2010-03-30 22:42 ` [137/156] NET_DMA: free skbs periodically Greg KH
2010-03-30 22:42 ` [138/156] netlink: fix NETLINK_RECV_NO_ENOBUFS in netlink_set_err() Greg KH
2010-03-30 22:42 ` [139/156] netfilter: ctnetlink: fix reliable event delivery if message building fails Greg KH
2010-03-30 22:42 ` [140/156] netlink: fix unaligned access in nla_get_be64() Greg KH
2010-03-30 22:42 ` [141/156] r8169: offical fix for CVE-2009-4537 (overlength frame DMAs) Greg KH
2010-03-30 22:42 ` [142/156] net: Potential null skb->dev dereference Greg KH
2010-03-30 22:42 ` [143/156] skbuff: remove unused dma_head & dma_maps fields Greg KH
2010-03-30 22:42 ` [144/156] tcp: Fix tcp_mark_head_lost() with packets == 0 Greg KH
2010-03-30 22:42 ` [145/156] tcp: Fix OOB POLLIN avoidance Greg KH
2010-03-30 22:43 ` [146/156] tcp: Fix tcp_make_synack() Greg KH
2010-03-30 22:43 ` [147/156] quota: manage reserved space when quota is not active [v2] Greg KH
2010-03-30 22:43 ` [148/156] quota: Fix warning when a delayed write happens before quota is enabled Greg KH
2010-03-30 22:43 ` [149/156] ahci: use BIOS date in broken_suspend list Greg KH
2010-03-30 22:43 ` [150/156] Bluetooth: Fix potential bad memory access with sysfs files Greg KH
2010-03-30 22:43 ` [151/156] Bluetooth: Fix kernel crash on L2CAP stress tests Greg KH
2010-03-30 22:43 ` [152/156] b43: Workaround circular locking in hw-tkip key update callback Greg KH
2010-03-30 22:43 ` [153/156] x86: Fix sched_clock_cpu for systems with unsynchronized TSC Greg KH
2010-03-30 22:43 ` [154/156] classmate-laptop: use a single MODULE_DEVICE_TABLE to get correct aliases Greg KH
2010-03-30 22:43 ` [155/156] GFS2: Skip check for mandatory locks when unlocking Greg KH
2010-03-30 22:43 ` [156/156] pata_via: fix VT6410/6415/6330 detection issue Greg KH
2010-03-31 4:44 ` 4 stable kernel review cycles starting Dave Chinner
2010-03-31 17:38 ` Greg KH
2010-03-31 21:53 ` Dave Chinner
2010-03-31 22:47 ` Greg KH
2010-04-01 4:40 ` [Stable-review] " Willy Tarreau
2010-04-01 7:26 ` David Miller
2010-04-01 11:23 ` Stefan Richter
2010-04-01 15:35 ` Greg KH
2010-04-01 20:01 ` [PATCH] Documentation: -stable rules: upstream commit ID requirement reworded Stefan Richter
2010-04-02 16:11 ` Randy Dunlap
2010-04-01 15:35 ` [Stable-review] 4 stable kernel review cycles starting Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox