27 Jul, 2007

40 commits

  • Nathan Lynch reported:
    2.6.23-rc1 breaks the build for 64-bit powerpc for me (using
    maple_defconfig):

    LD vmlinux.o
    powerpc64-unknown-linux-gnu-ld: dynreloc miscount for
    kernel/built-in.o, section .opd
    powerpc64-unknown-linux-gnu-ld: can not edit opd Bad value
    make: *** [vmlinux.o] Error 1

    However, I see a possibly related binutils patch:
    http://article.gmane.org/gmane.comp.gnu.binutils/33650

    It was tracked down to be caused by the weak prototype
    declaration in mm.h:
    __attribute__((weak)) const char *arch_vma_name(struct vm_area_struct *vma);

    But there is no need to make the declaration weak - only the definition
    needs to be marked weak. So drop the weak declaration. And in the process
    drop the duplicate definition in page.h for powerpc.

    Note: the arch_vma_name fix for x86_64 needs to be applied first to avoid
    breaking x86_64

    Signed-off-by: Sam Ravnborg
    Cc: Nathan Lynch
    Cc: Paul Mackerras
    Cc: Benjamin Herrenschmidt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     
  • The function arch_vma_name() is declared weak and thus it was
    not noticed that x86_64 had two almost identical implementations.

    It was introduced in syscall32.c by: c633090e3105e779c97d4978e5e3d7d66b291cfb
    It was introduced in mm/init.c by: 2aae950b21e4bc789d1fc6668faf67e8748300b7

    Signed-off-by: Roland McGrath
    Acked-by: Sam Ravnborg
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Roland McGrath
     
  • chipsfb.c shouldn't use PM_SUSPEND_MEM in there, but PM_EVENT_SUSPEND.

    Cc: Cedric Le Goater
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael J. Wysocki
     
  • ext[234]_check_descriptors sanity checks block group descriptor geometry at
    mount time, testing whether the block bitmap, inode bitmap, and inode table
    reside wholly within the blockgroup. However, the inode table test is off
    by one so that if the last block in the inode table resides on the last
    block of the block group, the test incorrectly fails. This is because it
    tests the last block as (start + length) rather than (start + length - 1).

    This can be seen by trying to mount a filesystem made such as:

    mkfs.ext2 -F -b 1024 -m 0 -g 256 -N 3744 fsfile 1024

    which yields:

    EXT2-fs error (device loop0): ext2_check_descriptors: Inode table for group 0 not in group (block 101)!
    EXT2-fs: group descriptors corrupted!

    There is a similar bug in e2fsprogs, patch already sent for that.

    (I wonder if inside(), outside(), and/or in_range() should someday be
    used in this and other tests throughout the ext filesystems...)

    Signed-off-by: Eric Sandeen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Sandeen
     
  • This patch fixes an obvious use-after-free spotted by the Coverity checker.

    Signed-off-by: Adrian Bunk
    Acked-by: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • drivers/edac/edac_stub.c:15:22: asm/edac.h: No such file or directory

    was it even supposed to work?

    Cc: Douglas Thompson
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • ia64:

    drivers/i2c/chips/ds1682.c: In function `ds1682_show':
    drivers/i2c/chips/ds1682.c:78: warning: long long unsigned int format, long unsigned int arg (arg 3)
    drivers/i2c/chips/ds1682.c:78: warning: long long unsigned int format, long unsigned int arg (arg 3)

    Cc: Jean Delvare
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Alphabetic reordering of the drivers in the rtc subsys makefile.

    (akpm: merge this asap! Makefiles are the source of many patch conflicts..)

    Signed-off-by: Alessandro Zummo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alessandro Zummo
     
  • release_pages() in mm/swap.c changes page_count() to be 0 without removing
    PageLRU flag...

    This means isolate_lru_page() can see a page, PageLRU() &&
    page_count(page)==0.. This is BUG. (get_page() will be called against
    count=0 page.)

    Signed-off-by: KAMEZAWA Hiroyuki
    Acked-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • In usual, migrate_pages(page,,) is called with holding mm->sem by system call.
    (mm here is a mm_struct which maps the migration target page.)
    This semaphore helps avoiding some race conditions.

    But, if we want to migrate a page by some kernel codes, we have to avoid
    some races. This patch adds check code for following race condition.

    1. A page which page->mapping==NULL can be target of migration. Then, we have
    to check page->mapping before calling try_to_unmap().

    2. anon_vma can be freed while page is unmapped, but page->mapping remains as
    it was. We drop page->mapcount to be 0. Then we cannot trust page->mapping.
    So, use rcu_read_lock() to prevent anon_vma pointed by page->mapping from
    being freed during migration.

    Signed-off-by: KAMEZAWA Hiroyuki
    Acked-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • Davi fixed a missing cast in the __put_user(), that was making timerfd
    return a single byte instead of the full value.

    Talking with Michael about the timerfd man page, we think it'd be better to
    use a u64 for the returned value, to align it with the eventfd
    implementation.

    This is an ABI change. The timerfd code is new in 2.6.22 and if we merge this
    into 2.6.23 then we should also merge it into 2.6.22.x. That will leave a few
    early 2.6.22 kernels out in the wild which might misbehave when a future
    timerfd-enabled glibc is run on them.

    mtk says: The difference would be that read() will only return 4 bytes, while
    the application will expect 8. If the application is checking the size of
    returned value, as it should, then it will be able to detect the problem (it
    could even be sophisticated enough to know that if this is a 4-byte return,
    then it is running on an old 2.6.22 kernel). If the application is not
    checking the return from read(), then its 8-byte buffer will not be filled --
    the contents of the last 4 bytes will be undefined, so the u64 value as a
    whole will be junk.

    Signed-off-by: Davide Libenzi
    Cc: Michael Kerrisk
    Cc: Davi Arnaut
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     
  • This patch fixes the following compile error introduced by
    commit e8666b2718fdb5bf0ea7c3126f7e292bbbf2946b and reported
    by Alexey Dobriyan:

    CC arch/i386/kernel/acpi/cstate.o
    In file included from arch/i386/kernel/acpi/cstate.c:17:
    include/acpi/processor.h:88: error: expected specifier-qualifier-list before 'acpi_integer'

    If you select something you must ensure that the dependencies of what
    you are selecting are fulfilled.

    Signed-off-by: Adrian Bunk
    Cc: Alexey Dobriyan
    Cc: Joshua Hoblitt
    Cc: Dave Jones
    Cc: Michal Piotrowski
    Cc: Len Brown
    Cc: Andrew Morton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Documentation: The FIXMEs

    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Documentation: The Switcher

    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Documentation: The Host

    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Documentation: The Launcher

    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Documentation: The Drivers

    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Documentation: The Guest

    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • The netfilter code had very good documentation: the Netfilter Hacking HOWTO.
    Noone ever read it.

    So this time I'm trying something different, using a bit of Knuthiness.

    Signed-off-by: Rusty Russell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rusty Russell
     
  • Fix:
    linux/include/xen/page.h: In function mfn_pte:
    linux/include/xen/page.h:149: error: __supported_pte_mask undeclared (first use in this function)
    linux/include/xen/page.h:149: error: (Each undeclared identifier is reported only once
    linux/include/xen/page.h:149: error: for each function it appears in.)

    Signed-off-by: Jeremy Fitzhardinge
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • Fix a typo turned up by a Coverity check: referring to the wrong register,
    which could cause problems with DS1338 RTCs whose oscillators halted.

    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Brownell
     
  • Fix the include files moved around during the s3c24xx arch moves.

    Signed-off-by: Ben Dooks
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ben Dooks
     
  • A dummy inline function of register_nosave_region_late was accidentally
    removed by the recent PM patch that introduced suspend notifiers.
    This elimination causes the following compiler error on PPC machines.

    CC arch/powerpc/sysdev/dart_iommu.o
    arch/powerpc/sysdev/dart_iommu.c: In function 'iommu_init_late_dart':
    arch/powerpc/sysdev/dart_iommu.c:376: error: implicit declaration of function
    'register_nosave_region_late'
    make[1]: *** [arch/powerpc/sysdev/dart_iommu.o] Error 1
    make: *** [arch/powerpc/sysdev] Error 2

    This patch fixes the problem.

    Signed-off-by: Ryusuke Konishi
    Acked-by: Rafael J. Wysocki
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ryusuke Konishi
     
  • Signed-off-by: Christoph Lameter
    Acked-by: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • Fix kmod.c:
    Warning(linux-2.6.23-rc1//kernel/kmod.c:364): No description found for parameter 'envp'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • This is probably a leftover from a time when the return wasn't there yet.
    Now the extra assignment is just irritating.

    Signed-off-by: Ulrich Drepper
    Cc: Davide Libenzi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ulrich Drepper
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Have put_unaligned() warn if types would be wrong
    for assignment, slap force-casts where needed. Cast the
    result of get_unaligned to typeof(*ptr). With that in
    place we get proper typechecking, both from gcc and from sparse,
    including that for bitwise types.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Jeff Garzik
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Since powerpc insists on printing the _value_ of condition
    and on casting it to long... At least let's make it a force-cast.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • We really need force-cast when converting to final result type;
    unsigned long can be silently converted to integer types and
    to pointers, but not to bitwise.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Acked-by: Jeff Garzik
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Address of auto variable is not a userland pointer. A good thing, too,
    since if pppol2tp_tunnel_getsockopt() would _really_ get a userland pointer
    as argument, it would be an instant roothole...

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • u32* volatile cyclone_timer means volatile auto pointer to u32,
    which is clearly not what had been intended (we never even take
    the address of that variable, let alone pass it to something that
    could change it behind our back). u32 volatile * is what the
    authors apparently wanted to say, but in reality we don't need that
    qualifier there at all - it's (properly) only passed to iomem helpers
    which takes care of that stuff just fine.

    Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro
     
  • Signed-off-by: Al Viro
    Signed-off-by: Linus Torvalds

    Al Viro