platform/adaptation/renesas_rcar/renesas_kernel.git
18 years ago[PATCH] uml: local_irq_save, not local_save_flags
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:39 +0000 (22:53 -0700)]
[PATCH] uml: local_irq_save, not local_save_flags

The call to local_save_flags seems bogus since it is followed by
local_irq_restore, and it's intended to lock the list from concurrent
mconsole_interrupt invocations.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix big stack user
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:39 +0000 (22:53 -0700)]
[PATCH] uml: fix big stack user

Switch this proc from storing 4k of data (a whole path) on the stack to
keeping it on the heap.

Maybe it's not called in process context but only in early boot context (where
in UML you have a normal process stack on the host) but just to be safe, fix
it.

While at it some little readability simplifications.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix failure path after conversion
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:38 +0000 (22:53 -0700)]
[PATCH] uml: fix failure path after conversion

Little fix for error paths in this code.

- Some bug come from conversion to os-Linux (open() doesn't follow the
  kernel -errno return convention, while the old code called os_open_file()
  which followed it).  This caused the wrong return code to be printed.

- Then be more precise about what happened and do some whitespace fixes.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix hang on run_helper() failure on uml_net
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:37 +0000 (22:53 -0700)]
[PATCH] uml: fix hang on run_helper() failure on uml_net

Fix an hang on a pipe when run_helper() fails when called by change_tramp()
(i.e.  when calling uml_net) - reproduced the bug and verified this fixes it.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: move outside spinlock call not needing it
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:36 +0000 (22:53 -0700)]
[PATCH] uml: move outside spinlock call not needing it

Move a call to kfree on a local variable out of a spinlock - there's no need
to have it in.  Done on a just merged patch.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: support sparse for userspace files
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:35 +0000 (22:53 -0700)]
[PATCH] uml: support sparse for userspace files

Make sparse checker work for userspace files - it normally gets -nostdinc
separately, so avoid having it for userspace files.  Also, add -D$(SUBARCH)
for multiarch hosts (i.e.  AMD64 with compatibility headers).

It works, the only problem is a bit of bogus warnings for system headers, but
they're not too many.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix critical typo for TT mode
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:34 +0000 (22:53 -0700)]
[PATCH] uml: fix critical typo for TT mode

Noticed this for a compilation-time warning, so I'm fixing it even for TT mode
- this is not put_user, but copy_to_user, so we need a pointer to sp, not sp
itself (we're trying to write the word pointed to by the "sp" var.).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix "extern-vs-static" proto conflict in TLS code
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:34 +0000 (22:53 -0700)]
[PATCH] uml: fix "extern-vs-static" proto conflict in TLS code

Move the prototype from arch-generic to arch-specific includes because on
x86_64 these functions are two static inlines.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix some double export warnings
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:33 +0000 (22:53 -0700)]
[PATCH] uml: fix some double export warnings

Some functions are exported twice in current code - remove the excess export.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix format errors
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:32 +0000 (22:53 -0700)]
[PATCH] uml: fix format errors

Now that GCC warns about format errors, fix them.  Nothing able to cause a
crash, however.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: request format warnings to GCC for appropriate functions
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:31 +0000 (22:53 -0700)]
[PATCH] uml: request format warnings to GCC for appropriate functions

Add the format attribute to prototypes so GCC warns about improper usage.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: fix 2 harmless cast warnings for 64-bit
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:31 +0000 (22:53 -0700)]
[PATCH] uml: fix 2 harmless cast warnings for 64-bit

Fix two harmless warnings in 64-bit compilation (the 2nd doesn't trigger for
now because of a missing __attribute((format)) for cow_printf, but next
patches fix that).

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: safe migration path to the correct V3 COW format
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:30 +0000 (22:53 -0700)]
[PATCH] uml: safe migration path to the correct V3 COW format

- Correct the layout of all header versions - make all them well-specified
  for any external event.  As we don't have 1-byte or 2-byte wide fields, the
  32-bit layout (historical one) has no extra padding, so we can safely add
  __attribute__((packed)).

- Add detection and reading of the broken 64-bit COW format which has been
  around for a while - to allow safe migration to the correct 32-bit format.
  Safe detection is possible, thanks to some luck with the existing format,
  and it works in practice.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: make 64-bit COW files compatible with 32-bit ones
Paolo 'Blaisorblade' Giarrusso [Tue, 11 Apr 2006 05:53:29 +0000 (22:53 -0700)]
[PATCH] uml: make 64-bit COW files compatible with 32-bit ones

This is the minimal fix to make 64-bit UML binaries create 32-bit compatible
COW files and read them.  I've indeed tested that current code doesn't do this
- the code gets SIGFPE for a division by a value read at the wrong place,
where 0 is found.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] uml: memory hotplug cleanups
Jeff Dike [Tue, 11 Apr 2006 05:53:28 +0000 (22:53 -0700)]
[PATCH] uml: memory hotplug cleanups

Change memory hotplug to use GFP_NOWAIT instead of GFP_ATOMIC, so that it
will grab memory without sleeping, but doesn't try to use the emergency
pools.

A small list initialization suggested by Daniel Phillips - don't initialize
lists which are just about to be list_add-ed.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Add GFP_NOWAIT
Jeff Dike [Tue, 11 Apr 2006 05:53:27 +0000 (22:53 -0700)]
[PATCH] Add GFP_NOWAIT

Introduce GFP_NOWAIT, as an alias for GFP_ATOMIC & ~__GFP_HIGH.

This also changes XFS, which is the only in-tree user of this idiom that I
could find.  The XFS piece is compile-tested only.

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Acked-by: Nathan Scott <nathans@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] UML: TLS fixlets
Jeff Dike [Tue, 11 Apr 2006 05:53:26 +0000 (22:53 -0700)]
[PATCH] UML: TLS fixlets

Two small TLS fixes -

arch/um/os-Linux/sys-i386/tls.c uses errno and -E* so it should include
    errno.h
__setup_host_supports_tls returns 1, but as an initcall, it should return 0

Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m32r: Remove symbols exported twice
Hirokazu Takata [Tue, 11 Apr 2006 05:53:25 +0000 (22:53 -0700)]
[PATCH] m32r: Remove symbols exported twice

Remove multi-exported symbols from arch/m32r/kernel/m32r_ksyms.c.

