[ARM] pxa: don't rely on r2 being preserved over a function call

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3b1904d00a54d4d839a4c12dbc98a14dc4efdc95
Commit: 3b1904d00a54d4d839a4c12dbc98a14dc4efdc95
Parent: a7da60f41551abb3c520b03d42ec05dd7decfc7f
Author: Russell King [EMAIL PROTECTED]
AuthorDate: Fri Jan 11 12:23:58 2008 +
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Jan 20 10:09:59 2008 +

[ARM] pxa: don't rely on r2 being preserved over a function call

r2 is not guaranteed to be preserved over a function call, so relying
on it to store the link register over the call to sleep_phys_sp() is
unreliable.  Store the link register on the stack instead.

Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/mach-pxa/sleep.S |6 ++
 1 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S
index aff71fe..d044772 100644
--- a/arch/arm/mach-pxa/sleep.S
+++ b/arch/arm/mach-pxa/sleep.S
@@ -43,11 +43,11 @@ pxa_cpu_save_cp:
 pxa_cpu_save_sp:
@ preserve phys address of stack
mov r0, sp
-   mov r2, lr
+   str lr, [sp, #-4]!
bl  sleep_phys_sp
ldr r1, =sleep_save_sp
str r0, [r1]
-   mov pc, r2
+   ldr pc, [sp], #4
 
 /*
  * pxa27x_cpu_suspend()
@@ -270,5 +270,3 @@ resume_after_mmu:
mar acc0, r2, r3
 #endif
ldmfd   sp!, {r4 - r12, pc} @ return to caller
-
-
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ARM] 4748/1: dca: source drivers/dca/Kconfig in arch/arm/Kconfig to fix warning

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=abf07b19de3ae2fcf63142f1f9a3e4ee537f9f55
Commit: abf07b19de3ae2fcf63142f1f9a3e4ee537f9f55
Parent: 3b1904d00a54d4d839a4c12dbc98a14dc4efdc95
Author: Dan Williams [EMAIL PROTECTED]
AuthorDate: Fri Jan 18 23:26:10 2008 +0100
Committer:  Russell King [EMAIL PROTECTED]
CommitDate: Sun Jan 20 10:10:41 2008 +

[ARM] 4748/1: dca: source drivers/dca/Kconfig in arch/arm/Kconfig to fix 
warning

'select' used by config symbol 'INTEL_IOATDMA' refers to undefined symbol 
'DCA'

Although drivers/dma is currently the only user future drivers outside of
drivers/dma may select this option so it is better to add this to
arch/arm/Kconfig than move DCA to drivers/dma/Kconfig.

Signed-off-by: Dan Williams [EMAIL PROTECTED]
Signed-off-by: Russell King [EMAIL PROTECTED]
---
 arch/arm/Kconfig |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 3a75a0b..a04f507 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -1072,6 +1072,8 @@ source drivers/rtc/Kconfig
 
 source drivers/dma/Kconfig
 
+source drivers/dca/Kconfig
+
 endmenu
 
 source fs/Kconfig
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ARM: OMAP1: Keymap fix for f-sample and p2-sample

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=496bcb81678ae255171de54e637ba1c19c9ed315
Commit: 496bcb81678ae255171de54e637ba1c19c9ed315
Parent: cbd9c883696da72b2b1f03f909dbacc04bbf8b58
Author: Vivek Kutal [EMAIL PROTECTED]
AuthorDate: Mon Jan 7 12:04:00 2008 -0200
Committer:  Tony Lindgren [EMAIL PROTECTED]
CommitDate: Fri Jan 18 15:52:15 2008 -0800

ARM: OMAP1: Keymap fix for f-sample and p2-sample

Keymap fix for f-sample and p2-sample.

Signed-off-by: Vivek Kutal [EMAIL PROTECTED]
Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
---
 arch/arm/mach-omap1/board-fsample.c  |   14 ++
 arch/arm/mach-omap1/board-perseus2.c |   14 ++
 2 files changed, 12 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap1/board-fsample.c 
b/arch/arm/mach-omap1/board-fsample.c
index f65baa9..d5f6ea1 100644
--- a/arch/arm/mach-omap1/board-fsample.c
+++ b/arch/arm/mach-omap1/board-fsample.c
@@ -40,31 +40,29 @@ static int fsample_keymap[] = {
KEY(0,1,KEY_RIGHT),
KEY(0,2,KEY_LEFT),
KEY(0,3,KEY_DOWN),
-   KEY(0,4,KEY_CENTER),
-   KEY(0,5,KEY_0_5),
-   KEY(1,0,KEY_SOFT2),
+   KEY(0,4,KEY_ENTER),
+   KEY(1,0,KEY_F10),
KEY(1,1,KEY_SEND),
KEY(1,2,KEY_END),
KEY(1,3,KEY_VOLUMEDOWN),
KEY(1,4,KEY_VOLUMEUP),
KEY(1,5,KEY_RECORD),
-   KEY(2,0,KEY_SOFT1),
+   KEY(2,0,KEY_F9),
KEY(2,1,KEY_3),
KEY(2,2,KEY_6),
KEY(2,3,KEY_9),
-   KEY(2,4,KEY_SHARP),
-   KEY(2,5,KEY_2_5),
+   KEY(2,4,KEY_KPDOT),
KEY(3,0,KEY_BACK),
KEY(3,1,KEY_2),
KEY(3,2,KEY_5),
KEY(3,3,KEY_8),
KEY(3,4,KEY_0),
-   KEY(3,5,KEY_HEADSETHOOK),
+   KEY(3,5,KEY_KPSLASH),
KEY(4,0,KEY_HOME),
KEY(4,1,KEY_1),
KEY(4,2,KEY_4),
KEY(4,3,KEY_7),
-   KEY(4,4,KEY_STAR),
+   KEY(4,4,KEY_KPASTERISK),
KEY(4,5,KEY_POWER),
0
 };
diff --git a/arch/arm/mach-omap1/board-perseus2.c 
b/arch/arm/mach-omap1/board-perseus2.c
index 1d5c8d5..e44437e 100644
--- a/arch/arm/mach-omap1/board-perseus2.c
+++ b/arch/arm/mach-omap1/board-perseus2.c
@@ -39,31 +39,29 @@ static int p2_keymap[] = {
KEY(0,1,KEY_RIGHT),
KEY(0,2,KEY_LEFT),
KEY(0,3,KEY_DOWN),
-   KEY(0,4,KEY_CENTER),
-   KEY(0,5,KEY_0_5),
-   KEY(1,0,KEY_SOFT2),
+   KEY(0,4,KEY_ENTER),
+   KEY(1,0,KEY_F10),
KEY(1,1,KEY_SEND),
KEY(1,2,KEY_END),
KEY(1,3,KEY_VOLUMEDOWN),
KEY(1,4,KEY_VOLUMEUP),
KEY(1,5,KEY_RECORD),
-   KEY(2,0,KEY_SOFT1),
+   KEY(2,0,KEY_F9),
KEY(2,1,KEY_3),
KEY(2,2,KEY_6),
KEY(2,3,KEY_9),
-   KEY(2,4,KEY_SHARP),
-   KEY(2,5,KEY_2_5),
+   KEY(2,4,KEY_KPDOT),
KEY(3,0,KEY_BACK),
KEY(3,1,KEY_2),
KEY(3,2,KEY_5),
KEY(3,3,KEY_8),
KEY(3,4,KEY_0),
-   KEY(3,5,KEY_HEADSETHOOK),
+   KEY(3,5,KEY_KPSLASH),
KEY(4,0,KEY_HOME),
KEY(4,1,KEY_1),
KEY(4,2,KEY_4),
KEY(4,3,KEY_7),
-   KEY(4,4,KEY_STAR),
+   KEY(4,4,KEY_KPASTERISK),
KEY(4,5,KEY_POWER),
0
 };
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


ARM: OMAP1: Fix compile for board-nokia770

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f6f2a5db6ddf164923c1f8af27d36c2d7ab994e0
Commit: f6f2a5db6ddf164923c1f8af27d36c2d7ab994e0
Parent: 496bcb81678ae255171de54e637ba1c19c9ed315
Author: Daniel Walker [EMAIL PROTECTED]
AuthorDate: Fri Jan 18 17:55:08 2008 -0800
Committer:  Tony Lindgren [EMAIL PROTECTED]
CommitDate: Fri Jan 18 16:53:17 2008 -0800

ARM: OMAP1: Fix compile for board-nokia770

Fix compile for board-nokia770

Signed-off-by: Daniel Walker [EMAIL PROTECTED]
Signed-off-by: Tony Lindgren [EMAIL PROTECTED]
---
 arch/arm/mach-omap1/board-nokia770.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap1/board-nokia770.c 
b/arch/arm/mach-omap1/board-nokia770.c
index 22db19a..182a98a 100644
--- a/arch/arm/mach-omap1/board-nokia770.c
+++ b/arch/arm/mach-omap1/board-nokia770.c
@@ -36,8 +36,6 @@
 #include asm/arch/omapfb.h
 #include asm/arch/lcd_mipid.h
 
-#include ../plat-omap/dsp/dsp_common.h
-
 #define ADS7846_PENDOWN_GPIO   15
 
 static void __init omap_nokia770_init_irq(void)
@@ -318,6 +316,8 @@ static __init int omap_dsp_init(void)
  out:
return ret;
 }
+#else
+#define omap_dsp_init()do {} while (0)
 #endif /* CONFIG_OMAP_DSP */
 
 static void __init omap_nokia770_init(void)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


timer: fix section mismatch

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=48ccf3dac341118992b70ca89c47728e8b1d300b
Commit: 48ccf3dac341118992b70ca89c47728e8b1d300b
Parent: 0ec160dd48b666ddef39d639323d0da26d0b710d
Author: Randy Dunlap [EMAIL PROTECTED]
AuthorDate: Mon Jan 21 17:18:25 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Jan 21 19:39:41 2008 -0800

timer: fix section mismatch

The caller is __cpuinit.
Also, this code block and its caller are inside #ifdef CONFIG_HOTPLUG_CPU
blocks, so this code should reflect that config symbol's usage.

WARNING: vmlinux.o(.text+0x4252f): Section mismatch: reference to 
.init.text: (between 'timer_cpu_notify' and 'msleep')

Signed-off-by: Randy Dunlap [EMAIL PROTECTED]
Cc: Sam Ravnborg [EMAIL PROTECTED]
Cc: Ingo Molnar [EMAIL PROTECTED]
Cc: Thomas Gleixner [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]@linux-foundation.org
---
 kernel/timer.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/timer.c b/kernel/timer.c
index 26671f4..2a00c22 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -1289,7 +1289,7 @@ static void migrate_timer_list(tvec_base_t *new_base, 
struct list_head *head)
}
 }
 
