oom: kill all threads that share mm with killed task

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=650a7c974f1b91de9732c0f720e792837f8abfd6
Commit: 650a7c974f1b91de9732c0f720e792837f8abfd6
Parent: c445a31cd7f469d77acc37538ab43a99530968b8
Author: David Rientjes [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 21:36:13 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:11:49 2007 -0700

oom: kill all threads that share mm with killed task

oom_kill_task() calls __oom_kill_task() to OOM kill a selected task.
When finding other threads that share an mm with that task, we need to
kill those individual threads and not the same one.

(Bug introduced by f2a2a7108aa0039ba7a5fe7a0d2ecef2219a7584)

Acked-by: William Irwin [EMAIL PROTECTED]
Acked-by: Christoph Lameter [EMAIL PROTECTED]
Cc: Nick Piggin [EMAIL PROTECTED]
Cc: Andrew Morton [EMAIL PROTECTED]
Cc: Andi Kleen [EMAIL PROTECTED]
Signed-off-by: David Rientjes [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 mm/oom_kill.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index 2f39169..af981b6 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -333,7 +333,7 @@ static int oom_kill_task(struct task_struct *p)
 */
do_each_thread(g, q) {
if (q-mm == mm  q-tgid != p-tgid)
-   force_sig(SIGKILL, p);
+   force_sig(SIGKILL, q);
} while_each_thread(g, q);
 
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


Fix possible NULL pointer access in 8250 serial driver

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fdc30b3d448bf86dd45f9df3e8ac0d36a3bdd9b2
Commit: fdc30b3d448bf86dd45f9df3e8ac0d36a3bdd9b2
Parent: 650a7c974f1b91de9732c0f720e792837f8abfd6
Author: Taku Izumi [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:00 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:07 2007 -0700

Fix possible NULL pointer access in 8250 serial driver

I encountered the following kernel panic.  The cause of this problem was
NULL pointer access in check_modem_status() in 8250.c.  I confirmed this
problem is fixed by the attached patch, but I don't know this is the
correct fix.

sadc[4378]: NaT consumption 2216203124768 [1]
Modules linked in: binfmt_misc dm_mirror dm_mod thermal processor fan
container button sg e100 eepro100 mii ehci_hcd ohci_hcd

Pid: 4378, CPU 0, comm: sadc
psr : 1210085a2010 ifs : 8289 ip : [a00100482071]
Not tainted
ip is at check_modem_status+0xf1/0x360

Call Trace:
[a00100013940] show_stack+0x40/0xa0
[a001000145a0] show_regs+0x840/0x880
[a001000368e0] die+0x1c0/0x2c0
[a00100036a30] die_if_kernel+0x50/0x80
[a00100037c40] ia64_fault+0x11e0/0x1300
[a001bdc0] ia64_leave_kernel+0x0/0x280
[a00100482070] check_modem_status+0xf0/0x360
[a00100482300] serial8250_get_mctrl+0x20/0xa0
[a00100478170] uart_read_proc+0x250/0x860
[a001001c16d0] proc_file_read+0x1d0/0x4c0
[a001001394b0] vfs_read+0x1b0/0x300
[a00100139cd0] sys_read+0x70/0xe0
[a001bc20] ia64_ret_from_syscall+0x0/0x20
[a0010620] __kernel_syscall_via_break+0x0/0x20

Fix the possible NULL pointer access in check_modem_status() in 8250.c.  The
check_modem_status() would access 'info' member of uart_port structure, but 
it
is not initialized before uart_open() is called.  The check_modem_status() 
can
be called through /proc/tty/driver/serial before uart_open() is called.

Signed-off-by: Kenji Kaneshige [EMAIL PROTECTED]
Signed-off-by: Taku Izumi [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/8250.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index c129a0e..c0c472a 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1310,7 +1310,8 @@ static unsigned int check_modem_status(struct 
uart_8250_port *up)
 {
unsigned int status = serial_in(up, UART_MSR);
 
-   if (status  UART_MSR_ANY_DELTA  up-ier  UART_IER_MSI) {
+   if (status  UART_MSR_ANY_DELTA  up-ier  UART_IER_MSI 
+   up-port.info != NULL) {
if (status  UART_MSR_TERI)
up-port.icount.rng++;
if (status  UART_MSR_DDSR)
-
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 OOM killing processes wrongly thought MPOL_BIND

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3d124cbba316737af8f3a6959edb95bbd130a4d8
Commit: 3d124cbba316737af8f3a6959edb95bbd130a4d8
Parent: fdc30b3d448bf86dd45f9df3e8ac0d36a3bdd9b2
Author: Hugh Dickins [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:02 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:07 2007 -0700

fix OOM killing processes wrongly thought MPOL_BIND

I only have CONFIG_NUMA=y for build testing: surprised when trying a memhog
to see lots of other processes killed with No available memory
(MPOL_BIND).  memhog is killed correctly once we initialize nodemask in
constrained_alloc().

Signed-off-by: Hugh Dickins [EMAIL PROTECTED]
Acked-by: Christoph Lameter [EMAIL PROTECTED]
Acked-by: William Irwin [EMAIL PROTECTED]
Acked-by: KAMEZAWA Hiroyuki [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 mm/oom_kill.c |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/mm/oom_kill.c b/mm/oom_kill.c
index af981b6..3791edf 100644
--- a/mm/oom_kill.c
+++ b/mm/oom_kill.c
@@ -176,6 +176,8 @@ static inline int constrained_alloc(struct zonelist 
*zonelist, gfp_t gfp_mask)
struct zone **z;
nodemask_t nodes;
int node;
+
+   nodes_clear(nodes);
/* node has memory ? */
for_each_online_node(node)
if (NODE_DATA(node)-node_present_pages)
-
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


Char: mxser_new, fix recursive locking

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=67d2bc58afdd5168dce54ae06f5f30038c59f498
Commit: 67d2bc58afdd5168dce54ae06f5f30038c59f498
Parent: 3d124cbba316737af8f3a6959edb95bbd130a4d8
Author: Jan Yenya Kasprzak [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:02 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:07 2007 -0700

Char: mxser_new, fix recursive locking

Signed-off-by: Jan Yenya Kasprzak [EMAIL PROTECTED]
Acked-by: Jiri Slaby [EMAIL PROTECTED]
Acked-by: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/mxser_new.c |7 +++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 9af07e4..59e0aac 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -2230,7 +2230,14 @@ end_intr:
port-mon_data.rxcnt += cnt;
port-mon_data.up_rxcnt += cnt;
 
+   /*
+* We are called from an interrupt context with port-slock
+* being held. Drop it temporarily in order to prevent
+* recursive locking.
+*/
+   spin_unlock(port-slock);
tty_flip_buffer_push(tty);
+   spin_lock(port-slock);
 }
 
 static void mxser_transmit_chars(struct mxser_port *port)
-
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


Char: mxser_new, fix TIOCMIWAIT

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b446a4a5757fe1287bf3472efcdde6b59dfd63ad
Commit: b446a4a5757fe1287bf3472efcdde6b59dfd63ad
Parent: 67d2bc58afdd5168dce54ae06f5f30038c59f498
Author: Jiri Slaby [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:03 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:07 2007 -0700

Char: mxser_new, fix TIOCMIWAIT

There was schedule() missing in the TIOCMIWAIT ioctl.  Solve it by moving
the code to the wait_event_interruptible.

Cc: Jan Yenya Kasprzak [EMAIL PROTECTED]
Signed-off-by: Jiri Slaby [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/mxser_new.c |   38 +-
 1 files changed, 9 insertions(+), 29 deletions(-)

diff --git a/drivers/char/mxser_new.c b/drivers/char/mxser_new.c
index 59e0aac..f7603b6 100644
--- a/drivers/char/mxser_new.c
+++ b/drivers/char/mxser_new.c
@@ -1758,43 +1758,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct 
file *file,
 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
 * Caller should use TIOCGICOUNT to see which one it was
 */
-   case TIOCMIWAIT: {
-   DECLARE_WAITQUEUE(wait, current);
-   int ret;
+   case TIOCMIWAIT:
spin_lock_irqsave(info-slock, flags);
-   cprev = info-icount;   /* note the counters on entry */
+   cnow = info-icount;/* note the counters on entry */
spin_unlock_irqrestore(info-slock, flags);
 
-   add_wait_queue(info-delta_msr_wait, wait);
-   while (1) {
+   wait_event_interruptible(info-delta_msr_wait, ({
+   cprev = cnow;
spin_lock_irqsave(info-slock, flags);
cnow = info-icount;/* atomic copy */
spin_unlock_irqrestore(info-slock, flags);
 
-   set_current_state(TASK_INTERRUPTIBLE);
-   if (((arg  TIOCM_RNG) 
-   (cnow.rng != cprev.rng)) ||
-   ((arg  TIOCM_DSR) 
-   (cnow.dsr != cprev.dsr)) ||
-   ((arg  TIOCM_CD) 
-   (cnow.dcd != cprev.dcd)) ||
-   ((arg  TIOCM_CTS) 
-   (cnow.cts != cprev.cts))) {
-   ret = 0;
-   break;
-   }
-   /* see if a signal did it */
-   if (signal_pending(current)) {
-   ret = -ERESTARTSYS;
-   break;
-   }
-   cprev = cnow;
-   }
-   current-state = TASK_RUNNING;
-   remove_wait_queue(info-delta_msr_wait, wait);
+   ((arg  TIOCM_RNG)  (cnow.rng != cprev.rng)) ||
+   ((arg  TIOCM_DSR)  (cnow.dsr != cprev.dsr)) ||
+   ((arg  TIOCM_CD)   (cnow.dcd != cprev.dcd)) ||
+   ((arg  TIOCM_CTS)  (cnow.cts != cprev.cts));
+   }));
break;
-   }
-   /* NOTREACHED */
/*
 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
 * Return: write counters to the user passed counter struct
-
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


Char: mxser, fix TIOCMIWAIT

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fc83815c3afe1bd8d0f0961a668a96caabb049be
Commit: fc83815c3afe1bd8d0f0961a668a96caabb049be
Parent: b446a4a5757fe1287bf3472efcdde6b59dfd63ad
Author: Jiri Slaby [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:04 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

Char: mxser, fix TIOCMIWAIT

There was schedule() missing in the TIOCMIWAIT ioctl. Solve it by moving
the code to the wait_event_interruptible.

Signed-off-by: Jiri Slaby [EMAIL PROTECTED]
Cc: Jan Yenya Kasprzak [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/char/mxser.c |   48 ++--
 1 files changed, 14 insertions(+), 34 deletions(-)

diff --git a/drivers/char/mxser.c b/drivers/char/mxser.c
index a61fb6d..80a0115 100644
--- a/drivers/char/mxser.c
+++ b/drivers/char/mxser.c
@@ -1338,43 +1338,23 @@ static int mxser_ioctl(struct tty_struct *tty, struct 
file *file, unsigned int c
 *   (use |'ed TIOCM_RNG/DSR/CD/CTS for masking)
 * Caller should use TIOCGICOUNT to see which one it was
 */
-   case TIOCMIWAIT: {
-   DECLARE_WAITQUEUE(wait, current);
-   int ret;
+   case TIOCMIWAIT:
+   spin_lock_irqsave(info-slock, flags);
+   cnow = info-icount;/* note the counters on entry */
+   spin_unlock_irqrestore(info-slock, flags);
+
+   wait_event_interruptible(info-delta_msr_wait, ({
+   cprev = cnow;
spin_lock_irqsave(info-slock, flags);
-   cprev = info-icount;   /* note the counters on entry */
+   cnow = info-icount;/* atomic copy */
spin_unlock_irqrestore(info-slock, flags);
 
-   add_wait_queue(info-delta_msr_wait, wait);
-   while (1) {
-   spin_lock_irqsave(info-slock, flags);
-   cnow = info-icount;/* atomic copy */
-   spin_unlock_irqrestore(info-slock, flags);
-
-   set_current_state(TASK_INTERRUPTIBLE);
-   if (((arg  TIOCM_RNG) 
-   (cnow.rng != cprev.rng)) ||
-   ((arg  TIOCM_DSR) 
-   (cnow.dsr != cprev.dsr)) ||
-   ((arg  TIOCM_CD) 
-   (cnow.dcd != cprev.dcd)) ||
-   ((arg  TIOCM_CTS) 
-   (cnow.cts != cprev.cts))) {
-   ret = 0;
-   break;
-   }
-   /* see if a signal did it */
-   if (signal_pending(current)) {
-   ret = -ERESTARTSYS;
-   break;
-   }
-   cprev = cnow;
-   }
-   current-state = TASK_RUNNING;
-   remove_wait_queue(info-delta_msr_wait, wait);
-   break;
-   }
-   /* NOTREACHED */
+   ((arg  TIOCM_RNG)  (cnow.rng != cprev.rng)) ||
+   ((arg  TIOCM_DSR)  (cnow.dsr != cprev.dsr)) ||
+   ((arg  TIOCM_CD)   (cnow.dcd != cprev.dcd)) ||
+   ((arg  TIOCM_CTS)  (cnow.cts != cprev.cts));
+   }));
+   break;
/*
 * Get counter of input serial line interrupts (DCD,RI,DSR,CTS)
 * Return: write counters to the user passed counter struct
-
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


Taskstats fix the structure members alignment issue

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7e40f2ab0a7e36706ee78b78b3792f08f208cd44
Commit: 7e40f2ab0a7e36706ee78b78b3792f08f208cd44
Parent: fc83815c3afe1bd8d0f0961a668a96caabb049be
Author: Balbir Singh [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:05 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

Taskstats fix the structure members alignment issue

We broke the the alignment of members of taskstats to the 8 byte boundary
with the CSA patches.  In the current kernel, the taskstats structure is
not suitable for use by 32 bit applications in a 64 bit kernel.

On x86_64

Offsets of taskstats' members (64 bit kernel, 64 bit application)

@taskstats'[EMAIL PROTECTED]'indices] = (
0,  # version
4,  # ac_exitcode
8,  # ac_flag
9,  # ac_nice
16, # cpu_count
24, # cpu_delay_total
32, # blkio_count
40, # blkio_delay_total
48, # swapin_count
56, # swapin_delay_total
64, # cpu_run_real_total
72, # cpu_run_virtual_total
80, # ac_comm
112,# ac_sched
113,# ac_pad
116,# ac_uid
120,# ac_gid
124,# ac_pid
128,# ac_ppid
132,# ac_btime
136,# ac_etime
144,# ac_utime
152,# ac_stime
160,# ac_minflt
168,# ac_majflt
176,# coremem
184,# virtmem
192,# hiwater_rss
200,# hiwater_vm
208,# read_char
216,# write_char
224,# read_syscalls
232,# write_syscalls
240,# read_bytes
248,# write_bytes
256,# cancelled_write_bytes
);

Offsets of taskstats' members (64 bit kernel, 32 bit application)

@taskstats'[EMAIL PROTECTED]'indices] = (
0,  # version
4,  # ac_exitcode
8,  # ac_flag
9,  # ac_nice
12, # cpu_count
20, # cpu_delay_total
28, # blkio_count
36, # blkio_delay_total
44, # swapin_count
52, # swapin_delay_total
60, # cpu_run_real_total
68, # cpu_run_virtual_total
76, # ac_comm
108,# ac_sched
109,# ac_pad
112,# ac_uid
116,# ac_gid
120,# ac_pid
124,# ac_ppid
128,# ac_btime
132,# ac_etime
140,# ac_utime
148,# ac_stime
156,# ac_minflt
164,# ac_majflt
172,# coremem
180,# virtmem
188,# hiwater_rss
196,# hiwater_vm
204,# read_char
212,# write_char
220,# read_syscalls
228,# write_syscalls
236,# read_bytes
244,# write_bytes
252,# cancelled_write_bytes
);

This is one way to solve the problem without re-arranging structure members
is to pack the structure.  The patch adds an __attribute__((aligned(8))) to
the taskstats structure members so that 32 bit applications using taskstats
can work with a 64 bit kernel.

Using __attribute__((packed)) would break the 64 bit alignment of members.

The fix was tested on x86_64. After the fix, we got

Offsets of taskstats' members (64 bit kernel, 64 bit application)

@taskstats'[EMAIL PROTECTED]'indices] = (
0,  # version
4,  # ac_exitcode
8,  # ac_flag
9,  # ac_nice
16, # cpu_count
24, # cpu_delay_total
32, # blkio_count
40, # blkio_delay_total
48, # swapin_count
56, # swapin_delay_total
64, # cpu_run_real_total
72, # cpu_run_virtual_total
80, # ac_comm
112,# ac_sched
113,# ac_pad
120,# ac_uid
124,# ac_gid
128,# ac_pid
132,# ac_ppid
136,# ac_btime
144,# ac_etime
152,# ac_utime
160,# ac_stime
168,# ac_minflt
176,# ac_majflt
184,# coremem
192,# virtmem
200,# hiwater_rss
208,# hiwater_vm
216,# read_char
224,# write_char
232,# read_syscalls

MAINTAINERS: use lists.linux-foundation.org

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f318a63ba018d1f30521b733e86fc2d0207e496b
Commit: f318a63ba018d1f30521b733e86fc2d0207e496b
Parent: 7e40f2ab0a7e36706ee78b78b3792f08f208cd44
Author: David Brownell [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:06 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

MAINTAINERS: use lists.linux-foundation.org

Update various mailing list addresses to use lists.linux-foundation.org
instead of lists.osdl.org, to help phase out the old addresses.

Signed-off-by: David Brownell [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 MAINTAINERS |   12 ++--
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index ef84419..11bf15a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1318,7 +1318,7 @@ S:Maintained
 ETHERNET BRIDGE
 P: Stephen Hemminger
 M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
 W: http://bridge.sourceforge.net/
 S: Maintained
 
@@ -1951,7 +1951,7 @@ P:Vivek Goyal
 M: [EMAIL PROTECTED]
 P: Haren Myneni
 M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
 W: http://lse.sourceforge.net/kdump/
 S: Maintained
@@ -1978,7 +1978,7 @@ S:Maintained
 
 KERNEL JANITORS
 P: Several
-L: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
 W: http://www.kerneljanitors.org/
 S: Maintained
 
@@ -2001,7 +2001,7 @@ P:Eric Biederman
 M: [EMAIL PROTECTED]
 W: http://www.xmission.com/~ebiederm/files/kexec/
 L: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
 S: Maintained
 
 KPROBES
@@ -2339,7 +2339,7 @@ S:Maintained
 NETEM NETWORK EMULATOR
 P: Stephen Hemminger
 M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
 S: Maintained
 
 NETFILTER/IPTABLES/IPCHAINS
@@ -3068,7 +3068,7 @@ S:Supported
 SOFTWARE SUSPEND:
 P: Pavel Machek
 M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
+L: [EMAIL PROTECTED]
 S: Maintained
 
 SONIC NETWORK DRIVER
-
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


Add mbuesch to .mailmap

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=39a3bfdd3779636018ca0e2b8fe0a32378eed67b
Commit: 39a3bfdd3779636018ca0e2b8fe0a32378eed67b
Parent: 671d40f4aa20d31121695e33393c9bd87053f4fa
Author: Michael Buesch [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:08 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

Add mbuesch to .mailmap

Signed-off-by: Michael Buesch [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 .mailmap |2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/.mailmap b/.mailmap
index bf62dbe..ebf9bf8 100644
--- a/.mailmap
+++ b/.mailmap
@@ -67,6 +67,8 @@ Koushik [EMAIL PROTECTED]
 Leonid I Ananiev [EMAIL PROTECTED]
 Linas Vepstas [EMAIL PROTECTED]
 Matthieu CASTET [EMAIL PROTECTED]
+Michael Buesch [EMAIL PROTECTED]
+Michael Buesch [EMAIL PROTECTED]
 Michel Dänzer [EMAIL PROTECTED]
 Mitesh shah [EMAIL PROTECTED]
 Morten Welinder [EMAIL PROTECTED]
-
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 spelling in drivers/video/Kconfig

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=10ccaf4b7121fb839442be7e079baa8fd0b28caf
Commit: 10ccaf4b7121fb839442be7e079baa8fd0b28caf
Parent: 39a3bfdd3779636018ca0e2b8fe0a32378eed67b
Author: Miguel Ojeda [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:09 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

Fix spelling in drivers/video/Kconfig

Signed-off-by: Miguel Ojeda Sandonis [EMAIL PROTECTED]
Cc: Antonino A. Daplas [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/video/Kconfig |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index e4f0dd0..8372ace 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -139,7 +139,7 @@ config FB_TILEBLITTING
 This is particularly important to one driver, matroxfb.  If
 unsure, say N.
 
-comment Frambuffer hardware drivers
+comment Frame buffer hardware drivers
depends on FB
 
 config FB_CIRRUS
-
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


page migration: fix NR_FILE_PAGES accounting

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0e8c7d0fd5b4999675c7d5cd95d0eb7106b756b3
Commit: 0e8c7d0fd5b4999675c7d5cd95d0eb7106b756b3
Parent: 10ccaf4b7121fb839442be7e079baa8fd0b28caf
Author: Christoph Lameter [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:09 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

page migration: fix NR_FILE_PAGES accounting

NR_FILE_PAGES must be accounted for depending on the zone that the page
belongs to.  If we replace the page in the radix tree then we may have to
shift the count to another zone.

Suggested-by: Ethan Solomita [EMAIL PROTECTED]
Eventually-typed-in-by: Christoph Lameter [EMAIL PROTECTED]
Cc: Martin Bligh [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Signed-off-by: Christoph Lameter [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 mm/migrate.c |   15 ++-
 1 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/mm/migrate.c b/mm/migrate.c
index 7a66ca2..a91ca00 100644
--- a/mm/migrate.c
+++ b/mm/migrate.c
@@ -297,7 +297,7 @@ static int migrate_page_move_mapping(struct address_space 
*mapping,
void **pslot;
 
if (!mapping) {
-   /* Anonymous page */
+   /* Anonymous page without mapping */
if (page_count(page) != 1)
return -EAGAIN;
return 0;
@@ -333,6 +333,19 @@ static int migrate_page_move_mapping(struct address_space 
*mapping,
 */
__put_page(page);
 
+   /*
+* If moved to a different zone then also account
+* the page for that zone. Other VM counters will be
+* taken care of when we establish references to the
+* new page and drop references to the old page.
+*
+* Note that anonymous pages are accounted for
+* via NR_FILE_PAGES and NR_ANON_PAGES if they
+* are mapped to swap space.
+*/
+   __dec_zone_page_state(page, NR_FILE_PAGES);
+   __inc_zone_page_state(newpage, NR_FILE_PAGES);
+
write_unlock_irq(mapping-tree_lock);
 
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


ieee1394: update MAINTAINERS database

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f51a5a9de86a948b9a30daab90fb003f51446dcd
Commit: f51a5a9de86a948b9a30daab90fb003f51446dcd
Parent: 0e8c7d0fd5b4999675c7d5cd95d0eb7106b756b3
Author: Stefan Richter [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:10 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

ieee1394: update MAINTAINERS database

  - update Ben's address
  - replace Ben's contact by mine as raw1394's 2nd contact
  - eth1394's and pcilynx's maintenance doesn't really differ from that
of other parts of the stack like video1394

Signed-off-by: Stefan Richter [EMAIL PROTECTED]
Acked-by: Ben Collins [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 MAINTAINERS |   22 --
 1 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 11bf15a..6722c37 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1690,7 +1690,7 @@ S:Maintained
 
 IEEE 1394 SUBSYSTEM
 P: Ben Collins
-M: [EMAIL PROTECTED]
+M: [EMAIL PROTECTED]
 P: Stefan Richter
 M: [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
@@ -1698,25 +1698,11 @@ W:  http://www.linux1394.org/
 T: git kernel.org:/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6.git
 S: Maintained
 
-IEEE 1394 IPV4 DRIVER (eth1394)
-P: Stefan Richter
-M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
-S: Odd Fixes
-
-IEEE 1394 PCILYNX DRIVER
-P: Jody McIntyre
-M: [EMAIL PROTECTED]
-P: Stefan Richter
-M: [EMAIL PROTECTED]
-L: [EMAIL PROTECTED]
-S: Odd Fixes
-
-IEEE 1394 RAW I/O DRIVER
-P: Ben Collins
-M: [EMAIL PROTECTED]
+IEEE 1394 RAW I/O DRIVER (raw1394)
 P: Dan Dennedy
 M: [EMAIL PROTECTED]
+P: Stefan Richter
+M: [EMAIL PROTECTED]
 L: [EMAIL PROTECTED]
 S: Maintained
 
-
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


v9fs: don't use primary fid when removing file

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c959df9f01cfb2f43b4d1f58631ee1e9c50541b6
Commit: c959df9f01cfb2f43b4d1f58631ee1e9c50541b6
Parent: f51a5a9de86a948b9a30daab90fb003f51446dcd
Author: Latchesar Ionkov [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:11 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

v9fs: don't use primary fid when removing file

v9fs_insert uses v9fs_fid_lookup (which also locks the fid) to get the
primary fid associated with the dentry and destroys the v9fs_fid struct
after removing the file.  If another process called v9fs_fid_lookup on the
same dentry, it may wait undefinitely for the fid's lock (as the struct is
freed).

This patch changes v9fs_remove to use a cloned fid, so the primary fid is
not locked and freed.

Signed-off-by: Latchesar Ionkov [EMAIL PROTECTED]
Cc: Eric Van Hensbergen [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/9p/vfs_inode.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 124a085..b01b0a4 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -415,7 +415,7 @@ static int v9fs_remove(struct inode *dir, struct dentry 
*file, int rmdir)
file_inode = file-d_inode;
sb = file_inode-i_sb;
v9ses = v9fs_inode2v9ses(file_inode);
-   v9fid = v9fs_fid_lookup(file);
+   v9fid = v9fs_fid_clone(file);
if(IS_ERR(v9fid))
return PTR_ERR(v9fid);
 
-
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


acpi-thermal: fix mod_timer() interval

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=94e22e13ad063c614b458a019b428ffc118e5c06
Commit: 94e22e13ad063c614b458a019b428ffc118e5c06
Parent: c959df9f01cfb2f43b4d1f58631ee1e9c50541b6
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:13 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

acpi-thermal: fix mod_timer() interval

Use relative time, not absolute.  Discovered by Jung-Ik (John) Lee
[EMAIL PROTECTED].

Cc: Jung-Ik (John) Lee [EMAIL PROTECTED]
Acked-by: Len Brown [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/acpi/thermal.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c
index 0ae8b93..589b98b 100644
--- a/drivers/acpi/thermal.c
+++ b/drivers/acpi/thermal.c
@@ -758,7 +758,8 @@ static void acpi_thermal_check(void *data)
del_timer((tz-timer));
} else {
if (timer_pending((tz-timer)))
-   mod_timer((tz-timer), (HZ * sleep_time) / 1000);
+   mod_timer((tz-timer),
+   jiffies + (HZ * sleep_time) / 1000);
else {
tz-timer.data = (unsigned long)tz;
tz-timer.function = acpi_thermal_run;
-
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


Allow reading tainted flag as user

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=91fcd412e957f433e9f1abeb0b1926dbeb66ca80
Commit: 91fcd412e957f433e9f1abeb0b1926dbeb66ca80
Parent: 94e22e13ad063c614b458a019b428ffc118e5c06
Author: Bastian Blank [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:14 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

Allow reading tainted flag as user

The commit 34f5a39899f3f3e815da64f48ddb72942d86c366 restricted reading
of the tainted value. The attached patch changes this back to a
write-only check and restores the read behaviour of older versions.

Signed-off-by: Bastian Blank [EMAIL PROTECTED]
Cc: Theodore Ts'o [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 kernel/sysctl.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/kernel/sysctl.c b/kernel/sysctl.c
index 1b255df..c904748 100644
--- a/kernel/sysctl.c
+++ b/kernel/sysctl.c
@@ -1676,7 +1676,7 @@ static int proc_dointvec_taint(ctl_table *table, int 
write, struct file *filp,
 {
int op;
 
-   if (!capable(CAP_SYS_ADMIN))
+   if (write  !capable(CAP_SYS_ADMIN))
return -EPERM;
 
op = OP_OR;
-
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


do not truncate irq number for icom adapter

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=179fb0c726fa34a1ecbb9385a01c704babb9c0ab
Commit: 179fb0c726fa34a1ecbb9385a01c704babb9c0ab
Parent: 91fcd412e957f433e9f1abeb0b1926dbeb66ca80
Author: Olaf Hering [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:15 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

do not truncate irq number for icom adapter

irq values are u32, not u8. Large irq numbers will be truncated,
free_irq may free a different irq.

Remove incorrectly sized struct member and use the one from pci_dev.

Signed-off-by: Olaf Hering [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/icom.c |5 ++---
 drivers/serial/icom.h |1 -
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index 41431d0..d7aaf76 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -1473,7 +1473,7 @@ static void icom_remove_adapter(struct icom_adapter 
*icom_adapter)
}
}
 
-   free_irq(icom_adapter-irq_number, (void *) icom_adapter);
+   free_irq(icom_adapter-pci_dev-irq, (void *) icom_adapter);
iounmap(icom_adapter-base_addr);
icom_free_adapter(icom_adapter);
pci_release_regions(icom_adapter-pci_dev);
@@ -1539,7 +1539,6 @@ static int __devinit icom_probe(struct pci_dev *dev,
}
 
 icom_adapter-base_addr_pci = pci_resource_start(dev, 0);
-icom_adapter-irq_number = dev-irq;
 icom_adapter-pci_dev = dev;
 icom_adapter-version = ent-driver_data;
 icom_adapter-subsystem_id = ent-subdevice;
@@ -1570,7 +1569,7 @@ static int __devinit icom_probe(struct pci_dev *dev,
icom_port = icom_adapter-port_info[index];
 
if (icom_port-status == ICOM_PORT_ACTIVE) {
-   icom_port-uart_port.irq = 
icom_port-adapter-irq_number;
+   icom_port-uart_port.irq = 
icom_port-adapter-pci_dev-irq;
icom_port-uart_port.type = PORT_ICOM;
icom_port-uart_port.iotype = UPIO_MEM;
icom_port-uart_port.membase =
diff --git a/drivers/serial/icom.h b/drivers/serial/icom.h
index 798f1ef..e8578d8 100644
--- a/drivers/serial/icom.h
+++ b/drivers/serial/icom.h
@@ -258,7 +258,6 @@ struct icom_port {
 struct icom_adapter {
void __iomem * base_addr;
unsigned long base_addr_pci;
-   unsigned char irq_number;
struct pci_dev *pci_dev;
struct icom_port port_info[4];
int index;
-
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


hwmon/w83627ehf: Don't redefine REGION_OFFSET

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=1a641fceb6bb6b0930db1aadbda1aaf5711d65d6
Commit: 1a641fceb6bb6b0930db1aadbda1aaf5711d65d6
Parent: 179fb0c726fa34a1ecbb9385a01c704babb9c0ab
Author: Jean Delvare [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:16 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:08 2007 -0700

hwmon/w83627ehf: Don't redefine REGION_OFFSET

On ia64, kernel headers define REGION_OFFSET so we can't use that.
Reported by Andrew Morton.

Signed-off-by: Jean Delvare [EMAIL PROTECTED]
Acked-by: David Hubbard [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/hwmon/w83627ehf.c |   14 +++---
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/hwmon/w83627ehf.c b/drivers/hwmon/w83627ehf.c
index 01206eb..30a7640 100644
--- a/drivers/hwmon/w83627ehf.c
+++ b/drivers/hwmon/w83627ehf.c
@@ -121,9 +121,9 @@ superio_exit(void)
  * ISA constants
  */
 
-#define REGION_ALIGNMENT   ~7
-#define REGION_OFFSET  5
-#define REGION_LENGTH  2
+#define IOREGION_ALIGNMENT ~7
+#define IOREGION_OFFSET5
+#define IOREGION_LENGTH2
 #define ADDR_REG_OFFSET5
 #define DATA_REG_OFFSET6
 
@@ -1194,7 +1194,7 @@ static int w83627ehf_detect(struct i2c_adapter *adapter)
u8 fan4pin, fan5pin;
int i, err = 0;
 
-   if (!request_region(address + REGION_OFFSET, REGION_LENGTH,
+   if (!request_region(address + IOREGION_OFFSET, IOREGION_LENGTH,
w83627ehf_driver.driver.name)) {
err = -EBUSY;
goto exit;
@@ -1322,7 +1322,7 @@ exit_remove:
 exit_free:
kfree(data);
 exit_release:
-   release_region(address + REGION_OFFSET, REGION_LENGTH);
+   release_region(address + IOREGION_OFFSET, IOREGION_LENGTH);
 exit:
return err;
 }
@@ -1337,7 +1337,7 @@ static int w83627ehf_detach_client(struct i2c_client 
*client)
 
if ((err = i2c_detach_client(client)))
return err;
-   release_region(client-addr + REGION_OFFSET, REGION_LENGTH);
+   release_region(client-addr + IOREGION_OFFSET, IOREGION_LENGTH);
kfree(data);
 
return 0;
@@ -1380,7 +1380,7 @@ static int __init w83627ehf_find(int sioaddr, unsigned 
short *addr)
superio_select(W83627EHF_LD_HWM);
val = (superio_inb(SIO_REG_ADDR)  8)
| superio_inb(SIO_REG_ADDR + 1);
-   *addr = val  REGION_ALIGNMENT;
+   *addr = val  IOREGION_ALIGNMENT;
if (*addr == 0) {
superio_exit();
return -ENODEV;
-
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


reiserfs: fix xattr root locking/refcount bug

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9b7f375505f5611efb562065b57814b28a81abc3
Commit: 9b7f375505f5611efb562065b57814b28a81abc3
Parent: 1a641fceb6bb6b0930db1aadbda1aaf5711d65d6
Author: Jeff Mahoney [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:17 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:09 2007 -0700

reiserfs: fix xattr root locking/refcount bug

The listxattr() and getxattr() operations are only protected by a read
lock.  As a result, if either of these operations run in parallel, a race
condition exists where the xattr_root will end up being cached twice, which
results in the leaking of a reference and a BUG() on umount.

This patch refactors get_xa_root(), __get_xa_root(), and create_xa_root(),
into one get_xa_root() function that takes the appropriate locking around
the entire critical section.

Reported, diagnosed and tested by Andrea Righi [EMAIL PROTECTED]

Signed-off-by: Jeff Mahoney [EMAIL PROTECTED]
Cc: Andrea Righi [EMAIL PROTECTED]
Cc: Vladimir V. Saveliev [EMAIL PROTECTED]
Cc: Edward Shishkin [EMAIL PROTECTED]
Cc: Alex Zarochentsev [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 fs/reiserfs/xattr.c |   92 +-
 1 files changed, 24 insertions(+), 68 deletions(-)

diff --git a/fs/reiserfs/xattr.c b/fs/reiserfs/xattr.c
index f01389f..c8178b7 100644
--- a/fs/reiserfs/xattr.c
+++ b/fs/reiserfs/xattr.c
@@ -54,82 +54,48 @@
 static struct reiserfs_xattr_handler *find_xattr_handler_prefix(const char
*prefix);
 
-static struct dentry *create_xa_root(struct super_block *sb)
+/* Returns the dentry referring to the root of the extended attribute
+ * directory tree. If it has already been retrieved, it is used. If it
+ * hasn't been created and the flags indicate creation is allowed, we
+ * attempt to create it. On error, we return a pointer-encoded error.
+ */
+static struct dentry *get_xa_root(struct super_block *sb, int flags)
 {
struct dentry *privroot = dget(REISERFS_SB(sb)-priv_root);
struct dentry *xaroot;
 
/* This needs to be created at mount-time */
if (!privroot)
-   return ERR_PTR(-EOPNOTSUPP);
+   return ERR_PTR(-ENODATA);
 
-   xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME));
-   if (IS_ERR(xaroot)) {
+   mutex_lock(privroot-d_inode-i_mutex);
+   if (REISERFS_SB(sb)-xattr_root) {
+   xaroot = dget(REISERFS_SB(sb)-xattr_root);
goto out;
-   } else if (!xaroot-d_inode) {
-   int err;
-   mutex_lock(privroot-d_inode-i_mutex);
-   err =
-   privroot-d_inode-i_op-mkdir(privroot-d_inode, xaroot,
-  0700);
-   mutex_unlock(privroot-d_inode-i_mutex);
-
-   if (err) {
-   dput(xaroot);
-   dput(privroot);
-   return ERR_PTR(err);
-   }
-   REISERFS_SB(sb)-xattr_root = dget(xaroot);
}
 
-  out:
-   dput(privroot);
-   return xaroot;
-}
-
-/* This will return a dentry, or error, refering to the xa root directory.
- * If the xa root doesn't exist yet, the dentry will be returned without
- * an associated inode. This dentry can be used with -mkdir to create
- * the xa directory. */
-static struct dentry *__get_xa_root(struct super_block *s)
-{
-   struct dentry *privroot = dget(REISERFS_SB(s)-priv_root);
-   struct dentry *xaroot = NULL;
-
-   if (IS_ERR(privroot) || !privroot)
-   return privroot;
-
xaroot = lookup_one_len(XAROOT_NAME, privroot, strlen(XAROOT_NAME));
if (IS_ERR(xaroot)) {
goto out;
} else if (!xaroot-d_inode) {
-   dput(xaroot);
-   xaroot = NULL;
-   goto out;
+   int err = -ENODATA;
+   if (flags == 0 || flags  XATTR_CREATE)
+   err = privroot-d_inode-i_op-mkdir(privroot-d_inode,
+xaroot, 0700);
+   if (err) {
+   dput(xaroot);
+   xaroot = ERR_PTR(err);
+   goto out;
+   }
}
-
-   REISERFS_SB(s)-xattr_root = dget(xaroot);
+   REISERFS_SB(sb)-xattr_root = dget(xaroot);
 
   out:
+   mutex_unlock(privroot-d_inode-i_mutex);
dput(privroot);
return xaroot;
 }
 
-/* Returns the dentry (or NULL) referring to the root of the extended
- * attribute directory tree. If it has already been retrieved, it is used.
- * Otherwise, we attempt 

Char: icom, mark __init as __devinit

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=98f85d30ced96ac466f30419de8b3fac341ebe75
Commit: 98f85d30ced96ac466f30419de8b3fac341ebe75
Parent: 9b7f375505f5611efb562065b57814b28a81abc3
Author: Jiri Slaby [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:20 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:09 2007 -0700

Char: icom, mark __init as __devinit

Two functions are called from __devinit context, but they are marked as
__init. Fix this.

Signed-off-by: Jiri Slaby [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/icom.c |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/icom.c b/drivers/serial/icom.c
index d7aaf76..246c557 100644
--- a/drivers/serial/icom.c
+++ b/drivers/serial/icom.c
@@ -164,7 +164,7 @@ static void free_port_memory(struct icom_port *icom_port)
}
 }
 
-static int __init get_port_memory(struct icom_port *icom_port)
+static int __devinit get_port_memory(struct icom_port *icom_port)
 {
int index;
unsigned long stgAddr;
@@ -1380,7 +1380,7 @@ static void icom_port_active(struct icom_port *icom_port, 
struct icom_adapter *i
0x8024 + 2 - 2 * (icom_port-port - 2);
}
 }
-static int __init icom_load_ports(struct icom_adapter *icom_adapter)
+static int __devinit icom_load_ports(struct icom_adapter *icom_adapter)
 {
struct icom_port *icom_port;
int port_num;
-
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


fault injection: add entry to MAINTAINERS

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c5408b88ecb8b7127334a34c55d4e0174434f4ec
Commit: c5408b88ecb8b7127334a34c55d4e0174434f4ec
Parent: 98f85d30ced96ac466f30419de8b3fac341ebe75
Author: Akinobu Mita [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:20 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:09 2007 -0700

fault injection: add entry to MAINTAINERS

Add maintainer for fault injection support.

Signed-off-by: Akinobu Mita [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 MAINTAINERS |5 +
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6722c37..277877a 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1355,6 +1355,11 @@ M:   [EMAIL PROTECTED]
 W: http://www.farsite.co.uk/
 S: Supported
 
+FAULT INJECTION SUPPORT
+P: Akinobu Mita
+M: [EMAIL PROTECTED]
+S: Supported
+
 FRAMEBUFFER LAYER
 P: Antonino Daplas
 M: [EMAIL PROTECTED]
-
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


8250: fix possible deadlock between serial8250_handle_port() and serial8250_interrupt()

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4bf3631cdb012591667ab927fcd7719d92837833
Commit: 4bf3631cdb012591667ab927fcd7719d92837833
Parent: c5408b88ecb8b7127334a34c55d4e0174434f4ec
Author: Jiri Kosina [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 14:41:21 2007 -0700
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 08:23:09 2007 -0700

8250: fix possible deadlock between serial8250_handle_port() and 
serial8250_interrupt()

Commit 40b36daa introduced possibility that serial8250_backup_timeout() -
serial8250_handle_port() locks port.lock without disabling irqs, thus
allowing deadlock against interrupt handler (port.lock is acquired in
serial8250_interrupt()).

Spotted by lockdep.

Signed-off-by: Jiri Kosina [EMAIL PROTECTED]
Cc: Dave Jones [EMAIL PROTECTED]
Cc: Russell King [EMAIL PROTECTED]
Cc: Alex Williamson [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 drivers/serial/8250.c |5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c
index c0c472a..90621c3 100644
--- a/drivers/serial/8250.c
+++ b/drivers/serial/8250.c
@@ -1334,8 +1334,9 @@ static inline void
 serial8250_handle_port(struct uart_8250_port *up)
 {
unsigned int status;
+   unsigned long flags;
 
-   spin_lock(up-port.lock);
+   spin_lock_irqsave(up-port.lock, flags);
 
status = serial_inp(up, UART_LSR);
 
@@ -1347,7 +1348,7 @@ serial8250_handle_port(struct uart_8250_port *up)
if (status  UART_LSR_THRE)
transmit_chars(up);
 
-   spin_unlock(up-port.lock);
+   spin_unlock_irqrestore(up-port.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


[PATCH] x86: Remove noreplacement option

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=9ce883becb83190061369940de9c415595836c9b
Commit: 9ce883becb83190061369940de9c415595836c9b
Parent: cf6387daf8858bdcb3e123034ca422e8979d73f1
Author: Andi Kleen [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 13:05:37 2007 +0200
Committer:  Andi Kleen [EMAIL PROTECTED]
CommitDate: Tue Apr 24 13:05:37 2007 +0200

[PATCH] x86: Remove noreplacement option

noreplacement is dangerous on modern systems because it will not replace the
context switch FNSAVE with SSE aware FXSAVE. But other places in the kernel 
still assume
SSE and do FXSAVE and the CPU will then access FXSAVE information with
FNSAVE and cause corruption.

Easiest way to avoid this is to remove the option. It was mostly for 
paranoia
reasons anyways and alternative()s have been stable for some time.

Thanks to Jeremy F. for reporting and helping debug it.

Signed-off-by: Andi Kleen [EMAIL PROTECTED]
---
 Documentation/x86_64/boot-options.txt |4 
 arch/i386/kernel/alternative.c|   21 ++---
 2 files changed, 2 insertions(+), 23 deletions(-)

diff --git a/Documentation/x86_64/boot-options.txt 
b/Documentation/x86_64/boot-options.txt
index 625a21d..85f51e5 100644
--- a/Documentation/x86_64/boot-options.txt
+++ b/Documentation/x86_64/boot-options.txt
@@ -293,7 +293,3 @@ Debugging
stuck (default)
 
 Miscellaneous
-
-  noreplacement  Don't replace instructions with more appropriate ones
-for the CPU. This may be useful on asymmetric MP systems
-where some CPUs have less capabilities than others.
diff --git a/arch/i386/kernel/alternative.c b/arch/i386/kernel/alternative.c
index 9eca21b..426f59b 100644
--- a/arch/i386/kernel/alternative.c
+++ b/arch/i386/kernel/alternative.c
@@ -5,15 +5,9 @@
 #include asm/alternative.h
 #include asm/sections.h
 
-static int no_replacement= 0;
 static int smp_alt_once  = 0;
 static int debug_alternative = 0;
 
-static int __init noreplacement_setup(char *s)
-{
-   no_replacement = 1;
-   return 1;
-}
 static int __init bootonly(char *str)
 {
smp_alt_once = 1;
@@ -25,7 +19,6 @@ static int __init debug_alt(char *str)
return 1;
 }
 
-__setup(noreplacement, noreplacement_setup);
 __setup(smp-alt-boot, bootonly);
 __setup(debug-alternative, debug_alt);
 
@@ -252,9 +245,6 @@ void alternatives_smp_module_add(struct module *mod, char 
*name,
struct smp_alt_module *smp;
unsigned long flags;
 
-   if (no_replacement)
-   return;
-
if (smp_alt_once) {
if (boot_cpu_has(X86_FEATURE_UP))
alternatives_smp_unlock(locks, locks_end,
@@ -289,7 +279,7 @@ void alternatives_smp_module_del(struct module *mod)
struct smp_alt_module *item;
unsigned long flags;
 
-   if (no_replacement || smp_alt_once)
+   if (smp_alt_once)
return;
 
spin_lock_irqsave(smp_alt, flags);
@@ -320,7 +310,7 @@ void alternatives_smp_switch(int smp)
return;
 #endif
 
-   if (no_replacement || smp_alt_once)
+   if (smp_alt_once)
return;
BUG_ON(!smp  (num_online_cpus()  1));
 
@@ -386,13 +376,6 @@ extern struct paravirt_patch __start_parainstructions[],
 void __init alternative_instructions(void)
 {
unsigned long flags;
-   if (no_replacement) {
-   printk(KERN_INFO (SMP-)alternatives turned off\n);
-   free_init_pages(SMP alternatives,
-   (unsigned long)__smp_alt_begin,
-   (unsigned long)__smp_alt_end);
-   return;
-   }
 
local_irq_save(flags);
apply_alternatives(__alt_instructions, __alt_instructions_end);
-
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


Revert adjust legacy IDE resource setting (v2)

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=01abc2aa0f447bce2f6beb06dd0607ba0f01c5bb
Commit: 01abc2aa0f447bce2f6beb06dd0607ba0f01c5bb
Parent: c445a31cd7f469d77acc37538ab43a99530968b8
Author: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 23:19:36 2007 +0200
Committer:  Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
CommitDate: Mon Apr 23 23:19:36 2007 +0200

Revert adjust legacy IDE resource setting (v2)

This reverts commit ed8ccee0918ad063a4741c0656fda783e02df627.

It causes hang on boot for some users and we don't yet know why:

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

http://lkml.org/lkml/2007/4/20/404
http://lkml.org/lkml/2007/3/25/113

Just reverse it for 2.6.21-final, having broken X server is somehow
better than unbootable system.

Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
---
 drivers/pci/probe.c |   45 +
 1 files changed, 13 insertions(+), 32 deletions(-)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index a4a9682..2fe1d69 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -682,34 +682,7 @@ static void pci_read_irq(struct pci_dev *dev)
dev-irq = irq;
 }
 
-static void change_legacy_io_resource(struct pci_dev * dev, unsigned index,
-  unsigned start, unsigned end)
-{
-   unsigned base = start  PCI_BASE_ADDRESS_IO_MASK;
-   unsigned len = (end | ~PCI_BASE_ADDRESS_IO_MASK) - base + 1;
-
-   /*
-* Some X versions get confused when the BARs reported through
-* /sys or /proc differ from those seen in config space, thus
-* try to update the config space values, too.
-*/
-   if (!(pci_resource_flags(dev, index)  IORESOURCE_IO))
-   printk(KERN_WARNING %s: cannot adjust BAR%u (not I/O)\n,
-  pci_name(dev), index);
-   else if (pci_resource_len(dev, index) != len)
-   printk(KERN_WARNING %s: cannot adjust BAR%u (size %04X)\n,
-  pci_name(dev), index, (unsigned)pci_resource_len(dev, 
index));
-   else {
-   printk(KERN_INFO %s: trying to change BAR%u from %04X to 
%04X\n,
-  pci_name(dev), index,
-  (unsigned)pci_resource_start(dev, index), base);
-   pci_write_config_dword(dev, PCI_BASE_ADDRESS_0 + index * 4, 
base);
-   }
-   pci_resource_start(dev, index) = start;
-   pci_resource_end(dev, index)   = end;
-   pci_resource_flags(dev, index) =
-   IORESOURCE_IO | IORESOURCE_PCI_FIXED | 
PCI_BASE_ADDRESS_SPACE_IO;
-}
+#define LEGACY_IO_RESOURCE (IORESOURCE_IO | IORESOURCE_PCI_FIXED)
 
 /**
  * pci_setup_device - fill in class and map information of a device
@@ -762,12 +735,20 @@ static int pci_setup_device(struct pci_dev * dev)
u8 progif;
pci_read_config_byte(dev, PCI_CLASS_PROG, progif);
if ((progif  1) == 0) {
-   change_legacy_io_resource(dev, 0, 0x1F0, 0x1F7);
-   change_legacy_io_resource(dev, 1, 0x3F6, 0x3F6);
+   dev-resource[0].start = 0x1F0;
+   dev-resource[0].end = 0x1F7;
+   dev-resource[0].flags = LEGACY_IO_RESOURCE;
+   dev-resource[1].start = 0x3F6;
+   dev-resource[1].end = 0x3F6;
+   dev-resource[1].flags = LEGACY_IO_RESOURCE;
}
if ((progif  4) == 0) {
-   change_legacy_io_resource(dev, 2, 0x170, 0x177);
-   change_legacy_io_resource(dev, 3, 0x376, 0x376);
+   dev-resource[2].start = 0x170;
+   dev-resource[2].end = 0x177;
+   dev-resource[2].flags = LEGACY_IO_RESOURCE;
+   dev-resource[3].start = 0x376;
+   dev-resource[3].end = 0x376;
+   dev-resource[3].flags = LEGACY_IO_RESOURCE;
}
}
break;
-
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


[PATCH] x86-64: make GART PTEs uncacheable

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cf6387daf8858bdcb3e123034ca422e8979d73f1
Commit: cf6387daf8858bdcb3e123034ca422e8979d73f1
Parent: c445a31cd7f469d77acc37538ab43a99530968b8
Author: Joachim Deguara [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 13:05:36 2007 +0200
Committer:  Andi Kleen [EMAIL PROTECTED]
CommitDate: Tue Apr 24 13:05:36 2007 +0200

[PATCH] x86-64: make GART PTEs uncacheable

This patches fixes the silent data corruption problems being seen using the
GART iommu where 4kB of data where incorrect (seen mostly on Nvidia CK804
systems).  This fix, to mark the memory regin the GART PTEs reside on as
uncacheable, also brings the code in line with the AGP specification.

Signed-off-by: Joachim Deguara [EMAIL PROTECTED]
Signed-off-by: Andi Kleen [EMAIL PROTECTED]
---
 arch/x86_64/kernel/pci-gart.c |6 +-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/x86_64/kernel/pci-gart.c b/arch/x86_64/kernel/pci-gart.c
index 2bac8c6..0bae862 100644
--- a/arch/x86_64/kernel/pci-gart.c
+++ b/arch/x86_64/kernel/pci-gart.c
@@ -519,7 +519,11 @@ static __init int init_k8_gatt(struct agp_kern_info *info)
gatt_size = (aper_size  PAGE_SHIFT) * sizeof(u32); 
gatt = (void *)__get_free_pages(GFP_KERNEL, get_order(gatt_size)); 
if (!gatt) 
-   panic(Cannot allocate GATT table); 
+   panic(Cannot allocate GATT table);
+   if (change_page_attr_addr((unsigned long)gatt, gatt_size  PAGE_SHIFT, 
PAGE_KERNEL_NOCACHE))
+   panic(Could not set GART PTEs to uncacheable pages);
+   global_flush_tlb();
+
memset(gatt, 0, gatt_size); 
agp_gatt_table = gatt;
 
-
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


[PATCH] x86-64: Always flush all pages in change_page_attr

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=90767bd13febfdf8a5f5077e2bb975f79d6b919c
Commit: 90767bd13febfdf8a5f5077e2bb975f79d6b919c
Parent: 9ce883becb83190061369940de9c415595836c9b
Author: Andi Kleen [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 13:05:37 2007 +0200
Committer:  Andi Kleen [EMAIL PROTECTED]
CommitDate: Tue Apr 24 13:05:37 2007 +0200

[PATCH] x86-64: Always flush all pages in change_page_attr

change_page_attr on x86-64 only flushed the TLB for pages that got
reverted. That's not correct: it has to be flushed in all cases.

This bug was added in some earlier changes.

Just flush all pages for now.

This could be done more efficiently, but for this late in the release
this seem to be the best fix.

Pointed out by Jan Beulich

Signed-off-by: Andi Kleen [EMAIL PROTECTED]
---
 arch/x86_64/mm/pageattr.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86_64/mm/pageattr.c b/arch/x86_64/mm/pageattr.c
index 65c5eaa..081409a 100644
--- a/arch/x86_64/mm/pageattr.c
+++ b/arch/x86_64/mm/pageattr.c
@@ -81,8 +81,8 @@ static void flush_kernel_map(void *arg)
void *adr = page_address(pg);
if (cpu_has_clflush)
cache_flush_page(adr);
-   __flush_tlb_one(adr);
}
+   __flush_tlb_all();
 }
 
 static inline void flush_map(struct list_head *l)
-
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


[PATCH] i386: Fix some warnings added by earlier patch

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=8689b517be3e3f65f8ba20490beccca13c5879fa
Commit: 8689b517be3e3f65f8ba20490beccca13c5879fa
Parent: 90767bd13febfdf8a5f5077e2bb975f79d6b919c
Author: Andi Kleen [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 13:05:37 2007 +0200
Committer:  Andi Kleen [EMAIL PROTECTED]
CommitDate: Tue Apr 24 13:05:37 2007 +0200

[PATCH] i386: Fix some warnings added by earlier patch

Signed-off-by: Andi Kleen [EMAIL PROTECTED]
---
 arch/i386/kernel/nmi.c |8 
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/i386/kernel/nmi.c b/arch/i386/kernel/nmi.c
index 9f1e8c1..84c3497 100644
--- a/arch/i386/kernel/nmi.c
+++ b/arch/i386/kernel/nmi.c
@@ -126,7 +126,7 @@ int avail_to_resrv_perfctr_nmi_bit(unsigned int counter)
int cpu;
BUG_ON(counter  NMI_MAX_COUNTER_BITS);
for_each_possible_cpu (cpu) {
-   if (test_bit(counter, per_cpu(perfctr_nmi_owner, cpu)))
+   if (test_bit(counter, per_cpu(perfctr_nmi_owner, cpu)[0]))
return 0;
}
return 1;
@@ -142,7 +142,7 @@ int avail_to_resrv_perfctr_nmi(unsigned int msr)
BUG_ON(counter  NMI_MAX_COUNTER_BITS);
 
for_each_possible_cpu (cpu) {
-   if (test_bit(counter, per_cpu(perfctr_nmi_owner, cpu)))
+   if (test_bit(counter, per_cpu(perfctr_nmi_owner, cpu)[0]))
return 0;
}
return 1;
@@ -157,7 +157,7 @@ static int __reserve_perfctr_nmi(int cpu, unsigned int msr)
counter = nmi_perfctr_msr_to_bit(msr);
BUG_ON(counter  NMI_MAX_COUNTER_BITS);
 
-   if (!test_and_set_bit(counter, per_cpu(perfctr_nmi_owner, cpu)))
+   if (!test_and_set_bit(counter, per_cpu(perfctr_nmi_owner, cpu)[0]))
return 1;
return 0;
 }
@@ -171,7 +171,7 @@ static void __release_perfctr_nmi(int cpu, unsigned int msr)
counter = nmi_perfctr_msr_to_bit(msr);
BUG_ON(counter  NMI_MAX_COUNTER_BITS);
 
-   clear_bit(counter, per_cpu(perfctr_nmi_owner, cpu));
+   clear_bit(counter, per_cpu(perfctr_nmi_owner, cpu)[0]);
 }
 
 int reserve_perfctr_nmi(unsigned int msr)
-
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


[netdrvr] depca: handle platform_device_add() failure

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d91c088b39e3c66d309938de858775bb90fd1ead
Commit: d91c088b39e3c66d309938de858775bb90fd1ead
Parent: 4bf3631cdb012591667ab927fcd7719d92837833
Author: Andrea Righi [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 12:40:57 2007 -0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Apr 24 12:40:57 2007 -0400

[netdrvr] depca: handle platform_device_add() failure

The following patch fixes a kernel bug in depca_platform_probe().

We don't use a dynamic pointer for pldev-dev.platform_data, so it seems
that the correct way to proceed if platform_device_add(pldev) fails is
to explicitly set the pldev-dev.platform_data pointer to NULL, before
calling the platform_device_put(pldev), or it will be kfree'ed by
platform_device_release().

Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/depca.c |3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/net/depca.c b/drivers/net/depca.c
index 5113eef..f3807aa 100644
--- a/drivers/net/depca.c
+++ b/drivers/net/depca.c
@@ -1491,8 +1491,9 @@ static void __init depca_platform_probe (void)
depca_io_ports[i].device = pldev;
 
if (platform_device_add(pldev)) {
-   platform_device_put(pldev);
depca_io_ports[i].device = NULL;
+   pldev-dev.platform_data = NULL;
+   platform_device_put(pldev);
continue;
}
 
-
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


sis900: Allocate rx replacement buffer before rx operation

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b748d9e3b80dc7e6ce6bf7399f57964b99a4104c
Commit: b748d9e3b80dc7e6ce6bf7399f57964b99a4104c
Parent: d91c088b39e3c66d309938de858775bb90fd1ead
Author: Neil Horman [EMAIL PROTECTED]
AuthorDate: Fri Apr 20 09:54:58 2007 -0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Apr 24 12:43:07 2007 -0400

sis900: Allocate rx replacement buffer before rx operation

The sis900 driver appears to have a bug in which the receive routine
passes the skbuff holding the received frame to the network stack before
refilling the buffer in the rx ring.  If a new skbuff cannot be allocated, 
the
driver simply leaves a hole in the rx ring, which causes the driver to stop
receiving frames and become non-recoverable without an rmmod/insmod 
according to
reporters.  This patch reverses that order, attempting to allocate a 
replacement
buffer first, and receiving the new frame only if one can be allocated.  If 
no
skbuff can be allocated, the current skbuf in the rx ring is recycled, 
dropping
the current frame, but keeping the NIC operational.

Signed-off-by: Neil Horman [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/sis900.c |   44 
 1 files changed, 20 insertions(+), 24 deletions(-)

diff --git a/drivers/net/sis900.c b/drivers/net/sis900.c
index b3750f2..b2a3b19 100644
--- a/drivers/net/sis900.c
+++ b/drivers/net/sis900.c
@@ -1755,6 +1755,24 @@ static int sis900_rx(struct net_device *net_dev)
} else {
struct sk_buff * skb;
 
+   pci_unmap_single(sis_priv-pci_dev,
+   sis_priv-rx_ring[entry].bufptr, RX_BUF_SIZE,
+   PCI_DMA_FROMDEVICE);
+
+   /* refill the Rx buffer, what if there is not enought
+* memory for new socket buffer ?? */
+   if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) {
+   /*
+* Not enough memory to refill the buffer
+* so we need to recycle the old one so
+* as to avoid creating a memory hole
+* in the rx ring
+*/
+   skb = sis_priv-rx_skbuff[entry];
+   sis_priv-stats.rx_dropped++;
+   goto refill_rx_ring;
+   }   
+
/* This situation should never happen, but due to
   some unknow bugs, it is possible that
   we are working on NULL sk_buff :-( */
@@ -1768,9 +1786,6 @@ static int sis900_rx(struct net_device *net_dev)
break;
}
 
-   pci_unmap_single(sis_priv-pci_dev,
-   sis_priv-rx_ring[entry].bufptr, RX_BUF_SIZE,
-   PCI_DMA_FROMDEVICE);
/* give the socket buffer to upper layers */
skb = sis_priv-rx_skbuff[entry];
skb_put(skb, rx_size);
@@ -1783,33 +1798,14 @@ static int sis900_rx(struct net_device *net_dev)
net_dev-last_rx = jiffies;
sis_priv-stats.rx_bytes += rx_size;
sis_priv-stats.rx_packets++;
-
-   /* refill the Rx buffer, what if there is not enought
-* memory for new socket buffer ?? */
-   if ((skb = dev_alloc_skb(RX_BUF_SIZE)) == NULL) {
-   /* not enough memory for skbuff, this makes a
-* hole on the buffer ring, it is not clear
-* how the hardware will react to this kind
-* of degenerated buffer */
-   if (netif_msg_rx_status(sis_priv))
-   printk(KERN_INFO %s: Memory squeeze,
-   deferring packet.\n,
-   net_dev-name);
-   sis_priv-rx_skbuff[entry] = NULL;
-   /* reset buffer descriptor state */
-   sis_priv-rx_ring[entry].cmdsts = 0;
-   sis_priv-rx_ring[entry].bufptr = 0;
-   sis_priv-stats.rx_dropped++;
-   sis_priv-cur_rx++;
-   break;
-   }
+   sis_priv-dirty_rx++;
+refill_rx_ring:
skb-dev = net_dev;
sis_priv-rx_skbuff[entry] = 

usb-net/pegasus: fix pegasus carrier detection

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=c43c49bd61fdb9bb085ddafcaadb17d06f95ec43
Commit: c43c49bd61fdb9bb085ddafcaadb17d06f95ec43
Parent: b748d9e3b80dc7e6ce6bf7399f57964b99a4104c
Author: Dan Williams [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 10:20:06 2007 -0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Apr 24 12:46:31 2007 -0400

usb-net/pegasus: fix pegasus carrier detection

Broken by 4a1728a28a193aa388900714bbb1f375e08a6d8e which switched the
return semantics of read_mii_word() but didn't fix usage of
read_mii_word() to conform to the new semantics.

Setting carrier to off based on the NO_CARRIER flag is also incorrect as
that flag only triggers on TX failure and therefore isn't correct when
no frames are being transmitted.  Since there is already a 2*HZ MII
carrier check going on, defer to that.

Add a TRUST_LINK_STATUS feature flag for adapters where the LINK_STATUS
flag is actually correct, and use that rather than the NO_CARRIER flag.

Signed-off-by: Dan Williams [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/usb/net/pegasus.c |   17 -
 drivers/usb/net/pegasus.h |3 ++-
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/drivers/usb/net/pegasus.c b/drivers/usb/net/pegasus.c
index d48c024..6d12961 100644
--- a/drivers/usb/net/pegasus.c
+++ b/drivers/usb/net/pegasus.c
@@ -316,6 +316,7 @@ static int update_eth_regs_async(pegasus_t * pegasus)
return ret;
 }
 
+/* Returns 0 on success, error on failure */
 static int read_mii_word(pegasus_t * pegasus, __u8 phy, __u8 indx, __u16 * 
regd)
 {
int i;
@@ -847,10 +848,16 @@ static void intr_callback(struct urb *urb)
 * d[0].NO_CARRIER kicks in only with failed TX.
 * ... so monitoring with MII may be safest.
 */
-   if (d[0]  NO_CARRIER)
-   netif_carrier_off(net); 
-   else
-   netif_carrier_on(net);
+   if (pegasus-features  TRUST_LINK_STATUS) {
+   if (d[5]  LINK_STATUS)
+   netif_carrier_on(net);
+   else
+   netif_carrier_off(net);
+   } else {
+   /* Never set carrier _on_ based on ! NO_CARRIER */
+   if (d[0]  NO_CARRIER)
+   netif_carrier_off(net); 
+   }
 
/* bytes 3-4 == rx_lostpkt, reg 2E/2F */
pegasus-stats.rx_missed_errors += ((d[3]  0x7f)  8) | d[4];
@@ -950,7 +957,7 @@ static void set_carrier(struct net_device *net)
pegasus_t *pegasus = netdev_priv(net);
u16 tmp;
 
-   if (!read_mii_word(pegasus, pegasus-phy, MII_BMSR, tmp))
+   if (read_mii_word(pegasus, pegasus-phy, MII_BMSR, tmp))
return;
 
if (tmp  BMSR_LSTATUS)
diff --git a/drivers/usb/net/pegasus.h b/drivers/usb/net/pegasus.h
index c746782..c7aadb4 100644
--- a/drivers/usb/net/pegasus.h
+++ b/drivers/usb/net/pegasus.h
@@ -11,6 +11,7 @@
 
 #definePEGASUS_II  0x8000
 #defineHAS_HOME_PNA0x4000
+#defineTRUST_LINK_STATUS   0x2000
 
 #definePEGASUS_MTU 1536
 #defineRX_SKBS 4
@@ -203,7 +204,7 @@ PEGASUS_DEV( AEI USB Fast Ethernet Adapter, 
VENDOR_AEILAB, 0x1701,
 PEGASUS_DEV( Allied Telesyn Int. AT-USB100, VENDOR_ALLIEDTEL, 0xb100,
DEFAULT_GPIO_RESET | PEGASUS_II )
 PEGASUS_DEV( Belkin F5D5050 USB Ethernet, VENDOR_BELKIN, 0x0121,
-   DEFAULT_GPIO_RESET | PEGASUS_II )
+   DEFAULT_GPIO_RESET | PEGASUS_II | TRUST_LINK_STATUS )
 PEGASUS_DEV( Billionton USB-100, VENDOR_BILLIONTON, 0x0986,
DEFAULT_GPIO_RESET )
 PEGASUS_DEV( Billionton USBLP-100, VENDOR_BILLIONTON, 0x0987,
-
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


drivers/net/hamradio/baycom_ser_fdx build fix

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=5efb764c8653c187912669629c14bb47242a5d05
Commit: 5efb764c8653c187912669629c14bb47242a5d05
Parent: c43c49bd61fdb9bb085ddafcaadb17d06f95ec43
Author: Andrew Morton [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 12:51:03 2007 -0400
Committer:  Jeff Garzik [EMAIL PROTECTED]
CommitDate: Tue Apr 24 12:51:03 2007 -0400

drivers/net/hamradio/baycom_ser_fdx build fix

sparc64:

drivers/net/hamradio/baycom_ser_fdx.c: In function `ser12_open':
drivers/net/hamradio/baycom_ser_fdx.c:417: error: `NR_IRQS' undeclared 
(first us
e in this function)
drivers/net/hamradio/baycom_ser_fdx.c:417: error: (Each undeclared 
identifier is
 reported only once
drivers/net/hamradio/baycom_ser_fdx.c:417: error: for each function it 
appears i
n.)

Cc: Folkert van Heusden [EMAIL PROTECTED]
Cc: Alan Cox [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
Signed-off-by: Jeff Garzik [EMAIL PROTECTED]
---
 drivers/net/hamradio/baycom_ser_fdx.c |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/hamradio/baycom_ser_fdx.c 
b/drivers/net/hamradio/baycom_ser_fdx.c
index 59214e7..30baf6e 100644
--- a/drivers/net/hamradio/baycom_ser_fdx.c
+++ b/drivers/net/hamradio/baycom_ser_fdx.c
@@ -75,12 +75,14 @@
 #include linux/ioport.h
 #include linux/string.h
 #include linux/init.h
-#include asm/uaccess.h
-#include asm/io.h
 #include linux/hdlcdrv.h
 #include linux/baycom.h
 #include linux/jiffies.h
 
+#include asm/uaccess.h
+#include asm/io.h
+#include asm/irq.h
+
 /* - */
 
 #define BAYCOM_DEBUG
-
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] Fix oprofile logic to physical counter remapping

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=6f4c5bdef2943d9ec074be32c437ca897016aaad
Commit: 6f4c5bdef2943d9ec074be32c437ca897016aaad
Parent: 89d8ab6993e1d9f3c482ee8c862c03c528f696aa
Author: Ralf Baechle [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 21:42:20 2007 +0100
Committer:  Ralf Baechle [EMAIL PROTECTED]
CommitDate: Tue Apr 24 22:10:18 2007 +0100

[MIPS] Fix oprofile logic to physical counter remapping

This did cause oprofile to fail on non-multithreaded systems with more
than 2 processors such as the BCM1480.

Reported by Manish Lachwani ([EMAIL PROTECTED]).

Signed-off-by: Ralf Baechle [EMAIL PROTECTED]
---
 arch/mips/oprofile/op_model_mipsxx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/oprofile/op_model_mipsxx.c 
b/arch/mips/oprofile/op_model_mipsxx.c
index 69a8bcf..4f94fa2 100644
--- a/arch/mips/oprofile/op_model_mipsxx.c
+++ b/arch/mips/oprofile/op_model_mipsxx.c
@@ -35,7 +35,7 @@
 #define vpe_id()   smp_processor_id()
 #else
 #define WHAT   0
-#define vpe_id()   smp_processor_id()
+#define vpe_id()   0
 #endif
 
 #define __define_perf_accessors(r, n, np)  \
-
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


[TCP]: Congestion control initialization.

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=4d4d3d1e8807d6aa9822eeedf7fe8500e1b7e38d
Commit: 4d4d3d1e8807d6aa9822eeedf7fe8500e1b7e38d
Parent: c445a31cd7f469d77acc37538ab43a99530968b8
Author: Stephen Hemminger [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 22:32:11 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Mon Apr 23 22:32:11 2007 -0700

[TCP]: Congestion control initialization.

Change to defer congestion control initialization.

If setsockopt() was used to change TCP_CONGESTION before
connection is established, then protocols that use sequence numbers
to keep track of one RTT interval (vegas, illinois, ...) get confused.

Change the init hook to be called after handshake.

Signed-off-by: Stephen Hemminger [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 net/ipv4/tcp_cong.c |   23 +--
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/net/ipv4/tcp_cong.c b/net/ipv4/tcp_cong.c
index 5c8caf4..34ae3f1 100644
--- a/net/ipv4/tcp_cong.c
+++ b/net/ipv4/tcp_cong.c
@@ -77,18 +77,19 @@ void tcp_init_congestion_control(struct sock *sk)
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_congestion_ops *ca;
 
-   if (icsk-icsk_ca_ops != tcp_init_congestion_ops)
-   return;
+   /* if no choice made yet assign the current value set as default */
+   if (icsk-icsk_ca_ops == tcp_init_congestion_ops) {
+   rcu_read_lock();
+   list_for_each_entry_rcu(ca, tcp_cong_list, list) {
+   if (try_module_get(ca-owner)) {
+   icsk-icsk_ca_ops = ca;
+   break;
+   }
 
-   rcu_read_lock();
-   list_for_each_entry_rcu(ca, tcp_cong_list, list) {
-   if (try_module_get(ca-owner)) {
-   icsk-icsk_ca_ops = ca;
-   break;
+   /* fallback to next available */
}
-
+   rcu_read_unlock();
}
-   rcu_read_unlock();
 
if (icsk-icsk_ca_ops-init)
icsk-icsk_ca_ops-init(sk);
@@ -236,6 +237,7 @@ int tcp_set_congestion_control(struct sock *sk, const char 
*name)
 
rcu_read_lock();
ca = tcp_ca_find(name);
+
/* no change asking for existing value */
if (ca == icsk-icsk_ca_ops)
goto out;
@@ -261,7 +263,8 @@ int tcp_set_congestion_control(struct sock *sk, const char 
*name)
else {
tcp_cleanup_congestion_control(sk);
icsk-icsk_ca_ops = ca;
-   if (icsk-icsk_ca_ops-init)
+
+   if (sk-sk_state != TCP_CLOSE  icsk-icsk_ca_ops-init)
icsk-icsk_ca_ops-init(sk);
}
  out:
-
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


[XFRM]: beet: fix pseudo header length value

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=05d224468a273a9ee773a0e9d34227ee7f2c0840
Commit: 05d224468a273a9ee773a0e9d34227ee7f2c0840
Parent: 4d4d3d1e8807d6aa9822eeedf7fe8500e1b7e38d
Author: Patrick McHardy [EMAIL PROTECTED]
AuthorDate: Mon Apr 23 22:39:02 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Mon Apr 23 22:39:02 2007 -0700

[XFRM]: beet: fix pseudo header length value

draft-nikander-esp-beet-mode-07.txt is not entirely clear on how the length
value of the pseudo header should be calculated, it states The Header 
Length
field contains the length of the pseudo header, IPv4 options, and padding in
8 octets units., but also states Length in octets (Header Len + 1) * 8.
draft-nikander-esp-beet-mode-08-pre1.txt [1] clarifies this, the header 
length
should not include the first 8 byte.

This change affects backwards compatibility, but option encapsulation didn't
work until very recently anyway.

[1] 
http://users.piuha.net/jmelen/BEET/draft-nikander-esp-beet-mode-08-pre1.txt

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

diff --git a/net/ipv4/xfrm4_mode_beet.c b/net/ipv4/xfrm4_mode_beet.c
index f68dfd8..d419e15 100644
--- a/net/ipv4/xfrm4_mode_beet.c
+++ b/net/ipv4/xfrm4_mode_beet.c
@@ -52,7 +52,7 @@ static int xfrm4_beet_output(struct xfrm_state *x, struct 
sk_buff *skb)
 
ph = (struct ip_beet_phdr *)skb-h.raw;
ph-padlen = 4 - (optlen  4);
-   ph-hdrlen = (optlen + ph-padlen + sizeof(*ph)) / 8;
+   ph-hdrlen = optlen / 8;
ph-nexthdr = top_iph-protocol;
if (ph-padlen)
memset(ph + 1, IPOPT_NOP, ph-padlen);
@@ -85,7 +85,7 @@ static int xfrm4_beet_input(struct xfrm_state *x, struct 
sk_buff *skb)
ph = (struct ip_beet_phdr *)(skb-h.ipiph + 1);
 
phlen = sizeof(*ph) + ph-padlen;
-   optlen = ph-hdrlen * 8 - phlen;
+   optlen = ph-hdrlen * 8 + (IPV4_BEET_PHMAXLEN - phlen);
if (optlen  0 || optlen  3 || optlen  250)
goto out;
 
-
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]: Disallow RH0 by default.

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=0bcbc92629044b5403719f77fb015e9005b1f504
Commit: 0bcbc92629044b5403719f77fb015e9005b1f504
Parent: 05d224468a273a9ee773a0e9d34227ee7f2c0840
Author: YOSHIFUJI Hideaki [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 14:58:30 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Tue Apr 24 14:58:30 2007 -0700

[IPV6]: Disallow RH0 by default.

A security issue is emerging.  Disallow Routing Header Type 0 by default
as we have been doing for IPv4.
Note: We allow RH2 by default because it is harmless.

Signed-off-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 Documentation/networking/ip-sysctl.txt |9 +++
 include/linux/ipv6.h   |3 ++
 include/linux/sysctl.h |1 +
 net/ipv6/addrconf.c|   11 
 net/ipv6/exthdrs.c |   40 +++
 5 files changed, 58 insertions(+), 6 deletions(-)

diff --git a/Documentation/networking/ip-sysctl.txt 
b/Documentation/networking/ip-sysctl.txt
index d3aae1f..702d1d8 100644
--- a/Documentation/networking/ip-sysctl.txt
+++ b/Documentation/networking/ip-sysctl.txt
@@ -851,6 +851,15 @@ accept_redirects - BOOLEAN
Functional default: enabled if local forwarding is disabled.
disabled if local forwarding is enabled.
 
+accept_source_route - INTEGER
+   Accept source routing (routing extension header).
+
+0: Accept routing header.
+   = 0: Accept only routing header type 2.
+0: Do not accept routing header.
+
+   Default: 0
+
 autoconf - BOOLEAN
Autoconfigure addresses using Prefix Information in Router 
Advertisements.
diff --git a/include/linux/ipv6.h b/include/linux/ipv6.h
index f824113..713eb5e 100644
--- a/include/linux/ipv6.h
+++ b/include/linux/ipv6.h
@@ -177,6 +177,7 @@ struct ipv6_devconf {
 #endif
 #endif
__s32   proxy_ndp;
+   __s32   accept_source_route;
void*sysctl;
 };
 
@@ -205,6 +206,8 @@ enum {
DEVCONF_RTR_PROBE_INTERVAL,
DEVCONF_ACCEPT_RA_RT_INFO_MAX_PLEN,
DEVCONF_PROXY_NDP,
+   __DEVCONF_OPTIMISTIC_DAD,
+   DEVCONF_ACCEPT_SOURCE_ROUTE,
DEVCONF_MAX
 };
 
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h
index 2c5fb38..9a8970b 100644
--- a/include/linux/sysctl.h
+++ b/include/linux/sysctl.h
@@ -580,6 +580,7 @@ enum {
NET_IPV6_RTR_PROBE_INTERVAL=21,
NET_IPV6_ACCEPT_RA_RT_INFO_MAX_PLEN=22,
NET_IPV6_PROXY_NDP=23,
+   NET_IPV6_ACCEPT_SOURCE_ROUTE=25,
__NET_IPV6_MAX
 };
 
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index 7552663..452a82c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -172,6 +172,7 @@ struct ipv6_devconf ipv6_devconf __read_mostly = {
 #endif
 #endif
.proxy_ndp  = 0,
+   .accept_source_route= 0,/* we do not accept RH0 by default. */
 };
 
 static struct ipv6_devconf ipv6_devconf_dflt __read_mostly = {
@@ -203,6 +204,7 @@ static struct ipv6_devconf ipv6_devconf_dflt __read_mostly 
= {
 #endif
 #endif
.proxy_ndp  = 0,
+   .accept_source_route= 0,/* we do not accept RH0 by default. */
 };
 
 /* IPv6 Wildcard Address and Loopback Address defined by RFC2553 */
@@ -3356,6 +3358,7 @@ static inline void ipv6_store_devconf(struct ipv6_devconf 
*cnf,
 #endif
 #endif
array[DEVCONF_PROXY_NDP] = cnf-proxy_ndp;
+   array[DEVCONF_ACCEPT_SOURCE_ROUTE] = cnf-accept_source_route;
 }
 
 static inline size_t inet6_if_nlmsg_size(void)
@@ -3884,6 +3887,14 @@ static struct addrconf_sysctl_table
.proc_handler   =   proc_dointvec,
},
{
+   .ctl_name   =   NET_IPV6_ACCEPT_SOURCE_ROUTE,
+   .procname   =   accept_source_route,
+   .data   =   
ipv6_devconf.accept_source_route,
+   .maxlen =   sizeof(int),
+   .mode   =   0644,
+   .proc_handler   =   proc_dointvec,
+   },
+   {
.ctl_name   =   0,  /* sentinel */
}
},
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 28e0c65..6ed6a8c 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -362,10 +362,27 @@ static int ipv6_rthdr_rcv(struct sk_buff **skbp)
struct inet6_skb_parm *opt = IP6CB(skb);
struct in6_addr *addr = NULL;
struct in6_addr daddr;
+   struct inet6_dev *idev;
int n, i;
-
struct ipv6_rt_hdr *hdr;
struct rt0_hdr *rthdr;
+   int accept_source_route = ipv6_devconf.accept_source_route;
+
+   if (accept_source_route  0 ||
+   

[BNX2]: Fix occasional NETDEV WATCHDOG on 5709.

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=68c9f75a0539db583db074059d54deb607d1a475
Commit: 68c9f75a0539db583db074059d54deb607d1a475
Parent: 0bcbc92629044b5403719f77fb015e9005b1f504
Author: Michael Chan [EMAIL PROTECTED]
AuthorDate: Tue Apr 24 15:35:53 2007 -0700
Committer:  David S. Miller [EMAIL PROTECTED]
CommitDate: Tue Apr 24 15:35:53 2007 -0700

[BNX2]: Fix occasional NETDEV WATCHDOG on 5709.

Tweak a register setting to prevent the tx mailbox from halting.

Update version to 1.5.8.

Signed-off-by: Michael Chan [EMAIL PROTECTED]
Signed-off-by: David S. Miller [EMAIL PROTECTED]
---
 drivers/net/bnx2.c |7 +--
 drivers/net/bnx2.h |1 +
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c
index 0b7aded..e85f5ec 100644
--- a/drivers/net/bnx2.c
+++ b/drivers/net/bnx2.c
@@ -54,8 +54,8 @@
 
 #define DRV_MODULE_NAMEbnx2
 #define PFX DRV_MODULE_NAME: 
-#define DRV_MODULE_VERSION 1.5.7
-#define DRV_MODULE_RELDATE March 29, 2007
+#define DRV_MODULE_VERSION 1.5.8
+#define DRV_MODULE_RELDATE April 24, 2007
 
 #define RUN_AT(x) (jiffies + (x))
 
@@ -3421,6 +3421,9 @@ bnx2_init_chip(struct bnx2 *bp)
val = REG_RD(bp, BNX2_MQ_CONFIG);
val = ~BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE;
val |= BNX2_MQ_CONFIG_KNL_BYP_BLK_SIZE_256;
+   if (CHIP_ID(bp) == CHIP_ID_5709_A0 || CHIP_ID(bp) == CHIP_ID_5709_A1)
+   val |= BNX2_MQ_CONFIG_HALT_DIS;
+
REG_WR(bp, BNX2_MQ_CONFIG, val);
 
val = 0x1 + (MAX_CID_CNT * MB_KERNEL_CTX_SIZE);
diff --git a/drivers/net/bnx2.h b/drivers/net/bnx2.h
index ccbdf81..878eee5 100644
--- a/drivers/net/bnx2.h
+++ b/drivers/net/bnx2.h
@@ -6518,6 +6518,7 @@ struct bnx2 {
 #define CHIP_ID_5708_B00x57081000
 #define CHIP_ID_5708_B10x57081010
 #define CHIP_ID_5709_A00x5709
+#define CHIP_ID_5709_A10x57090010
 
 #define CHIP_BOND_ID(bp)   (((bp)-chip_id)  0xf)
 
-
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: fix Routing Header Type 0 handling thinko

2007-04-24 Thread Linux Kernel Mailing List
Gitweb: 
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a23cf14b161b8deeb0f701d577a0e8be6365e247
Commit: a23cf14b161b8deeb0f701d577a0e8be6365e247
Parent: 12145387a042e8aa4439485f8976e6992a529b12
Author: YOSHIFUJI Hideaki [EMAIL PROTECTED]
AuthorDate: Wed Apr 25 11:13:49 2007 +0900
Committer:  Linus Torvalds [EMAIL PROTECTED]
CommitDate: Tue Apr 24 19:26:06 2007 -0700

IPv6: fix Routing Header Type 0 handling thinko

Oops, thinko.  The test for accempting a RH0 was exatly the wrong way
around.

Signed-off-by: YOSHIFUJI Hideaki [EMAIL PROTECTED]
Signed-off-by: Linus Torvalds [EMAIL PROTECTED]
---
 net/ipv6/exthdrs.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c
index 6ed6a8c..fb39604 100644
--- a/net/ipv6/exthdrs.c
+++ b/net/ipv6/exthdrs.c
@@ -399,7 +399,7 @@ static int ipv6_rthdr_rcv(struct sk_buff **skbp)
break;
 #endif
case IPV6_SRCRT_TYPE_0:
-   if (accept_source_route = 0)
+   if (accept_source_route  0)
break;
kfree_skb(skb);
return -1;
-
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