WARNING: vmlinux: 'enable_irq' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'disable_irq' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'disable_irq_nosync' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'synchronize_irq' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memchr' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strstr' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memscan' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memcmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'memmove' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strnlen' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strchr' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strncmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strcmp' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strncat' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strcat' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strncpy' exported twice. Previous export was in vmlinux
WARNING: vmlinux: 'strcpy' exported twice. Previous export was in vmlinux

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Remove unused prepare_to_switch macro
Hirokazu Takata [Tue, 11 Apr 2006 05:53:23 +0000 (22:53 -0700)]
[PATCH] Remove unused prepare_to_switch macro

Remove unused prepare_to_switch() macros.

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: Mikael Starvik <starvik@axis.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Miles Bader <uclinux-v850@lsi.nec.co.jp>
Cc: Chris Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m32r: security fix of {get,put}_user macros
Hirokazu Takata [Tue, 11 Apr 2006 05:53:20 +0000 (22:53 -0700)]
[PATCH] m32r: security fix of {get,put}_user macros

Update {get,put}_user macros for m32r kernel.
- Modify get_user to use __get_user_asm macro, instead of __get_user_x macro.
- Remove arch/m32r/lib/{get,put}user.S.
- Some cosmetic updates.

I would like to thank NIIBE Yutaka for his reporting about the m32r kernel's
security problem in {get,put}_user macros.

There were no address checking for user space access in {get,put}_user macros.
 ;-)

Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: NIIBE Yutaka <gniibe@fsij.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] m32r: Fix cpu_possible_map and cpu_present_map initialization for SMP kernel
Hirokazu Takata [Tue, 11 Apr 2006 05:53:18 +0000 (22:53 -0700)]
[PATCH] m32r: Fix cpu_possible_map and cpu_present_map initialization for SMP kernel

This patch fixes a boot problem of the m32r SMP kernel 2.6.16-rc1-mm3 or
later.

In this patch, cpu_possible_map is statically initialized, and cpu_present_map
is also copied from cpu_possible_map in smp_prepare_cpus(), because the m32r
architecture has not supported CPU hotplug yet.

Signed-off-by: Hayato Fujiwara <fujiwara.hayato@renesas.com>
Signed-off-by: Hirokazu Takata <takata@linux-m32r.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] alpha: SMP boot fixes
Brian Uhrain says [Tue, 11 Apr 2006 05:53:16 +0000 (22:53 -0700)]
[PATCH] alpha: SMP boot fixes

I've encountered two problems with 2.6.16 and newer kernels on my API CS20
(dual 833MHz Alpha 21264b processors).  The first is the kernel OOPSing
because of a NULL pointer dereference while trying to populate SysFS with the
CPU information.  The other is that only one processor was being brought up.
I've included a small Alpha-specific patch that fixes both problems.

The first problem was caused by the CPUs never being properly registered using
register_cpu(), the way it's done on other architectures.

The second problem has to do with the removal of hwrpb_cpu_present_mask in
arch/alpha/kernel/smp.c.  In setup_smp() in the 2.6.15 kernel sources,
hwrpb_cpu_present_mask has a bit set for each processor that is probed, and
afterwards cpu_present_mask is set to the cpumask for the boot CPU.  In the
same function of the same file in the 2.6.16 sources, instead of
hwrpb_cpu_present_mask being set, cpu_possible_map is updated for each probed
CPU.  cpu_present_mask is still set to the cpumask of the boot CPU afterwards.
 The problem lies in include/asm-alpha/smp.h, where cpu_possible_map is
#define'd to be cpu_present_mask.

Cleanups from: Ivan Kokshaysky <ink@jurassic.park.msu.ru>

 - cpu_present_mask and cpu_possible_map are essentially the same thing
   on alpha, as it doesn't support CPU hotplug;
 - allocate "struct cpu" only for present CPUs, like sparc64 does.
   Static array of "struct cpu" is just a waste of memory.

Signed-off-by: Brian Uhrain <buhrain@rosettastone.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Enable TSC for AMD Geode GX/LX
Jordan Crouse [Tue, 11 Apr 2006 05:53:15 +0000 (22:53 -0700)]
[PATCH] Enable TSC for AMD Geode GX/LX

Geode GX/LX should enable X86_TSC.   Pointed out by Adrian Bunk.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: move SMP option above subarch selection
Adrian Bunk [Tue, 11 Apr 2006 05:53:14 +0000 (22:53 -0700)]
[PATCH] i386: move SMP option above subarch selection

Since several subarchs depend on SMP, the SMP option should be above the
subarch selection.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mptspec: remove duplicate #include
Randy Dunlap [Tue, 11 Apr 2006 05:53:14 +0000 (22:53 -0700)]
[PATCH] mptspec: remove duplicate #include

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mpparse: prevent table index out-of-bounds
Randy Dunlap [Tue, 11 Apr 2006 05:53:13 +0000 (22:53 -0700)]
[PATCH] mpparse: prevent table index out-of-bounds

John Z. Bohach <jzb@aexorsyst.com> found this bug:

  If the board has more than 32 PCI busses on it, the mptable bus array will
  overwrite its bounds for the PCI busses, and stomp on anything that's after
  it.

Prevent possible table overflow and unknown data corruption.  Code is in an
__init section so it will be discarded after init.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] menu: relocate DOUBLEFAULT option
Randy Dunlap [Tue, 11 Apr 2006 05:53:12 +0000 (22:53 -0700)]
[PATCH] menu: relocate DOUBLEFAULT option

Move the DOUBLEFAULT option from the top-level menu to the EMBEDDED menu.
Only applicable to X86_32.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] i386: print EIP/ESP last
Randy Dunlap [Tue, 11 Apr 2006 05:53:11 +0000 (22:53 -0700)]
[PATCH] i386: print EIP/ESP last

Print summary registers (EIP and SS:ESP only) as last death info.  This
makes this important data visible in case it had scrolled off the top of
the display.  Similar to what x86_64 does.  Suggested by Andi Kleen.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] swsusp: don't require bigsmp
Ashok Raj [Tue, 11 Apr 2006 05:53:07 +0000 (22:53 -0700)]
[PATCH] swsusp: don't require bigsmp