-static void __devinit migrate_timers(int cpu)
+static void __cpuinit migrate_timers(int cpu)
 {
tvec_base_t *old_base;
tvec_base_t *new_base;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


CRIS: add missed local_irq_restore call

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a56d00bbea018cfa6dc62f76db52760872efa1a7
Commit: a56d00bbea018cfa6dc62f76db52760872efa1a7
Parent: 48ccf3dac341118992b70ca89c47728e8b1d300b
Author: Cyrill Gorcunov [EMAIL PROTECTED]
AuthorDate: Mon Jan 21 17:18:26 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Jan 21 19:39:41 2008 -0800

CRIS: add missed local_irq_restore call

Signed-off-by: Cyrill Gorcunov [EMAIL PROTECTED]
Acked-by: Jesper Nilsson [EMAIL PROTECTED]
Cc: Mikael Starvik [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]@linux-foundation.org
---
 arch/cris/arch-v10/kernel/io_interface_mux.c |1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/arch/cris/arch-v10/kernel/io_interface_mux.c 
b/arch/cris/arch-v10/kernel/io_interface_mux.c
index 3a9114e..f3b327d 100644
--- a/arch/cris/arch-v10/kernel/io_interface_mux.c
+++ b/arch/cris/arch-v10/kernel/io_interface_mux.c
@@ -392,6 +392,7 @@ int cris_request_io_interface(enum cris_io_interface ioif, 
const char *device_id
if (((interfaces[ioif].gpio_g_in  gpio_in_pins) != 
interfaces[ioif].gpio_g_in) ||
((interfaces[ioif].gpio_g_out  gpio_out_pins) != 
interfaces[ioif].gpio_g_out) ||
((interfaces[ioif].gpio_b  gpio_pb_pins) != 
interfaces[ioif].gpio_b)) {
+   local_irq_restore(flags);
printk(KERN_CRIT cris_request_io_interface: Could not get 
required pins for interface %u\n,
   ioif);
return -EBUSY;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


s3c2410_fb: fix line length calculation

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a10336043b8193ec603ad54bb79cdcd26bbf94b3
Commit: a10336043b8193ec603ad54bb79cdcd26bbf94b3
Parent: a56d00bbea018cfa6dc62f76db52760872efa1a7
Author: Stefan Schmidt [EMAIL PROTECTED]
AuthorDate: Mon Jan 21 17:18:27 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Jan 21 19:39:41 2008 -0800

s3c2410_fb: fix line length calculation

Fix line length calculation. var-width is the size of the display in mm. We
like to use the pixel size.

Without this fix, dynamic (fbset) based resolution and depths changes with
s3c2410_fb don't work at all.

Spotted by john cass [EMAIL PROTECTED]

Signed-off-by: Stefan Schmidt [EMAIL PROTECTED]
Signed-off-by: Harald Welte [EMAIL PROTECTED]
Acked-by: Ben Dooks [EMAIL PROTECTED]
Acked-by: Arnaud Patard [EMAIL PROTECTED]
Acked-by: Krzysztof Helt [EMAIL PROTECTED]
Cc: Antonino A. Daplas [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]@linux-foundation.org
---
 drivers/video/s3c2410fb.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/s3c2410fb.c b/drivers/video/s3c2410fb.c
index ad35033..b3c31d9 100644
--- a/drivers/video/s3c2410fb.c
+++ b/drivers/video/s3c2410fb.c
@@ -488,7 +488,7 @@ static int s3c2410fb_set_par(struct fb_info *info)
break;
}
 
-   info-fix.line_length = (var-width * var-bits_per_pixel) / 8;
+   info-fix.line_length = (var-xres_virtual * var-bits_per_pixel) / 8;
 
/* activate this new configuration */
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fix filesystem capability support

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a6dbb1ef2fc8d73578eacd02ac701f4233175c9f
Commit: a6dbb1ef2fc8d73578eacd02ac701f4233175c9f
Parent: a10336043b8193ec603ad54bb79cdcd26bbf94b3
Author: Andrew G. Morgan [EMAIL PROTECTED]
AuthorDate: Mon Jan 21 17:18:30 2008 -0800
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Jan 21 19:39:41 2008 -0800

Fix filesystem capability support

In linux-2.6.24-rc1, security/commoncap.c:cap_inh_is_capped() was
introduced. It has the exact reverse of its intended behavior. This
led to an unintended privilege esculation involving a process'
inheritable capability set.

To be exposed to this bug, you need to have Filesystem Capabilities
enabled and in use. That is:

- CONFIG_SECURITY_FILE_CAPABILITIES must be defined for the buggy code
  to be compiled in.

- You also need to have files on your system marked with fI bits raised.

Signed-off-by: Andrew G. Morgan [EMAIL PROTECTED]

Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]@linux-foundation.org
---
 security/commoncap.c |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/security/commoncap.c b/security/commoncap.c
index 5bc1895..ea61bc7 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -59,6 +59,12 @@ int cap_netlink_recv(struct sk_buff *skb, int cap)
 
 EXPORT_SYMBOL(cap_netlink_recv);
 
+/*
+ * NOTE WELL: cap_capable() cannot be used like the kernel's capable()
+ * function.  That is, it has the reverse semantics: cap_capable()
+ * returns 0 when a task has a capability, but the kernel's capable()
+ * returns 1 for this case.
+ */
 int cap_capable (struct task_struct *tsk, int cap)
 {
/* Derived from include/linux/sched.h:capable. */
@@ -107,10 +113,11 @@ static inline int cap_block_setpcap(struct task_struct 
*target)
 static inline int cap_inh_is_capped(void)
 {
/*
-* return 1 if changes to the inheritable set are limited
-* to the old permitted set.
+* Return 1 if changes to the inheritable set are limited
+* to the old permitted set. That is, if the current task
+* does *not* possess the CAP_SETPCAP capability.
 */
-   return !cap_capable(current, CAP_SETPCAP);
+   return (cap_capable(current, CAP_SETPCAP) != 0);
 }
 
 #else /* ie., ndef CONFIG_SECURITY_FILE_CAPABILITIES */
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] SMTC: Fix build error.

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c2a04c4f0e1b09b58d7279e2facd306c40583ec1
Commit: c2a04c4f0e1b09b58d7279e2facd306c40583ec1
Parent: a7da60f41551abb3c520b03d42ec05dd7decfc7f
Author: Frank Rowand [EMAIL PROTECTED]
AuthorDate: Tue Jan 15 14:26:44 2008 -0800
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jan 22 00:35:23 2008 +

[MIPS] SMTC: Fix build error.

Fix compile warning (which becomes compile error due to -Werror).  Type of
argument flags for spin_lock_irqsave() was incorrect in some functions.

Signed-off-by: Frank Rowand [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 include/asm-mips/smtc_ipi.h |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/include/asm-mips/smtc_ipi.h b/include/asm-mips/smtc_ipi.h
index e09131a..8ce5175 100644
--- a/include/asm-mips/smtc_ipi.h
+++ b/include/asm-mips/smtc_ipi.h
@@ -49,7 +49,7 @@ struct smtc_ipi_q {
 
 static inline void smtc_ipi_nq(struct smtc_ipi_q *q, struct smtc_ipi *p)
 {
-   long flags;
+   unsigned long flags;
 
spin_lock_irqsave(q-lock, flags);
if (q-head == NULL)
@@ -98,7 +98,7 @@ static inline struct smtc_ipi *smtc_ipi_dq(struct smtc_ipi_q 
*q)
 
 static inline void smtc_ipi_req(struct smtc_ipi_q *q, struct smtc_ipi *p)
 {
-   long flags;
+   unsigned long flags;
 
spin_lock_irqsave(q-lock, flags);
if (q-head == NULL) {
@@ -114,7 +114,7 @@ static inline void smtc_ipi_req(struct smtc_ipi_q *q, 
struct smtc_ipi *p)
 
 static inline int smtc_ipi_qdepth(struct smtc_ipi_q *q)
 {
-   long flags;
+   unsigned long flags;
int retval;
 
spin_lock_irqsave(q-lock, flags);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[MIPS] Malta: Fix reading the PCI clock frequency on big-endian

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0487de91427925e7c43debeb948bdf53b10ef32c
Commit: 0487de91427925e7c43debeb948bdf53b10ef32c
Parent: c2a04c4f0e1b09b58d7279e2facd306c40583ec1
Author: Dmitri Vorobiev [EMAIL PROTECTED]
AuthorDate: Tue Jan 15 00:27:46 2008 +0300
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jan 22 00:35:23 2008 +

[MIPS] Malta: Fix reading the PCI clock frequency on big-endian

The JMPRS register on Malta boards keeps a 32-bit CPU-endian
value. The readw() function assumes that the value it reads is a
little-endian 16-bit number. Therefore, using readw() to obtain
the value of the JMPRS register is a mistake. This error leads
to incorrect reading of the PCI clock frequency on big-endian
during board start-up.

Change readw() to __raw_readl().

This was tested by injecting a call to printk() and verifying
that the value of the jmpr variable was consistent with current
setting of the JP4 PCI CLK jumper.

Signed-off-by: Dmitri Vorobiev [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/mips-boards/malta/malta_setup.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/mips-boards/malta/malta_setup.c 
b/arch/mips/mips-boards/malta/malta_setup.c
index 9a2636e..bc43a5c 100644
--- a/arch/mips/mips-boards/malta/malta_setup.c
+++ b/arch/mips/mips-boards/malta/malta_setup.c
@@ -149,7 +149,7 @@ void __init plat_mem_setup(void)
/* Check PCI clock */
{
unsigned int __iomem *jmpr_p = (unsigned int *) 
ioremap(MALTA_JMPRS_REG, sizeof(unsigned int));
-   int jmpr = (readw(jmpr_p)  2)  0x07;
+   int jmpr = (__raw_readl(jmpr_p)  2)  0x07;
static const int pciclocks[] __initdata = {
33, 20, 25, 30, 12, 16, 37, 10
};
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


tc35815: Use irq number for tc35815-mac platform device id

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=06675e6f4fb00a63575f4b85da305c3ab19e6e5d
Commit: 06675e6f4fb00a63575f4b85da305c3ab19e6e5d
Parent: 0487de91427925e7c43debeb948bdf53b10ef32c
Author: Atsushi Nemoto [EMAIL PROTECTED]
AuthorDate: Sat Jan 19 01:15:52 2008 +0900
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Jan 22 00:35:23 2008 +

tc35815: Use irq number for tc35815-mac platform device id

The tc35815-mac platform device used a pci bus number and a devfn to
identify its target device, but the pci bus number may vary if some
bus-bridges are found.  Use irq number which is be unique for embedded
controllers.

Signed-off-by: Atsushi Nemoto [EMAIL PROTECTED]
Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/tx4938/toshiba_rbtx4938/setup.c |4 ++--
 drivers/net/tc35815.c |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/mips/tx4938/toshiba_rbtx4938/setup.c 
b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
index 4a81523..632e5d2 100644
--- a/arch/mips/tx4938/toshiba_rbtx4938/setup.c
+++ b/arch/mips/tx4938/toshiba_rbtx4938/setup.c
@@ -598,8 +598,8 @@ static int __init rbtx4938_ethaddr_init(void)
printk(KERN_WARNING seeprom: bad checksum.\n);
}
for (i = 0; i  2; i++) {
-   unsigned int slot = TX4938_PCIC_IDSEL_AD_TO_SLOT(31 - i);
-   unsigned int id = (1  8) | PCI_DEVFN(slot, 0); /* bus 1 */
+   unsigned int id =
+   TXX9_IRQ_BASE + (i ? TX4938_IR_ETH1 : TX4938_IR_ETH0);
struct platform_device *pdev;
if (!(tx4938_ccfgptr-pcfg 
  (i ? TX4938_PCFG_ETH1_SEL : TX4938_PCFG_ETH0_SEL)))
diff --git a/drivers/net/tc35815.c b/drivers/net/tc35815.c
index d887c05..370d329 100644
--- a/drivers/net/tc35815.c
+++ b/drivers/net/tc35815.c
@@ -611,7 +611,7 @@ static int __devinit tc35815_mac_match(struct device *dev, 
void *data)
 {
struct platform_device *plat_dev = to_platform_device(dev);
struct pci_dev *pci_dev = data;
-   unsigned int id = (pci_dev-bus-number  8) | pci_dev-devfn;
+   unsigned int id = pci_dev-irq;
return !strcmp(plat_dev-name, tc35815-mac)  plat_dev-id == id;
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


rfkill: call rfkill_led_trigger_unregister() on error

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=632041f306707df94110441f55b1458ebeb096db
Commit: 632041f306707df94110441f55b1458ebeb096db
Parent: a7da60f41551abb3c520b03d42ec05dd7decfc7f
Author: Eric Paris [EMAIL PROTECTED]
AuthorDate: Sun Jan 13 16:20:56 2008 -0500
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:36 2008 -0800

rfkill: call rfkill_led_trigger_unregister() on error

Code inspection turned up that error cases in rfkill_register() do not
call rfkill_led_trigger_unregister() even though we have already
registered.

Signed-off-by: Eric Paris [EMAIL PROTECTED]
Signed-off-by: John W. Linville [EMAIL PROTECTED]
---
 net/rfkill/rfkill.c |5 -
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c
index 4469a7b..d06d338 100644
--- a/net/rfkill/rfkill.c
+++ b/net/rfkill/rfkill.c
@@ -392,11 +392,14 @@ int rfkill_register(struct rfkill *rfkill)
rfkill_led_trigger_register(rfkill);
 
error = rfkill_add_switch(rfkill);
-   if (error)
+   if (error) {
+   rfkill_led_trigger_unregister(rfkill);
return error;
+   }
 
error = device_add(dev);
if (error) {
+   rfkill_led_trigger_unregister(rfkill);
rfkill_remove_switch(rfkill);
return error;
}
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IPV6]: Mischecked tw match in __inet6_check_established.

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b3652b2dc5ec6ccd946ae9136b30c6babb81305a
Commit: b3652b2dc5ec6ccd946ae9136b30c6babb81305a
Parent: 632041f306707df94110441f55b1458ebeb096db
Author: Pavel Emelyanov [EMAIL PROTECTED]
AuthorDate: Fri Jan 18 03:27:12 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:36 2008 -0800

[IPV6]: Mischecked tw match in __inet6_check_established.

When looking for a conflicting connection the !sk-sk_bound_dev_if
check is performed only for live sockets, but not for timewait-ed.

This is not the case for ipv4, for __inet6_lookup_established in
both ipv4 and ipv6 and for other places that check for tw-s.

Was this missed accidentally? If so, then this patch fixes it and
besides makes use if the dif variable declared in the function.

Signed-off-by: Pavel Emelyanov [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv6/inet6_hashtables.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/inet6_hashtables.c b/net/ipv6/inet6_hashtables.c
index adc73ad..0765d8b 100644
--- a/net/ipv6/inet6_hashtables.c
+++ b/net/ipv6/inet6_hashtables.c
@@ -193,7 +193,7 @@ static int __inet6_check_established(struct 
inet_timewait_death_row *death_row,
   sk2-sk_family  == PF_INET6   
   ipv6_addr_equal(tw6-tw_v6_daddr, saddr) 
   ipv6_addr_equal(tw6-tw_v6_rcv_saddr, daddr) 
-  sk2-sk_bound_dev_if == sk-sk_bound_dev_if) {
+  (!sk2-sk_bound_dev_if || sk2-sk_bound_dev_if == dif)) {
if (twsk_unique(sk, sk2, twp))
goto unique;
else
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IPV4] fib_hash: fix duplicated route issue

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bd566e7525b5986864e8d6eb5b67640abcd284a9
Commit: bd566e7525b5986864e8d6eb5b67640abcd284a9
Parent: b3652b2dc5ec6ccd946ae9136b30c6babb81305a
Author: Joonwoo Park [EMAIL PROTECTED]
AuthorDate: Fri Jan 18 03:44:48 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:37 2008 -0800

[IPV4] fib_hash: fix duplicated route issue

http://bugzilla.kernel.org/show_bug.cgi?id=9493

The fib allows making identical routes with 'ip route replace'.
This patch makes the fib return -EEXIST if replacement would cause 
duplication.

Signed-off-by: Joonwoo Park [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/fib_hash.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 527a6e0..99071d7 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -444,6 +444,9 @@ static int fn_hash_insert(struct fib_table *tb, struct 
fib_config *cfg)
struct fib_info *fi_drop;
u8 state;
 
+   if (fi-fib_treeref  1)
+   goto out;
+
write_lock_bh(fib_hash_lock);
fi_drop = fa-fa_info;
fa-fa_info = fi;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IPV4] fib_trie: fix duplicated route issue

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6725033fa27c8f49e1221d2badbaaaf1ef459519
Commit: 6725033fa27c8f49e1221d2badbaaaf1ef459519
Parent: bd566e7525b5986864e8d6eb5b67640abcd284a9
Author: Joonwoo Park [EMAIL PROTECTED]
AuthorDate: Fri Jan 18 03:45:18 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:38 2008 -0800

[IPV4] fib_trie: fix duplicated route issue

http://bugzilla.kernel.org/show_bug.cgi?id=9493

The fib allows making identical routes with 'ip route replace'.
This patch makes the fib return -EEXIST if replacement would cause 
duplication.

Signed-off-by: Joonwoo Park [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/fib_trie.c |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/net/ipv4/fib_trie.c b/net/ipv4/fib_trie.c
index 8d8c291..1010b46 100644
--- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c
@@ -1214,6 +1214,9 @@ static int fn_trie_insert(struct fib_table *tb, struct 
fib_config *cfg)
struct fib_info *fi_drop;
u8 state;
 
+   if (fi-fib_treeref  1)
+   goto out;
+
err = -ENOBUFS;
new_fa = kmem_cache_alloc(fn_alias_kmem, GFP_KERNEL);
if (new_fa == NULL)
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[NET]: Fix interrupt semaphore corruption in Intel drivers.

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=49d85c502ec5e6d5998c1a04394c5b24e8f7d32d
Commit: 49d85c502ec5e6d5998c1a04394c5b24e8f7d32d
Parent: 6725033fa27c8f49e1221d2badbaaaf1ef459519
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Fri Jan 18 04:21:39 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:39 2008 -0800

[NET]: Fix interrupt semaphore corruption in Intel drivers.

Several of the Intel ethernet drivers keep an atomic counter used to
manage when to actually hit the hardware with a disable or an enable.

The way the net_rx_work() breakout logic works during a pending
napi_disable() is that it simply unschedules the poll even if it
still has work.

This can potentially leave interrupts disabled, but that is OK
because all of the drivers are about to disable interrupts
anyways in all such code paths that do a napi_disable().

Unfortunately, this trips up the semaphore used here in the Intel
drivers.  If you hit this case, when you try to bring the interface
back up it won't enable interrupts.  A reload of the driver module
fixes it of course.

So what we do is make sure all the sequences now go:

napi_disable();
atomic_set(adapter-irq_sem, 0);
*_irq_disable();

which makes sure the counter is always in the correct state.

Reported by Robert Olsson.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 drivers/net/e1000/e1000_main.c |1 +
 drivers/net/e1000e/netdev.c|1 +
 drivers/net/ixgb/ixgb_main.c   |9 ++---
 drivers/net/ixgbe/ixgbe_main.c |4 +++-
 4 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000/e1000_main.c b/drivers/net/e1000/e1000_main.c
index 0c9a6f7..76c0fa6 100644
--- a/drivers/net/e1000/e1000_main.c
+++ b/drivers/net/e1000/e1000_main.c
@@ -632,6 +632,7 @@ e1000_down(struct e1000_adapter *adapter)
 
 #ifdef CONFIG_E1000_NAPI
napi_disable(adapter-napi);
+   atomic_set(adapter-irq_sem, 0);
 #endif
e1000_irq_disable(adapter);
 
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 2ab3bfb..9cc5a6b 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -2183,6 +2183,7 @@ void e1000e_down(struct e1000_adapter *adapter)
msleep(10);
 
napi_disable(adapter-napi);
+   atomic_set(adapter-irq_sem, 0);
e1000_irq_disable(adapter);
 
del_timer_sync(adapter-watchdog_timer);
diff --git a/drivers/net/ixgb/ixgb_main.c b/drivers/net/ixgb/ixgb_main.c
index d2fb88d..4f63839 100644
--- a/drivers/net/ixgb/ixgb_main.c
+++ b/drivers/net/ixgb/ixgb_main.c
@@ -296,6 +296,11 @@ ixgb_down(struct ixgb_adapter *adapter, boolean_t 
kill_watchdog)
 {
struct net_device *netdev = adapter-netdev;
 
+#ifdef CONFIG_IXGB_NAPI
+   napi_disable(adapter-napi);
+   atomic_set(adapter-irq_sem, 0);
+#endif
+
ixgb_irq_disable(adapter);
free_irq(adapter-pdev-irq, netdev);
 
@@ -304,9 +309,7 @@ ixgb_down(struct ixgb_adapter *adapter, boolean_t 
kill_watchdog)
 
if(kill_watchdog)
del_timer_sync(adapter-watchdog_timer);
-#ifdef CONFIG_IXGB_NAPI
-   napi_disable(adapter-napi);
-#endif
+
adapter-link_speed = 0;
adapter-link_duplex = 0;
netif_carrier_off(netdev);
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index de3f45e..a4265bc 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -1409,9 +1409,11 @@ void ixgbe_down(struct ixgbe_adapter *adapter)
IXGBE_WRITE_FLUSH(adapter-hw);
msleep(10);
 
+   napi_disable(adapter-napi);
+   atomic_set(adapter-irq_sem, 0);
+
ixgbe_irq_disable(adapter);
 
-   napi_disable(adapter-napi);
del_timer_sync(adapter-watchdog_timer);
 
netif_carrier_off(netdev);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IPV4] FIB_HASH : Avoid unecessary loop in fn_hash_dump_zone()

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8d3f099abe25c21670cb5728178a1f286952782d
Commit: 8d3f099abe25c21670cb5728178a1f286952782d
Parent: 49d85c502ec5e6d5998c1a04394c5b24e8f7d32d
Author: Eric Dumazet [EMAIL PROTECTED]
AuthorDate: Fri Jan 18 04:30:21 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:39 2008 -0800

[IPV4] FIB_HASH : Avoid unecessary loop in fn_hash_dump_zone()

I noticed ip route list was slower than cat /proc/net/route on a
machine with a full Internet routing table (214392 entries : Special
thanks to Robert ;) )

This is similar to problem reported in commit
d8c9283089287341c85a0a69de32c2287a990e71 ([IPV4] ROUTE: ip_rt_dump()
is unecessary slow)

Fix is to avoid scanning the begining of fz_hash table, but directly
seek to the right offset.

Before patch :

time ip route /tmp/ROUTE

real0m1.285s
user0m0.712s
sys 0m0.436s

After patch

# time ip route /tmp/ROUTE

real0m0.835s
user0m0.692s
sys 0m0.124s

Signed-off-by: Eric Dumazet [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/fib_hash.c |   20 +---
 1 files changed, 9 insertions(+), 11 deletions(-)

diff --git a/net/ipv4/fib_hash.c b/net/ipv4/fib_hash.c
index 99071d7..0dfee27 100644
--- a/net/ipv4/fib_hash.c
+++ b/net/ipv4/fib_hash.c
@@ -721,19 +721,18 @@ fn_hash_dump_zone(struct sk_buff *skb, struct 
netlink_callback *cb,
 {
int h, s_h;
 
+   if (fz-fz_hash == NULL)
+   return skb-len;
s_h = cb-args[3];
-   for (h=0; h  fz-fz_divisor; h++) {
-   if (h  s_h) continue;
-   if (h  s_h)
-   memset(cb-args[4], 0,
-  sizeof(cb-args) - 4*sizeof(cb-args[0]));
-   if (fz-fz_hash == NULL ||
-   hlist_empty(fz-fz_hash[h]))
+   for (h = s_h; h  fz-fz_divisor; h++) {
+   if (hlist_empty(fz-fz_hash[h]))
continue;
-   if (fn_hash_dump_bucket(skb, cb, tb, fz, fz-fz_hash[h])0) {
+   if (fn_hash_dump_bucket(skb, cb, tb, fz, fz-fz_hash[h])  0) {
cb-args[3] = h;
return -1;
}
+   memset(cb-args[4], 0,
+  sizeof(cb-args) - 4*sizeof(cb-args[0]));
}
cb-args[3] = h;
return skb-len;
@@ -749,14 +748,13 @@ static int fn_hash_dump(struct fib_table *tb, struct 
sk_buff *skb, struct netlin
read_lock(fib_hash_lock);
for (fz = table-fn_zone_list, m=0; fz; fz = fz-fz_next, m++) {
if (m  s_m) continue;
-   if (m  s_m)
-   memset(cb-args[3], 0,
-  sizeof(cb-args) - 3*sizeof(cb-args[0]));
if (fn_hash_dump_zone(skb, cb, tb, fz)  0) {
cb-args[2] = m;
read_unlock(fib_hash_lock);
return -1;
}
+   memset(cb-args[3], 0,
+  sizeof(cb-args) - 3*sizeof(cb-args[0]));
}
read_unlock(fib_hash_lock);
cb-args[2] = m;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861.

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=398bcbebb6f721ac308df1e3d658c0029bb74503
Commit: 398bcbebb6f721ac308df1e3d658c0029bb74503
Parent: 8d3f099abe25c21670cb5728178a1f286952782d
Author: YOSHIFUJI Hideaki [EMAIL PROTECTED]
AuthorDate: Sat Jan 19 00:35:16 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:40 2008 -0800

[IPV6] ROUTE: Make sending algorithm more friendly with RFC 4861.

We omit (or delay) sending NSes for known-to-unreachable routers (in
NUD_FAILED state) according to RFC 4191 (Default Router Preferences
and More-Specific Routes).  But this is not fully compatible with RFC
4861 (Neighbor Discovery Protocol for IPv6), which does not remember
unreachability of neighbors.

So, let's avoid mixing sending algorithm of RFC 4191 and that of RFC
4861, and make the algorithm more friendly with RFC 4861 if RFC 4191
is disabled.

Issue was found by IPv6 Ready Logo Core Self_Test 1.5.0b2 (by TAHI
Project), and has been tracked down by Mitsuru Chinen
[EMAIL PROTECTED].

Signed-off-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv6/route.c |   11 ---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 6ecb5e6..20083e0 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -329,7 +329,7 @@ static inline int rt6_check_dev(struct rt6_info *rt, int 
oif)
 static inline int rt6_check_neigh(struct rt6_info *rt)
 {
struct neighbour *neigh = rt-rt6i_nexthop;
-   int m = 0;
+   int m;
if (rt-rt6i_flags  RTF_NONEXTHOP ||
!(rt-rt6i_flags  RTF_GATEWAY))
m = 1;
@@ -337,10 +337,15 @@ static inline int rt6_check_neigh(struct rt6_info *rt)
read_lock_bh(neigh-lock);
if (neigh-nud_state  NUD_VALID)
m = 2;
-   else if (!(neigh-nud_state  NUD_FAILED))
+#ifdef CONFIG_IPV6_ROUTER_PREF
+   else if (neigh-nud_state  NUD_FAILED)
+   m = 0;
+#endif
+   else
m = 1;
read_unlock_bh(neigh-lock);
-   }
+   } else
+   m = 0;
return m;
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[NETFILTER]: bridge-netfilter: fix net_device refcnt leaks

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2dc2f207fb251666d2396fe1a69272b307ecc333
Commit: 2dc2f207fb251666d2396fe1a69272b307ecc333
Parent: 398bcbebb6f721ac308df1e3d658c0029bb74503
Author: Patrick McHardy [EMAIL PROTECTED]
AuthorDate: Sun Jan 20 06:25:48 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:41 2008 -0800

[NETFILTER]: bridge-netfilter: fix net_device refcnt leaks

When packets are flood-forwarded to multiple output devices, the
bridge-netfilter code reuses skb-nf_bridge for each clone to store
the bridge port. When queueing packets using NFQUEUE netfilter takes
a reference to skb-nf_bridge-physoutdev, which is overwritten
when the packet is forwarded to the second port. This causes
refcount unterflows for the first device and refcount leaks for all
others. Additionally this provides incorrect data to the iptables
physdev match.

Unshare skb-nf_bridge by copying it if it is shared before assigning
the physoutdev device.

Reported, tested and based on initial patch by
Jan Christoph Nordholz [EMAIL PROTECTED].

Signed-off-by: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/bridge/br_netfilter.c |   27 +++
 1 files changed, 27 insertions(+), 0 deletions(-)

diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 5d8b939..9f78a69 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -142,6 +142,23 @@ static inline struct nf_bridge_info 
*nf_bridge_alloc(struct sk_buff *skb)
return skb-nf_bridge;
 }
 
+static inline struct nf_bridge_info *nf_bridge_unshare(struct sk_buff *skb)
+{
+   struct nf_bridge_info *nf_bridge = skb-nf_bridge;
+
+   if (atomic_read(nf_bridge-use)  1) {
+   struct nf_bridge_info *tmp = nf_bridge_alloc(skb);
+
+   if (tmp) {
+   memcpy(tmp, nf_bridge, sizeof(struct nf_bridge_info));
+   atomic_set(tmp-use, 1);
+   nf_bridge_put(nf_bridge);
+   }
+   nf_bridge = tmp;
+   }
+   return nf_bridge;
+}
+
 static inline void nf_bridge_push_encap_header(struct sk_buff *skb)
 {
unsigned int len = nf_bridge_encap_header_len(skb);
@@ -637,6 +654,11 @@ static unsigned int br_nf_forward_ip(unsigned int hook, 
struct sk_buff *skb,
if (!skb-nf_bridge)
return NF_ACCEPT;
 
+   /* Need exclusive nf_bridge_info since we might have multiple
+* different physoutdevs. */
+   if (!nf_bridge_unshare(skb))
+   return NF_DROP;
+
parent = bridge_parent(out);
if (!parent)
return NF_DROP;
@@ -718,6 +740,11 @@ static unsigned int br_nf_local_out(unsigned int hook, 
struct sk_buff *skb,
if (!skb-nf_bridge)
return NF_ACCEPT;
 
+   /* Need exclusive nf_bridge_info since we might have multiple
+* different physoutdevs. */
+   if (!nf_bridge_unshare(skb))
+   return NF_DROP;
+
nf_bridge = skb-nf_bridge;
if (!(nf_bridge-mask  BRNF_BRIDGED_DNAT))
return NF_ACCEPT;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[NEIGH]: Revert 'Fix race between neigh_parms_release and neightbl_fill_parms'

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cecbb63967b4f36701b9412a12377e8fe006a93b
Commit: cecbb63967b4f36701b9412a12377e8fe006a93b
Parent: 2dc2f207fb251666d2396fe1a69272b307ecc333
Author: David S. Miller [EMAIL PROTECTED]
AuthorDate: Sun Jan 20 16:39:03 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:42 2008 -0800

[NEIGH]: Revert 'Fix race between neigh_parms_release and 
neightbl_fill_parms'

Commit 9cd40029423701c376391da59d2c6469672b4bed (Fix race between
neigh_parms_release and neightbl_fill_parms) introduced device
reference counting regressions for several people, see:

http://bugzilla.kernel.org/show_bug.cgi?id=9778

for example.

Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/core/neighbour.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index cc8a2f1..29b8ee4 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -1316,6 +1316,8 @@ void neigh_parms_release(struct neigh_table *tbl, struct 
neigh_parms *parms)
*p = parms-next;
parms-dead = 1;
write_unlock_bh(tbl-lock);
+   if (parms-dev)
+   dev_put(parms-dev);
call_rcu(parms-rcu_head, neigh_rcu_free_parms);
return;
}
@@ -1326,8 +1328,6 @@ void neigh_parms_release(struct neigh_table *tbl, struct 
neigh_parms *parms)
 
 void neigh_parms_destroy(struct neigh_parms *parms)
 {
-   if (parms-dev)
-   dev_put(parms-dev);
kfree(parms);
 }
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IrDA]: af_irda memory leak fixes

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=61e44b4815063a5cc31242d3669d5f87beeaa45f
Commit: 61e44b4815063a5cc31242d3669d5f87beeaa45f
Parent: cecbb63967b4f36701b9412a12377e8fe006a93b
Author: Jesper Juhl [EMAIL PROTECTED]
AuthorDate: Sun Jan 20 16:58:04 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:42 2008 -0800

[IrDA]: af_irda memory leak fixes

Here goes an IrDA patch against your latest net-2.6 tree.

This patch fixes some af_irda memory leaks.  It also checks for
irias_new_obect() return value.

Signed-off-by: Jesper Juhl [EMAIL PROTECTED]
Signed-off-by: Samuel Ortiz [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/irda/af_irda.c |   30 +++---
 1 files changed, 27 insertions(+), 3 deletions(-)

diff --git a/net/irda/af_irda.c b/net/irda/af_irda.c
index d5e4dd7..07dfa7f 100644
--- a/net/irda/af_irda.c
+++ b/net/irda/af_irda.c
@@ -802,12 +802,18 @@ static int irda_bind(struct socket *sock, struct sockaddr 
*uaddr, int addr_len)
}
 #endif /* CONFIG_IRDA_ULTRA */
 
+   self-ias_obj = irias_new_object(addr-sir_name, jiffies);
+   if (self-ias_obj == NULL)
+   return -ENOMEM;
+
err = irda_open_tsap(self, addr-sir_lsap_sel, addr-sir_name);
-   if (err  0)
+   if (err  0) {
+   kfree(self-ias_obj-name);
+   kfree(self-ias_obj);
return err;
+   }
 
/*  Register with LM-IAS */
-   self-ias_obj = irias_new_object(addr-sir_name, jiffies);
irias_add_integer_attrib(self-ias_obj, IrDA:TinyTP:LsapSel,
 self-stsap_sel, IAS_KERNEL_ATTR);
irias_insert_object(self-ias_obj);
@@ -1825,7 +1831,7 @@ static int irda_setsockopt(struct socket *sock, int 
level, int optname,
struct irda_ias_set*ias_opt;
struct ias_object  *ias_obj;
struct ias_attrib * ias_attr;   /* Attribute in IAS object */
-   int opt;
+   int opt, free_ias = 0;
 
IRDA_DEBUG(2, %s(%p)\n, __FUNCTION__, self);
 
@@ -1881,11 +1887,20 @@ static int irda_setsockopt(struct socket *sock, int 
level, int optname,
/* Create a new object */
ias_obj = irias_new_object(ias_opt-irda_class_name,
   jiffies);
+   if (ias_obj == NULL) {
+   kfree(ias_opt);
+   return -ENOMEM;
+   }
+   free_ias = 1;
}
 
/* Do we have the attribute already ? */
if(irias_find_attrib(ias_obj, ias_opt-irda_attrib_name)) {
kfree(ias_opt);
+   if (free_ias) {
+   kfree(ias_obj-name);
+   kfree(ias_obj);
+   }
return -EINVAL;
}
 
@@ -1904,6 +1919,11 @@ static int irda_setsockopt(struct socket *sock, int 
level, int optname,
if(ias_opt-attribute.irda_attrib_octet_seq.len 
   IAS_MAX_OCTET_STRING) {
kfree(ias_opt);
+   if (free_ias) {
+   kfree(ias_obj-name);
+   kfree(ias_obj);
+   }
+
return -EINVAL;
}
/* Add an octet sequence attribute */
@@ -1932,6 +1952,10 @@ static int irda_setsockopt(struct socket *sock, int 
level, int optname,
break;
default :
kfree(ias_opt);
+   if (free_ias) {
+   kfree(ias_obj-name);
+   kfree(ias_obj);
+   }
return -EINVAL;
}
irias_insert_object(ias_obj);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ATM] atm/idt77105.c: Fix section mismatch.

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=799fa6779bc870a32377000b42a3e6297446ed10
Commit: 799fa6779bc870a32377000b42a3e6297446ed10
Parent: 61e44b4815063a5cc31242d3669d5f87beeaa45f
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Sun Jan 20 17:22:28 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:43 2008 -0800

[ATM] atm/idt77105.c: Fix section mismatch.

EXPORT_SYMBOL'ed code mustn't be __*init.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Acked-by: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 drivers/atm/idt77105.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/atm/idt77105.c b/drivers/atm/idt77105.c
index 0bd657f..84672dc 100644
--- a/drivers/atm/idt77105.c
+++ b/drivers/atm/idt77105.c
@@ -357,7 +357,7 @@ static const struct atmphy_ops idt77105_ops = {
 };
 
 
-int __devinit idt77105_init(struct atm_dev *dev)
+int idt77105_init(struct atm_dev *dev)
 {
dev-phy = idt77105_ops;
return 0;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ATM] atm/suni.c: Fix section mismatch.

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=421c991483a6e52091cd2120c007cbc220d669ae
Commit: 421c991483a6e52091cd2120c007cbc220d669ae
Parent: 799fa6779bc870a32377000b42a3e6297446ed10
Author: Adrian Bunk [EMAIL PROTECTED]
AuthorDate: Sun Jan 20 17:23:12 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:44 2008 -0800

[ATM] atm/suni.c: Fix section mismatch.

EXPORT_SYMBOL'ed code mustn't be __*init.

Signed-off-by: Adrian Bunk [EMAIL PROTECTED]
Acked-by: Sam Ravnborg [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 drivers/atm/suni.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/atm/suni.c b/drivers/atm/suni.c
index f04f39c..b1d063c 100644
--- a/drivers/atm/suni.c
+++ b/drivers/atm/suni.c
@@ -289,7 +289,7 @@ static const struct atmphy_ops suni_ops = {
 };
 
 
-int __devinit suni_init(struct atm_dev *dev)
+int suni_init(struct atm_dev *dev)
 {
unsigned char mri;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[AF_KEY]: Fix skb leak on pfkey_send_migrate() error

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d4782c323d10d3698b71b6a6b3c7bdad33824658
Commit: d4782c323d10d3698b71b6a6b3c7bdad33824658
Parent: 421c991483a6e52091cd2120c007cbc220d669ae
Author: Patrick McHardy [EMAIL PROTECTED]
AuthorDate: Sun Jan 20 17:24:29 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:45 2008 -0800

[AF_KEY]: Fix skb leak on pfkey_send_migrate() error

Signed-off-by: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/key/af_key.c |   16 +---
 1 files changed, 9 insertions(+), 7 deletions(-)

diff --git a/net/key/af_key.c b/net/key/af_key.c
index 26d5e63..76dcd88 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -3593,27 +3593,29 @@ static int pfkey_send_migrate(struct xfrm_selector 
*sel, u8 dir, u8 type,
/* old ipsecrequest */
int mode = pfkey_mode_from_xfrm(mp-mode);
if (mode  0)
-   return -EINVAL;
+   goto err;
if (set_ipsecrequest(skb, mp-proto, mode,
 (mp-reqid ?  IPSEC_LEVEL_UNIQUE : 
IPSEC_LEVEL_REQUIRE),
 mp-reqid, mp-old_family,
-mp-old_saddr, mp-old_daddr)  0) {
-   return -EINVAL;
-   }
+mp-old_saddr, mp-old_daddr)  0)
+   goto err;
 
/* new ipsecrequest */
if (set_ipsecrequest(skb, mp-proto, mode,
 (mp-reqid ? IPSEC_LEVEL_UNIQUE : 
IPSEC_LEVEL_REQUIRE),
 mp-reqid, mp-new_family,
-mp-new_saddr, mp-new_daddr)  0) {
-   return -EINVAL;
-   }
+mp-new_saddr, mp-new_daddr)  0)
+   goto err;
}
 
/* broadcast migrate message to sockets */
pfkey_broadcast(skb, GFP_ATOMIC, BROADCAST_ALL, NULL);
 
return 0;
+
+err:
+   kfree_skb(skb);
+   return -EINVAL;
 }
 #else
 static int pfkey_send_migrate(struct xfrm_selector *sel, u8 dir, u8 type,
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[NET]: rtnl_link: fix use-after-free

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=68365458a4252fa993b91a00f7a0b18fed399f0d
Commit: 68365458a4252fa993b91a00f7a0b18fed399f0d
Parent: d4782c323d10d3698b71b6a6b3c7bdad33824658
Author: Patrick McHardy [EMAIL PROTECTED]
AuthorDate: Sun Jan 20 17:25:14 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Sun Jan 20 20:31:45 2008 -0800

[NET]: rtnl_link: fix use-after-free

When unregistering the rtnl_link_ops, all existing devices using
the ops are destroyed. With nested devices this may lead to a
use-after-free despite the use of for_each_netdev_safe() in case
the upper device is next in the device list and is destroyed
by the NETDEV_UNREGISTER notifier.

The easy fix is to restart scanning the device list after removing
a device. Alternatively we could add new devices to the front of
the list to avoid having dependant devices follow the device they
depend on. A third option would be to only restart scanning if
dev-iflink of the next device matches dev-ifindex of the current
one. For now this seems like the safest solution.

With this patch, the veth rtnl_link_ops unregistration can use
rtnl_link_unregister() directly since it now also handles destruction
of multiple devices at once.

Signed-off-by: Patrick McHardy [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 drivers/net/veth.c   |   14 +-
 net/core/rtnetlink.c |5 -
 2 files changed, 5 insertions(+), 14 deletions(-)

diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 43af9e9..3f67a29 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -459,19 +459,7 @@ static __init int veth_init(void)
 
 static __exit void veth_exit(void)
 {
-   struct veth_priv *priv, *next;
-
-   rtnl_lock();
-   /*
-* cannot trust __rtnl_link_unregister() to unregister all
-* devices, as each -dellink call will remove two devices
-* from the list at once.
-*/
-   list_for_each_entry_safe(priv, next, veth_list, list)
-   veth_dellink(priv-dev);
-
-   __rtnl_link_unregister(veth_link_ops);
-   rtnl_unlock();
+   rtnl_link_unregister(veth_link_ops);
 }
 
 module_init(veth_init);
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c
index e1ba26f..fed95a3 100644
--- a/net/core/rtnetlink.c
+++ b/net/core/rtnetlink.c
@@ -308,9 +308,12 @@ void __rtnl_link_unregister(struct rtnl_link_ops *ops)
struct net *net;
 
for_each_net(net) {
+restart:
for_each_netdev_safe(net, dev, n) {
-   if (dev-rtnl_link_ops == ops)
+   if (dev-rtnl_link_ops == ops) {
ops-dellink(dev);
+   goto restart;
+   }
}
}
list_del(ops-list);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IPV6]: ICMP6_MIB_OUTMSGS increment duplicated

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c964ff4ffbef4586ec63dbeb008563078114e6dc
Commit: c964ff4ffbef4586ec63dbeb008563078114e6dc
Parent: 68365458a4252fa993b91a00f7a0b18fed399f0d
Author: Wang Chen [EMAIL PROTECTED]
AuthorDate: Mon Jan 21 03:04:47 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Mon Jan 21 03:05:20 2008 -0800

[IPV6]: ICMP6_MIB_OUTMSGS increment duplicated

icmpv6_send() calls ip6_push_pending_frames() indirectly.
Both ip6_push_pending_frames() and icmpv6_send() increment
counter ICMP6_MIB_OUTMSGS.

This patch remove the increment from icmpv6_send.

Signed-off-by: Wang Chen [EMAIL PROTECTED]
Acked-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv6/icmp.c |2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c
index 9bb031f..f124068 100644
--- a/net/ipv6/icmp.c
+++ b/net/ipv6/icmp.c
@@ -458,8 +458,6 @@ void icmpv6_send(struct sk_buff *skb, int type, int code, 
__u32 info,
}
err = icmpv6_push_pending_frames(sk, fl, tmp_hdr, len + sizeof(struct 
icmp6hdr));
 
-   ICMP6_INC_STATS_BH(idev, ICMP6_MIB_OUTMSGS);
-
 out_put:
if (likely(idev != NULL))
in6_dev_put(idev);
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Makefile: Change typoed 'behavour' to 'behaviour'

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d384e35a25445bb60457b7dab8cffe178c6b7ecb
Commit: d384e35a25445bb60457b7dab8cffe178c6b7ecb
Parent: 8b85eaadd5b8d3786996bd74c73aff54a92ec456
Author: Linus Nilsson [EMAIL PROTECTED]
AuthorDate: Sun Jan 20 17:10:01 2008 +0100
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Mon Jan 21 19:55:04 2008 -0800

Makefile: Change typoed 'behavour' to 'behaviour'

Change two occurances of behavour to behaviour.

Signed-off-by: Linus Nilsson [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 Makefile |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/Makefile b/Makefile
index 713f685..ce641eb 100644
--- a/Makefile
+++ b/Makefile
@@ -12,7 +12,7 @@ NAME = Arr Matey! A Hairy Bilge Rat!
 
 # Do not:
 # o  use make's built-in rules and variables
-#(this increases performance and avoid hard-to-debug behavour);
+#(this increases performance and avoids hard-to-debug behaviour);
 # o  print Entering directory ...;
 MAKEFLAGS += -rR --no-print-directory
 
@@ -1329,7 +1329,7 @@ else
 ALLINCLUDE_ARCHS := $(SRCARCH)
 endif
 else
-#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping 
existing behavour.
+#Allow user to specify only ALLSOURCE_PATHS on the command line, keeping 
existing behaviour.
 ALLINCLUDE_ARCHS := $(ALLSOURCE_ARCHS)
 endif
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


selinux: fix memory leak in netlabel code

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=45c950e0f839fded922ebc0bfd59b1081cc71b70
Commit: 45c950e0f839fded922ebc0bfd59b1081cc71b70
Parent: a7da60f41551abb3c520b03d42ec05dd7decfc7f
Author: Paul Moore [EMAIL PROTECTED]
AuthorDate: Tue Jan 22 09:31:00 2008 +1100
Committer:  James Morris [EMAIL PROTECTED]
CommitDate: Tue Jan 22 09:31:00 2008 +1100

selinux: fix memory leak in netlabel code

Fix a memory leak in security_netlbl_sid_to_secattr() as reported here:
 * https://bugzilla.redhat.com/show_bug.cgi?id=352281

Signed-off-by: Paul Moore [EMAIL PROTECTED]
Signed-off-by: James Morris [EMAIL PROTECTED]
---
 security/selinux/netlabel.c|7 +--
 security/selinux/ss/services.c |2 --
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/security/selinux/netlabel.c b/security/selinux/netlabel.c
index d243ddc..66e013d 100644
--- a/security/selinux/netlabel.c
+++ b/security/selinux/netlabel.c
@@ -53,10 +53,11 @@ static int selinux_netlbl_sock_setsid(struct sock *sk, u32 
sid)
struct sk_security_struct *sksec = sk-sk_security;
struct netlbl_lsm_secattr secattr;
 
+   netlbl_secattr_init(secattr);
+
rc = security_netlbl_sid_to_secattr(sid, secattr);
if (rc != 0)
-   return rc;
-
+   goto sock_setsid_return;
rc = netlbl_sock_setattr(sk, secattr);
if (rc == 0) {
spin_lock_bh(sksec-nlbl_lock);
@@ -64,6 +65,8 @@ static int selinux_netlbl_sock_setsid(struct sock *sk, u32 
sid)
spin_unlock_bh(sksec-nlbl_lock);
}
 
+sock_setsid_return:
+   netlbl_secattr_destroy(secattr);
return rc;
 }
 
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c
index d572dc9..f83b19d 100644
--- a/security/selinux/ss/services.c
+++ b/security/selinux/ss/services.c
@@ -2606,8 +2606,6 @@ int security_netlbl_sid_to_secattr(u32 sid, struct 
netlbl_lsm_secattr *secattr)
int rc = -ENOENT;
struct context *ctx;
 
-   netlbl_secattr_init(secattr);
-
if (!ss_initialized)
return 0;
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[IPV6]: RFC 2011 compatibility broken

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fa95c28322a312a798a688c655458ab2079b72eb
Commit: fa95c28322a312a798a688c655458ab2079b72eb
Parent: c964ff4ffbef4586ec63dbeb008563078114e6dc
Author: Wang Chen [EMAIL PROTECTED]
AuthorDate: Mon Jan 21 03:05:43 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Mon Jan 21 03:05:43 2008 -0800

[IPV6]: RFC 2011 compatibility broken

The snmp6 entry name was changed, and it broke compatibility
to RFC 2011.

Signed-off-by: Wang Chen [EMAIL PROTECTED]
Acked-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv6/proc.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/net/ipv6/proc.c b/net/ipv6/proc.c
index 8631ed7..4493761 100644
--- a/net/ipv6/proc.c
+++ b/net/ipv6/proc.c
@@ -88,7 +88,7 @@ static char *icmp6type2name[256] = {
[ICMPV6_PKT_TOOBIG] = PktTooBigs,
[ICMPV6_TIME_EXCEED] = TimeExcds,
[ICMPV6_PARAMPROB] = ParmProblems,
-   [ICMPV6_ECHO_REQUEST] = EchoRequest,
+   [ICMPV6_ECHO_REQUEST] = Echos,
[ICMPV6_ECHO_REPLY] = EchoReplies,
[ICMPV6_MGM_QUERY] = GroupMembQueries,
[ICMPV6_MGM_REPORT] = GroupMembResponses,
@@ -98,7 +98,7 @@ static char *icmp6type2name[256] = {
[NDISC_ROUTER_SOLICITATION] = RouterSolicits,
[NDISC_NEIGHBOUR_ADVERTISEMENT] = NeighborAdvertisements,
[NDISC_NEIGHBOUR_SOLICITATION] = NeighborSolicits,
-   [NDISC_REDIRECT] = NeighborRedirects,
+   [NDISC_REDIRECT] = Redirects,
 };
 
 
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[ICMP]: ICMP_MIB_OUTMSGS increment duplicated

2008-01-21 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5b4d383a1a562de6955cacd72e20809064ee137f
Commit: 5b4d383a1a562de6955cacd72e20809064ee137f
Parent: fa95c28322a312a798a688c655458ab2079b72eb
Author: Wang Chen [EMAIL PROTECTED]
AuthorDate: Mon Jan 21 03:39:45 2008 -0800
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Mon Jan 21 03:39:45 2008 -0800

[ICMP]: ICMP_MIB_OUTMSGS increment duplicated

Commit 96793b482540f3a26e2188eaf75cb56b7829d3e3 (Add ICMPMsgStats
MIB (RFC 4293)) made a mistake.

In that patch, David L added a icmp_out_count() in
ip_push_pending_frames(), remove icmp_out_count() from
icmp_reply(). But he forgot to remove icmp_out_count() from
icmp_send() too.  Since icmp_send and icmp_reply will call
icmp_push_reply, which will call ip_push_pending_frames, a duplicated
increment happened in icmp_send.

This patch remove the icmp_out_count from icmp_send too.

Signed-off-by: Wang Chen [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/icmp.c |1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/icmp.c b/net/ipv4/icmp.c
index 233de06..82baea0 100644
--- a/net/ipv4/icmp.c
+++ b/net/ipv4/icmp.c
@@ -540,7 +540,6 @@ void icmp_send(struct sk_buff *skb_in, int type, int code, 
__be32 info)
icmp_param.data.icmph.checksum   = 0;
icmp_param.skb= skb_in;
icmp_param.offset = skb_network_offset(skb_in);
-   icmp_out_count(icmp_param.data.icmph.type);
inet_sk(icmp_socket-sk)-tos = tos;
ipc.addr = iph-saddr;
ipc.opt = icmp_param.replyopts;
-
To unsubscribe from this list: send the line unsubscribe git-commits-head in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html