Switching to automatic bigsmp causes a misleading error message, that more
then 8 cpus are detected, and user needs to select either X86_GENERICARCH
or X86_BIGSMP to handle.

Reason is we switched to bigsmp to avoid IP race when new cpu is comming
up.  [bigsmp is nothing but using physical flat mode that can work for 1 ..
 255 cpus] [default is X86_PC, that uses logical flat mode up to 8 CPUs
max] Current x86_64 code uses bigsmp as default when hotplug is enabled.

It would be preferable to make bigsmp as default, and work the dependencies
of other related code like SMP_SUSPEND, and some related to memory hotplug
code for i386.

Current logical flat mode doesnt use shortcuts that cause the race by using
the send_IPI_mask() instead of shortcuts when HOTPLUG_CPU is enabled.

In the meantime this patch is the path of lease resistance.

We will switch to bigsmp default sometime soon, when we get to work it again.

Signed-off-by: Ashok Raj <ashok.raj@intel.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Nigel Cunningham <nigel@suspend2.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] frv: define MMU mode specific syscalls as 'cond_syscall' and clean up unneede...
Hyok S. Choi [Tue, 11 Apr 2006 05:53:06 +0000 (22:53 -0700)]
[PATCH] frv: define MMU mode specific syscalls as 'cond_syscall' and clean up unneeded macros

For some architectures, a few syscalls are not linked in noMMU mode.  In
that case, the MMU depending syscalls are needed to be defined as
'cond_syscall'.  For example, ARM architecture selectively links sys_mlock
by the mode configuration.

In case of FRV, it has been managed by #ifdef CONFIG_MMU macro in
arch/frv/kernel/entry.S.  However these conditional macros are just
duplicates if they were defined as cond_syscall.  Compilation test is done
with FRV toolchains for both of MMU and noMMU mode.

Signed-off-by: Hyok S. Choi <hyok.choi@samsung.com>
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] hugetlbfs doc. update
Randy Dunlap [Tue, 11 Apr 2006 05:53:04 +0000 (22:53 -0700)]
[PATCH] hugetlbfs doc. update

Fix typos, spelling, etc., in Doc/vm/hugetlbpage.txt.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mm/migrate.c: don't export a static function
Adrian Bunk [Tue, 11 Apr 2006 05:53:03 +0000 (22:53 -0700)]
[PATCH] mm/migrate.c: don't export a static function

EXPORT_SYMBOL'ing of a static function is not a good idea.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Christoph Lameter <clameter@engr.sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] page flags: add commentry regarding field reservation
Andy Whitcroft [Tue, 11 Apr 2006 05:53:01 +0000 (22:53 -0700)]
[PATCH] page flags: add commentry regarding field reservation

Add some documentation regarding the utilisation of the flags field in
struct page.  This field is overloaded for per page bits and to hold node,
zone and SPARSEMEM information.  Make it clear which areas are used for
what and how many bits are in each area.

Signed-off-by: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] overcommit: use totalreserve_pages for nommu
Hideo AOKI [Tue, 11 Apr 2006 05:53:01 +0000 (22:53 -0700)]
[PATCH] overcommit: use totalreserve_pages for nommu

This patch is an enhancement of OVERCOMMIT_GUESS algorithm in
__vm_enough_memory() in mm/nommu.c.

When the OVERCOMMIT_GUESS algorithm calculates the number of free pages,
the algorithm subtracts the number of reserved pages from the result
nr_free_pages().

Signed-off-by: Hideo Aoki <haoki@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] overcommit: use totalreserve_pages
Hideo AOKI [Tue, 11 Apr 2006 05:53:00 +0000 (22:53 -0700)]
[PATCH] overcommit: use totalreserve_pages

This patch is an enhancement of OVERCOMMIT_GUESS algorithm in
__vm_enough_memory() in mm/mmap.c.

When the OVERCOMMIT_GUESS algorithm calculates the number of free pages,
the algorithm subtracts the number of reserved pages from the result
nr_free_pages().

Signed-off-by: Hideo Aoki <haoki@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] overcommit: add calculate_totalreserve_pages()
Hideo AOKI [Tue, 11 Apr 2006 05:52:59 +0000 (22:52 -0700)]
[PATCH] overcommit: add calculate_totalreserve_pages()

These patches are an enhancement of OVERCOMMIT_GUESS algorithm in
__vm_enough_memory().

- why the kernel needed patching

  When the kernel can't allocate anonymous pages in practice, currnet
  OVERCOMMIT_GUESS could return success. This implementation might be
  the cause of oom kill in memory pressure situation.

  If the Linux runs with page reservation features like
  /proc/sys/vm/lowmem_reserve_ratio and without swap region, I think
  the oom kill occurs easily.

- the overall design approach in the patch

  When the OVERCOMMET_GUESS algorithm calculates number of free pages,
  the reserved free pages are regarded as non-free pages.

  This change helps to avoid the pitfall that the number of free pages
  become less than the number which the kernel tries to keep free.

- testing results

  I tested the patches using my test kernel module.

  If the patches aren't applied to the kernel, __vm_enough_memory()
  returns success in the situation but autual page allocation is
  failed.

  On the other hand, if the patches are applied to the kernel, memory
  allocation failure is avoided since __vm_enough_memory() returns
  failure in the situation.

  I checked that on i386 SMP 16GB memory machine. I haven't tested on
  nommu environment currently.

This patch adds totalreserve_pages for __vm_enough_memory().

Calculate_totalreserve_pages() checks maximum lowmem_reserve pages and
pages_high in each zone. Finally, the function stores the sum of each
zone to totalreserve_pages.

The totalreserve_pages is calculated when the VM is initilized.
And the variable is updated when /proc/sys/vm/lowmem_reserve_raito
or /proc/sys/vm/min_free_kbytes are changed.

Signed-off-by: Hideo Aoki <haoki@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Some page migration fixups
Christoph Lameter [Tue, 11 Apr 2006 05:52:57 +0000 (22:52 -0700)]
[PATCH] Some page migration fixups

- Remove sparse comment

- Remove duplicated include

- Return the correct error condition in migrate_page_remove_references().

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] mm: fix bug in brk()
Ram Gupta [Tue, 11 Apr 2006 05:52:57 +0000 (22:52 -0700)]
[PATCH] mm: fix bug in brk()

The code checks for newbrk with oldbrk which are page aligned before making
a check for the memory limit set of data segment.  If the memory limit is
not page aligned in that case it bypasses the test for the limit if the
memory allocation is still for the same page.

Signed-off-by: Ram Gupta <ram.gupta5@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] nommu: use compound page in slab allocator
Luke Yang [Tue, 11 Apr 2006 05:52:56 +0000 (22:52 -0700)]
[PATCH] nommu: use compound page in slab allocator

The earlier patch to consolidate mmu and nommu page allocation and
refcounting by using compound pages for nommu allocations had a bug:
kmalloc slabs who's pages were initially allocated by a non-__GFP_COMP
allocator could be passed into mm/nommu.c kmalloc allocations which really
wanted __GFP_COMP underlying pages.  Fix that by having nommu pass
__GFP_COMP to all higher order slab allocations.

Signed-off-by: Luke Yang <luke.adi@gmail.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: add statistics for alien cache overflows
Ravikiran G Thirumalai [Tue, 11 Apr 2006 05:52:54 +0000 (22:52 -0700)]
[PATCH] slab: add statistics for alien cache overflows

Add a statistics counter which is incremented everytime the alien cache
overflows.  alien_cache limit is hardcoded to 12 right now.  We can use
this statistics to tune alien cache if needed in the future.

Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] slab: allocate node local memory for off-slab slabmanagement
Ravikiran G Thirumalai [Tue, 11 Apr 2006 05:52:53 +0000 (22:52 -0700)]
[PATCH] slab: allocate node local memory for off-slab slabmanagement

Allocate off-slab slab descriptors from node local memory.

Signed-off-by: Alok N Kataria <alokk@calsoftinc.com>
Signed-off-by: Ravikiran Thirumalai <kiran@scalex86.org>
Signed-off-by: Shai Fultheim <shai@scalex86.org>
Acked-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] for_each_possible_cpu: sparc64
KAMEZAWA Hiroyuki [Tue, 11 Apr 2006 05:52:52 +0000 (22:52 -0700)]
[PATCH] for_each_possible_cpu: sparc64

for_each_cpu() actually iterates across all possible CPUs.  We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs.  This is inefficient and
possibly buggy.

We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.

This patch replaces for_each_cpu with for_each_possible_cpu.
for sparc64.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] for_each_possible_cpu: sparc
KAMEZAWA Hiroyuki [Tue, 11 Apr 2006 05:52:51 +0000 (22:52 -0700)]
[PATCH] for_each_possible_cpu: sparc

for_each_cpu() actually iterates across all possible CPUs.  We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs.  This is inefficient and
possibly buggy.

We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.

This patch replaces for_each_cpu with for_each_possible_cpu.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] for_each_possible_cpu: network codes
KAMEZAWA Hiroyuki [Tue, 11 Apr 2006 05:52:50 +0000 (22:52 -0700)]
[PATCH] for_each_possible_cpu: network codes

for_each_cpu() actually iterates across all possible CPUs.  We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs.  This is inefficient and
possibly buggy.

We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.

This patch replaces for_each_cpu with for_each_possible_cpu under /net

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] arch/i386/mach-voyager/voyager_cat.c: named initializers
Adrian Bunk [Tue, 11 Apr 2006 05:52:49 +0000 (22:52 -0700)]
[PATCH] arch/i386/mach-voyager/voyager_cat.c: named initializers

This patch switches arch/i386/mach-voyager/voyager_cat.c to using named
initializers for struct resource.

Besides a fixing compile error in Greg's tree, it makes the code more
readable.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] md: make sure 64bit fields in version-1 metadata are 64-bit aligned
NeilBrown [Tue, 11 Apr 2006 05:52:48 +0000 (22:52 -0700)]
[PATCH] md: make sure 64bit fields in version-1 metadata are 64-bit aligned

reshape_position is a 64bit field that was not 64bit aligned.  So swap with
new_level.

NOTE: this is a user-visible change.  However:
  - The bad code has not appeared in a released kernel
  - This code is still marked 'experimental'
  - This only affects version-1 superblock, which are not in wide use
  - These field are only used (rather than simply reported) by user-space
    tools in extemely rare circumstances : after a reshape crashes in the
    first second of the reshape process.

So I believe that, at this stage, the change is safe.  Especially if people
heed the 'help' message on use mdadm-2.4.1.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] Fix NULL pointer dereference in node_read_numastat()
Christoph Lameter [Tue, 11 Apr 2006 05:52:47 +0000 (22:52 -0700)]
[PATCH] Fix NULL pointer dereference in node_read_numastat()

zone_pcp() only returns valid values if the processor is online.

Change node_read_numastat() to only scan online processors.

Signed-off-by: Christoph Lameter <clameter@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] select() warning fixes
Andrew Morton [Tue, 11 Apr 2006 05:52:46 +0000 (22:52 -0700)]
[PATCH] select() warning fixes

fs/select.c: In function `core_sys_select':
fs/select.c:339: warning: assignment from incompatible pointer type
fs/select.c:376: warning: comparison of distinct pointer types lacks a cast

By using a void* we can remove lots of casts rather than adding more.

Cc: Jes Sorensen <jes@trained-monkey.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sched: don't awaken RT tasks on expired array
Mike Galbraith [Tue, 11 Apr 2006 05:52:45 +0000 (22:52 -0700)]
[PATCH] sched: don't awaken RT tasks on expired array

RT tasks are being awakened on the expired array when expired_starving() is
true, whereas they really should be excluded.  Fix.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Con Kolivas <kernel@kolivas.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[PATCH] sched: fix interactive task starvation
Mike Galbraith [Tue, 11 Apr 2006 05:52:44 +0000 (22:52 -0700)]
[PATCH] sched: fix interactive task starvation

Fix a starvation problem that occurs when a stream of highly interactive tasks
delay an array switch for extended periods despite EXPIRED_STARVING(rq) being
true.  AFAIKT, the only choice is to enqueue awakening tasks on the expired
array in this case.

Without this patch, it can be nearly impossible to remotely login to a busy
server, and interactive shell commands can starve for minutes.

Also, convert the EXPIRED_STARVING macro into an inline function which humans
can understand.

Signed-off-by: Mike Galbraith <efault@gmx.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Acked-by: Con Kolivas <kernel@kolivas.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[XFS] Fix a problem in aligning inode allocations to stripe unit
Nathan Scott [Tue, 11 Apr 2006 05:45:05 +0000 (15:45 +1000)]
[XFS] Fix a problem in aligning inode allocations to stripe unit
boundaries.

SGI-PV: 951862
SGI-Modid: xfs-linux-melb:xfs-kern:25726a

Signed-off-by: Nathan Scott <nathans@sgi.com>
18 years ago[XFS] Fix utime(2) in the case that no times parameter was passed in.
Nathan Scott [Tue, 11 Apr 2006 05:12:45 +0000 (15:12 +1000)]
[XFS] Fix utime(2) in the case that no times parameter was passed in.

SGI-PV: 949858
SGI-Modid: xfs-linux-melb:xfs-kern:25717a

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
18 years ago[XFS] Fix an inode use-after-free durin an unpin. When reclaiming inodes
David Chinner [Tue, 11 Apr 2006 05:11:20 +0000 (15:11 +1000)]
[XFS] Fix an inode use-after-free durin an unpin. When reclaiming inodes
that have been unlinked, we may need to execute transactions during
reclaim. By the time the transaction has hit the disk, the linux inode and
xfs vnode may already have been freed so we can't reference them safely.
Use the known xfs inode state to determine if it is safe to reference the
vnode and linux inode during the unpin operation.

SGI-PV: 946321
SGI-Modid: xfs-linux-melb:xfs-kern:25687a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
18 years ago[XFS] Fix inode reclaim scalability regression. When a filesystem has
David Chinner [Tue, 11 Apr 2006 05:11:12 +0000 (15:11 +1000)]
[XFS] Fix inode reclaim scalability regression. When a filesystem has
millions of inodes cached and has sparse cluster population, removing
inodes from the cluster hash consumes excessive amounts of CPU time.
Reduce the CPU cost by making removal O(1) via use of a double linked list
for the hash chains.

SGI-PV: 951551
SGI-Modid: xfs-linux-melb:xfs-kern:25683a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
18 years ago[XFS] Fix a writepage regression where we accidentally stopped honouring
Nathan Scott [Tue, 11 Apr 2006 05:10:55 +0000 (15:10 +1000)]
[XFS] Fix a writepage regression where we accidentally stopped honouring
nonblock mode with the new IO path code (since 2.6.16).

SGI-PV: 951662
SGI-Modid: xfs-linux-melb:xfs-kern:25676a

Signed-off-by: Nathan Scott <nathans@sgi.com>
18 years ago[XFS] Fix superblock validation regression for the zero imaxpct case.
Nathan Scott [Tue, 11 Apr 2006 05:10:45 +0000 (15:10 +1000)]
[XFS] Fix superblock validation regression for the zero imaxpct case.
Thanks to kjamieson for noticing.

SGI-PV: 951661
SGI-Modid: xfs-linux-melb:xfs-kern:25675a

Signed-off-by: Nathan Scott <nathans@sgi.com>
18 years agoMerge master.kernel.org:/home/rmk/linux-2.6-arm
Linus Torvalds [Mon, 10 Apr 2006 23:45:24 +0000 (16:45 -0700)]
Merge master.kernel.org:/home/rmk/linux-2.6-arm

* master.kernel.org:/home/rmk/linux-2.6-arm:
  [ARM] 3473/1: Use numbers 0-15 for the VFP double registers
  [ARM] 3472/1: Use the D variants of FLDMIA/FSTMIA on ARMv6
  [ARM] 3471/1: FTOSI functions should return 0 for NaN
  [ARM] 3470/1: Clear the HWCAP bits for the disabled kernel features
  [ARM] 3469/1: S3C24XX: clkout missing hclk selector
  [ARM] 3468/1: S3C2410: SMDK common include fix
  [ARM] 3461/1: ARM: OMAP: Fix clk_get() when using id and name
  [ARM] 3460/1: ARM: OMAP: Remove unnecessary nop_release()
  [ARM] 3459/1: ixp23xx: fix debug serial macros for big-endian operation
  [ARM] Allow decompressor to be built with -ffunction-sections
  [ARM] Fix SA110/SA1100 cache flushing
  [ARM] ebsa110: Fix incorrect serial port address
  [ARM] Fix ebsa110 debug macros
  [ARM] Move FLUSH_BASE macros to asm/arch/memory.h
  [ARM] Remove unnecessary extra parens in include/asm-arm/memory.h
  [ARM] arm's arch_local_page_offset() fix against 2.6.17-rc1

18 years agoMerge branch 'upstream-linus' of git://oss.oracle.com/home/sourcebo/git/ocfs2
Linus Torvalds [Mon, 10 Apr 2006 23:44:09 +0000 (16:44 -0700)]
Merge branch 'upstream-linus' of git://oss.oracle.com/home/sourcebo/git/ocfs2

* 'upstream-linus' of git://oss.oracle.com/home/sourcebo/git/ocfs2:
  [PATCH] CONFIGFS_FS must depend on SYSFS
  [PATCH] Bogus NULL pointer check in fs/configfs/dir.c
  ocfs2: Better I/O error handling in heartbeat
  ocfs2: test and set teardown flag early in user_dlm_destroy_lock()
  ocfs2: Handle the DLM_CANCELGRANT case in user_unlock_ast()
  ocfs2: catch an invalid ast case in dlmfs
  ocfs2: remove an overly aggressive BUG() in dlmfs
  ocfs2: multi node truncate fix

18 years ago[PATCH] de_thread: Don't confuse users do_each_thread.
Eric W. Biederman [Mon, 10 Apr 2006 23:16:49 +0000 (17:16 -0600)]
[PATCH] de_thread: Don't confuse users do_each_thread.

Oleg Nesterov spotted two interesting bugs with the current de_thread
code.  The simplest is a long standing double decrement of
__get_cpu_var(process_counts) in __unhash_process.  Caused by
two processes exiting when only one was created.

The other is that since we no longer detach from the thread_group list
it is possible for do_each_thread when run under the tasklist_lock to
see the same task_struct twice.  Once on the task list as a
thread_group_leader, and once on the thread list of another
thread.

The double appearance in do_each_thread can cause a double increment
of mm_core_waiters in zap_threads resulting in problems later on in
coredump_wait.

To remedy those two problems this patch takes the simple approach
of changing the old thread group leader into a child thread.
The only routine in release_task that cares is __unhash_process,
and it can be trivially seen that we handle cleaning up a
thread group leader properly.

Since de_thread doesn't change the pid of the exiting leader process
and instead shares it with the new leader process.  I change
thread_group_leader to recognize group leadership based on the
group_leader field and not based on pids.  This should also be
slightly cheaper then the existing thread_group_leader macro.

I performed a quick audit and I couldn't see any user of
thread_group_leader that cared about the difference.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[ARM] 3473/1: Use numbers 0-15 for the VFP double registers
Catalin Marinas [Mon, 10 Apr 2006 20:32:46 +0000 (21:32 +0100)]
[ARM] 3473/1: Use numbers 0-15 for the VFP double registers

Patch from Catalin Marinas

This patch changes the double registers numbering to 0-15 from even 0-30,
in preparation for future VFP extensions. It also fixes the VFP_REG_ZERO
bug (value 16 actually represents the 8th double register with the original
numbering).

The original mcrr/mrrc on CP10 were generating FMRRS/FMSRR instead of
FMRRD/FMDRR. The patch changes to CP11 for the correct instructions.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3472/1: Use the D variants of FLDMIA/FSTMIA on ARMv6
Catalin Marinas [Mon, 10 Apr 2006 20:32:42 +0000 (21:32 +0100)]
[ARM] 3472/1: Use the D variants of FLDMIA/FSTMIA on ARMv6

Patch from Catalin Marinas

The X variants are deprecated starting with ARMv6. Using the D variants,
the fpmx_state in vfp_hard_struct is no longer needed.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3471/1: FTOSI functions should return 0 for NaN
Catalin Marinas [Mon, 10 Apr 2006 20:32:39 +0000 (21:32 +0100)]
[ARM] 3471/1: FTOSI functions should return 0 for NaN

Patch from Catalin Marinas

The NaN case was dealed with by the "exponent >= ... + 32" condition but it
was not setting the value "d" to 0.

Signed-off-by: Ken'ichi Kuromusha <musha@aplix.co.jp>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[ARM] 3470/1: Clear the HWCAP bits for the disabled kernel features
Catalin Marinas [Mon, 10 Apr 2006 20:32:35 +0000 (21:32 +0100)]
[ARM] 3470/1: Clear the HWCAP bits for the disabled kernel features

Patch from Catalin Marinas

Glibc interprets the HWCAP bits and decides on what features to use.
However, even if the features are present in the hardware, they are not
always supported by the kernel and hence the corresponding bits have to be
cleared from the elf_hwcap variable.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
18 years ago[libata] sata_mv: fix can_queue line accidentally removed in scsi-eh patch
Jeff Garzik [Mon, 10 Apr 2006 18:56:39 +0000 (14:56 -0400)]
[libata] sata_mv: fix can_queue line accidentally removed in scsi-eh patch

18 years ago[PATCH] CONFIGFS_FS must depend on SYSFS
Adrian Bunk [Sun, 26 Mar 2006 12:25:52 +0000 (14:25 +0200)]
[PATCH] CONFIGFS_FS must depend on SYSFS

This patch fixes the a compile error with CONFIG_SYSFS=n

Configfs is creating, as a matter of policy, the /sys/kernel/config
mountpoint.  This means it requires CONFIG_SYSFS.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years ago[PATCH] Bogus NULL pointer check in fs/configfs/dir.c
Eric Sesterhenn [Wed, 22 Mar 2006 23:36:54 +0000 (00:36 +0100)]
[PATCH] Bogus NULL pointer check in fs/configfs/dir.c

We check the "group" pointer after we dereference it.  This check is
bogus, as it cannot be NULL coming in.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
18 years ago[PATCH] move ->eh_strategy_handler to the transport class
Christoph Hellwig [Sat, 1 Apr 2006 17:21:04 +0000 (19:21 +0200)]
[PATCH] move ->eh_strategy_handler to the transport class

Overriding the whole EH code is a per-transport, not per-host thing.
Move ->eh_strategy_handler to the transport class, same as
->eh_timed_out.

Downside is that scsi_host_alloc can't check for the total lack of EH
anymore, but the transition period from old EH where we needed it is
long gone already.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
18 years ago[PATCH] Fix buddy list race that could lead to page lru list corruptions
Nick Piggin [Mon, 10 Apr 2006 01:21:48 +0000 (11:21 +1000)]
[PATCH] Fix buddy list race that could lead to page lru list corruptions

Rohit found an obscure bug causing buddy list corruption.

page_is_buddy is using a non-atomic test (PagePrivate && page_count == 0)
to determine whether or not a free page's buddy is itself free and in the
buddy lists.

Each of the conjuncts may be true at different times due to unrelated
conditions, so the non-atomic page_is_buddy test may find each conjunct to
be true even if they were not both true at the same time (ie. the page was
not on the buddy lists).

Signed-off-by: Martin Bligh <mbligh@google.com>
Signed-off-by: Rohit Seth <rohitseth@google.com>
Signed-off-by: Nick Piggin <npiggin@suse.de>
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years ago[Security] Keys: Fix oops when adding key to non-keyring
David Howells [Mon, 10 Apr 2006 14:15:21 +0000 (15:15 +0100)]
[Security] Keys: Fix oops when adding key to non-keyring

This fixes the problem of an oops occuring when a user attempts to add a
key to a non-keyring key [CVE-2006-1522].

The problem is that __keyring_search_one() doesn't check that the
keyring it's been given is actually a keyring.

I've fixed this problem by:

 (1) declaring that caller of __keyring_search_one() must guarantee that
     the keyring is a keyring; and

 (2) making key_create_or_update() check that the keyring is a keyring,
     and return -ENOTDIR if it isn't.

This can be tested by:

keyctl add user b b `keyctl add user a a @s`

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
18 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Mon, 10 Apr 2006 15:46:00 +0000 (08:46 -0700)]
Merge /pub/scm/linux/kernel/git/davem/net-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (35 commits)
  [IPV6]: Deinline few large functions in inet6 code
  [IPV4] ip_fragment: Always compute hash with ipfrag_lock held.
  [NETFILTER]: Fix DNAT in LOCAL_OUT
  [X25]: Restore skb->dev setting in x25_type_trans().
  [NET]: Fix hotplug race during device registration.
  [IPV6]: Unexport secure_ipv6_port_ephemeral
  [NETFILTER]: Fix build with CONFIG_NETFILTER=y/m on IA64
  [NET]: More kzalloc conversions.
  [NET] kzalloc: use in alloc_netdev
  [PKT_SCHED] act_police: Rename methods.
  [TG3]: Speed up SRAM access (2nd version)
  [TG3]: Kill some less useful flags
  [NETFILTER]: H.323 helper: remove changelog
  [NETFILTER]: Convert conntrack/ipt_REJECT to new checksumming functions
  [NETFILTER]: Add address family specific checksum helpers
  [NETFILTER]: Introduce infrastructure for address family specific operations
  [NETFILTER]: Fix IP_NF_CONNTRACK_NETLINK dependency
  [NETFILTER]: H.323 helper: add parameter 'default_rrq_ttl'
  [NETFILTER]: H.323 helper: make get_h245_addr() static
  [NETFILTER]: H.323 helper: change EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
  ...

18 years ago[SPARC64]: Set ARCH_SELECT_MEMORY_MODEL
David S. Miller [Fri, 7 Apr 2006 03:28:11 +0000 (20:28 -0700)]
[SPARC64]: Set ARCH_SELECT_MEMORY_MODEL

Otherwise the build breaks with EXPERIMENTAL disabled
because SPARSEMEM will not get selected properly.  See
mm/Kconfig for how that works.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: smp_call_function() fixups...
David S. Miller [Thu, 6 Apr 2006 23:54:33 +0000 (16:54 -0700)]
[SPARC64]: smp_call_function() fixups...

1) Take doc-book function comment from i386 implementation.
2) cacheline align call_lock, taken from powerpc
3) Need memory barrier after setting call_data
4) Remove timeout

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Translate PTRACE_GETEVENTMSG for 32-bit tasks.
David S. Miller [Tue, 4 Apr 2006 23:54:40 +0000 (16:54 -0700)]
[SPARC64]: Translate PTRACE_GETEVENTMSG for 32-bit tasks.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Update defconfig.
David S. Miller [Mon, 3 Apr 2006 02:31:30 +0000 (19:31 -0700)]
[SPARC64]: Update defconfig.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Print out return PC in cheetah_log_errors().
David S. Miller [Sun, 2 Apr 2006 07:29:56 +0000 (23:29 -0800)]
[SPARC64]: Print out return PC in cheetah_log_errors().

This makes debugging things a little bit easier.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[SPARC64]: Add dummy PTRACE_PEEKUSR for gdb.
David S. Miller [Sun, 2 Apr 2006 07:28:10 +0000 (23:28 -0800)]
[SPARC64]: Add dummy PTRACE_PEEKUSR for gdb.

GDB uses a PTRACE_PEEKUSR call with offset 0 to see
if a thread is alive, so provide a success return for
this particular special case.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Deinline few large functions in inet6 code
Denis Vlasenko [Mon, 10 Apr 2006 05:48:59 +0000 (22:48 -0700)]
[IPV6]: Deinline few large functions in inet6 code

Deinline a few functions which produce 200+ bytes of code.

Size  Uses Wasted Name and definition
===== ==== ====== ================================================
  429    3    818 __inet6_lookup        include/net/inet6_hashtables.h
  404    2    384 __inet6_lookup_established    include/net/inet6_hashtables.h
  206    3    372 __inet6_hash  include/net/inet6_hashtables.h

Signed-off-by: Denis Vlasenko <vda@ilport.com.ua>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV4] ip_fragment: Always compute hash with ipfrag_lock held.
David S. Miller [Mon, 10 Apr 2006 05:43:55 +0000 (22:43 -0700)]
[IPV4] ip_fragment: Always compute hash with ipfrag_lock held.

Otherwise we could compute an inaccurate hash due to the
random seed changing.

Noticed by Zach Brown and patch is based upon some feedback
from Herbert Xu.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Fix DNAT in LOCAL_OUT
Patrick McHardy [Mon, 10 Apr 2006 05:38:29 +0000 (22:38 -0700)]
[NETFILTER]: Fix DNAT in LOCAL_OUT

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[X25]: Restore skb->dev setting in x25_type_trans().
David S. Miller [Mon, 10 Apr 2006 05:37:18 +0000 (22:37 -0700)]
[X25]: Restore skb->dev setting in x25_type_trans().

Noticed by Pascal Schlafer.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: Fix hotplug race during device registration.
Sergey Vlasov [Mon, 10 Apr 2006 05:32:48 +0000 (22:32 -0700)]
[NET]: Fix hotplug race during device registration.

From: Thomas de Grenier de Latour <degrenier@easyconnect.fr>

On Sun, 9 Apr 2006 21:56:59 +0400,
Sergey Vlasov <vsu@altlinux.ru> wrote:

> However, show_address() does not output anything unless
> dev->reg_state == NETREG_REGISTERED - and this state is set by
> netdev_run_todo() only after netdev_register_sysfs() returns, so in
> the meantime (while netdev_register_sysfs() is busy adding the
> "statistics" attribute group) some process may see an empty "address"
> attribute.

I've tried the attached patch, suggested by Sergey Vlasov on
hotplug-devel@, and as far as i can test it works just fine.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[IPV6]: Unexport secure_ipv6_port_ephemeral
Adrian Bunk [Mon, 10 Apr 2006 05:29:17 +0000 (22:29 -0700)]
[IPV6]: Unexport secure_ipv6_port_ephemeral

This patch removes the unused EXPORT_SYMBOL(secure_ipv6_port_ephemeral).

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Fix build with CONFIG_NETFILTER=y/m on IA64
Brian Haley [Fri, 7 Apr 2006 22:00:06 +0000 (15:00 -0700)]
[NETFILTER]: Fix build with CONFIG_NETFILTER=y/m on IA64

Can't build with CONFIG_NETFILTER=y/m on IA64, there's a missing
#include in net/ipv6/netfilter.c

net/ipv6/netfilter.c: In function `nf_ip6_checksum':
net/ipv6/netfilter.c:92: warning: implicit declaration of function
`csum_ipv6_magic'

Signed-off-by: Brian Haley <brian.haley@hp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET]: More kzalloc conversions.
Andrew Morton [Fri, 7 Apr 2006 21:52:59 +0000 (14:52 -0700)]
[NET]: More kzalloc conversions.

Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NET] kzalloc: use in alloc_netdev
Paolo 'Blaisorblade' Giarrusso [Fri, 7 Apr 2006 05:38:28 +0000 (22:38 -0700)]
[NET] kzalloc: use in alloc_netdev

Noticed this use, fixed it.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[PKT_SCHED] act_police: Rename methods.
Jamal Hadi Salim [Fri, 7 Apr 2006 05:24:22 +0000 (22:24 -0700)]
[PKT_SCHED] act_police: Rename methods.

Rename policer specific _generic_ methods to be specific to
_act_police_

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Speed up SRAM access (2nd version)
Michael Chan [Fri, 7 Apr 2006 04:46:34 +0000 (21:46 -0700)]
[TG3]: Speed up SRAM access (2nd version)

Speed up SRAM read and write functions if possible by using MMIO
instead of config. cycles. With this change, the post reset signature
done at the end of D3 power change must now be moved before the D3
power change.

IBM reported a problem on powerpc blades during ethtool self test that
was caused by the memory test taking excessively long. Config.  cycles
are very slow on powerpc and the memory test can take more than 10
seconds to complete using config. cycles.

David Miller informed me that an earlier version of the patch caused
problems on sparc64 systems with built-in tg3 chips. This version
fixes the problem by excluding all SUN built-in tg3 chips from doing
MMIO SRAM access.

TG3_FLAG_EEPROM_WRITE_PROT is also set unconditionally when
TG3_FLG2_SUN_570X is set. This should be sane as all SUN chips are
built-in and do not require Vaux switching.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[TG3]: Kill some less useful flags
Michael Chan [Fri, 7 Apr 2006 04:45:39 +0000 (21:45 -0700)]
[TG3]: Kill some less useful flags

Kill the TG3_FLAG_NO_{TX|RX}_PSEUDO_CSUM flags because they are not
very useful. This will free up some bits for new flags.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: H.323 helper: remove changelog
Patrick McHardy [Thu, 6 Apr 2006 23:16:51 +0000 (16:16 -0700)]
[NETFILTER]: H.323 helper: remove changelog

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Convert conntrack/ipt_REJECT to new checksumming functions
Patrick McHardy [Thu, 6 Apr 2006 21:19:24 +0000 (14:19 -0700)]
[NETFILTER]: Convert conntrack/ipt_REJECT to new checksumming functions

Besides removing lots of duplicate code, all converted users benefit
from improved HW checksum error handling. Tested with and without HW
checksums in almost all combinations.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Add address family specific checksum helpers
Patrick McHardy [Thu, 6 Apr 2006 21:18:43 +0000 (14:18 -0700)]
[NETFILTER]: Add address family specific checksum helpers

Add checksum operation which takes care of verifying the checksum and
dealing with HW checksum errors and avoids multiple checksum
operations by setting ip_summed to CHECKSUM_UNNECESSARY after
successful verification.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Introduce infrastructure for address family specific operations
Patrick McHardy [Thu, 6 Apr 2006 21:18:09 +0000 (14:18 -0700)]
[NETFILTER]: Introduce infrastructure for address family specific operations

Change the queue rerouter intrastructure to a generic usable
infrastructure for address family specific operations as a base for
some cleanups.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Fix IP_NF_CONNTRACK_NETLINK dependency
Patrick McHardy [Thu, 6 Apr 2006 21:17:27 +0000 (14:17 -0700)]
[NETFILTER]: Fix IP_NF_CONNTRACK_NETLINK dependency

When NAT is built as a module, ip_conntrack_netlink can not be linked
statically.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: H.323 helper: add parameter 'default_rrq_ttl'
Jing Min Zhao [Thu, 6 Apr 2006 21:15:33 +0000 (14:15 -0700)]
[NETFILTER]: H.323 helper: add parameter 'default_rrq_ttl'

default_rrq_ttl is used when no TTL is included in the RRQ.

Signed-off-by: Jing Min Zhao <zhaojingmin@users.sourceforge.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: H.323 helper: make get_h245_addr() static
Jing Min Zhao [Thu, 6 Apr 2006 21:14:59 +0000 (14:14 -0700)]
[NETFILTER]: H.323 helper: make get_h245_addr() static

Signed-off-by: Jing Min Zhao <zhaojingmin@users.sourceforge.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: H.323 helper: change EXPORT_SYMBOL to EXPORT_SYMBOL_GPL
Jing Min Zhao [Thu, 6 Apr 2006 21:14:11 +0000 (14:14 -0700)]
[NETFILTER]: H.323 helper: change EXPORT_SYMBOL to EXPORT_SYMBOL_GPL

Signed-off-by: Jing Min Zhao <zhaojingmin@users.sourceforge.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: H.323 helper: move some function prototypes to ip_conntrack_h323.h
Jing Min Zhao [Thu, 6 Apr 2006 21:13:42 +0000 (14:13 -0700)]
[NETFILTER]: H.323 helper: move some function prototypes to ip_conntrack_h323.h

Move prototypes of NAT callbacks to ip_conntrack_h323.h. Because the
use of typedefs as arguments, some header files need to be moved as
well.

Signed-off-by: Jing Min Zhao <zhaojingmin@users.sourceforge.net>
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Fix section mismatch warnings
Patrick McHardy [Thu, 6 Apr 2006 21:11:30 +0000 (14:11 -0700)]
[NETFILTER]: Fix section mismatch warnings

Fix section mismatch warnings caused by netfilter's init_or_cleanup
functions used in many places by splitting the init from the cleanup
parts.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Clean up hook registration
Patrick McHardy [Thu, 6 Apr 2006 21:09:49 +0000 (14:09 -0700)]
[NETFILTER]: Clean up hook registration

Clean up hook registration by makeing use of the new mass registration and
unregistration helpers.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
18 years ago[NETFILTER]: Add helper functions for mass hook registration/unregistration
Patrick McHardy [Thu, 6 Apr 2006 21:09:12 +0000 (14:09 -0700)]
[NETFILTER]: Add helper functions for mass hook registration/unregistration

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>