01 Aug, 2007

40 commits

  • Signed-off-by: Alexey Dobriyan
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • On every open/close one struct seq_operations leaks.
    Kudos to /proc/slab_allocators.

    Signed-off-by: Alexey Dobriyan
    Acked-by: Ingo Molnar
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Fix file locking for AFS:

    (*) Start the lock manager thread under a mutex to avoid a race.

    (*) Made the locking non-fair: New readlocks will jump pending writelocks if
    there's a readlock currently granted on a file. This makes the behaviour
    similar to Linux's VFS locking.

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

    David Howells
     
  • The rcu_dereference() primitive needs to be applied to an l-value in order to
    ensure that compiler writers don't get an opportunity to apply reordering
    optimizations that could result in multiple fetches or in other misbehavior.
    This patch pulls the rcu_dereference() calls in bpq_seq_next() up to the point
    at which the fetched pointers are still l-values, rather than after
    list_entry() has transformed them into r-values.

    Signed-off-by: Paul E. McKenney
    Cc: Jeff Garzik
    Cc: Ralf Baechle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul E. McKenney
     
  • When user locks an ipc shmem segmant with SHM_LOCK ctl and the segment is
    already locked the shmem_lock() function returns 0. After this the
    subsequent code leaks the existing user struct:

    == ipc/shm.c: sys_shmctl() ==
    ...
    err = shmem_lock(shp->shm_file, 1, user);
    if (!err) {
    shp->shm_perm.mode |= SHM_LOCKED;
    shp->mlock_user = user;
    }
    ...
    ==

    Other results of this are:
    1. the new shp->mlock_user is not get-ed and will point to freed
    memory when the task dies.
    2. the RLIMIT_MEMLOCK is screwed on both user structs.

    The exploit looks like this:

    ==
    id = shmget(...);
    setresuid(uid, 0, 0);
    shmctl(id, SHM_LOCK, NULL);
    setresuid(uid + 1, 0, 0);
    shmctl(id, SHM_LOCK, NULL);
    ==

    My solution is to return 0 to the userspace and do not change the
    segment's user.

    Signed-off-by: Pavel Emelianov
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Emelianov
     
  • This is needed on MIPS where the same mechanism as get_user() is used to
    intercept bus error exceptions for some hardware probes. Without this
    patch modpost will throw spurious warnings:

    LD vmlinux
    SYSMAP System.map
    SYSMAP .tmp_System.map
    MODPOST vmlinux
    WARNING: arch/mips/sgi-ip22/built-in.o(__dbe_table+0x0): Section mismatch: reference to .init.text:

    Signed-off-by: Ralf Baechle
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ralf Baechle
     
  • Remove the duplicate inclusion of asm/irq.h from
    arch/m68knommu/platform/5206e/config.c

    Signed-off-by: Jesper Juhl
    Acked-by: Greg Ungerer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jesper Juhl
     
  • alpha:

    In file included from kernel/notifier.c:1:
    include/linux/kdebug.h:14: warning: 'struct notifier_block' declared inside parameter list
    include/linux/kdebug.h:14: warning: its scope is only this definition or declaration, which is probably not what you want
    include/linux/kdebug.h:15: warning: 'struct notifier_block' declared inside parameter list
    kernel/notifier.c:529: error: conflicting types for 'register_die_notifier'
    include/linux/kdebug.h:14: error: previous declaration of 'register_die_notifier' was here
    kernel/notifier.c:533: error: conflicting types for 'register_die_notifier'
    include/linux/kdebug.h:14: error: previous declaration of 'register_die_notifier' was here
    kernel/notifier.c:536: error: conflicting types for 'unregister_die_notifier'
    include/linux/kdebug.h:15: error: previous declaration of 'unregister_die_notifier' was here
    kernel/notifier.c:539: error: conflicting types for 'unregister_die_notifier'
    include/linux/kdebug.h:15: error: previous declaration of 'unregister_die_notifier' was here

    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • This exposes the hardware loopback mode to drivers, primarily for testing.

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

    Anton Vorontsov
     
  • This is a simple utility used to test SPI functionality. It could stand
    growing options to support using other test data patterns; this initial
    version only issues full duplex transfers, which rules out 3WIRE or
    Microwire links.

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

    Anton Vorontsov
     
  • The spidev driver doesn't currently expose all SPI communications modes to
    userspace. This passes them all through to the driver.

    Two of them are potentially troublesome, in the sense that they could cause
    hardware conflicts on shared busses. It might be appropriate to add some
    privilege checks for for those modes.

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

    Anton Vorontsov
     
  • Loopback mode is supported by various controllers. This mode can be
    useful for testing, especially in conjunction with spidev driver.

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

    Anton Vorontsov
     
  • spi_mpc83xx should use other shifts when running in QE+LSB mode.

    Signed-off-by: Anton Vorontsov
    Acked-by: Kumar Gala
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • This controller supports LSB-first transfers; let drivers use them.

    Signed-off-by: Anton Vorontsov
    Acked-by: Kumar Gala
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Magic-numbers-R-Evil

    Signed-off-by: Anton Vorontsov
    Acked-by: Kumar Gala
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • Documentation clearly states, that mode should not be changed till
    SPMODE_ENABLE bit set. I've seen hangs w/o this patch.

    Signed-off-by: Anton Vorontsov
    Acked-by: Kumar Gala
    Signed-off-by: David Brownell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Anton Vorontsov
     
  • The arm26 port has been in a state where it was far from even compiling
    for quite some time.

    Ian Molton agreed with the removal.

    Signed-off-by: Adrian Bunk
    Cc: Ian Molton
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • commit eab03ac7bd3e0da99eb9dc068772a85a5e3f3577 aka
    "[PATCH] Get rid of /proc/sys/proc" was good commit except strace(1) compile
    breakage it introduced:

    system.c:1581: error: 'CTL_PROC' undeclared here (not in a function)

    So, add dummy enum back.

    Signed-off-by: Alexey Dobriyan
    Cc: Stephen Hemminger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Signed-off-by: Satyam Sharma
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Satyam Sharma
     
  • Fix typos and update function parameters.

    Signed-off-by: Randy Dunlap
    Acked-by: Muli Ben-Yehuda
    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • Is there a reason why the "online" file in the subdirectories for the CPUs
    in /sys/devices/system isn't world-readable? I cannot imagine it to be
    security relevant especially now that a getcpu() syscall can be used to
    determine what CPUa thread runs on.

    The file is useful to correctly implement the sysconf() function to return
    the number of online CPUs. In the presence of hotplug we currently cannot
    provide this information. The patch below should to it.

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

    Ulrich Drepper
     
  • arch/i386/kernel/apm.c: In function 'apm_init':
    arch/i386/kernel/apm.c:2240: warning: format '%lx' expects type 'long
    unsigned int', but argument 3 has type 'u32'

    apm_info.bios.offset is of type 'u32'.

    Signed-off-by: Eugene Teo
    Acked-by: Stephen Rothwell
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eugene Teo
     
  • Add $(LIBS_Y) to get lib/lib.a so srm_printk is present.

    Signed-off-by: Meelis Roos
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Jay Estabrook
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Meelis Roos
     
  • kasprintf pulls in kmalloc which proved to be fatal for at least
    bootimage target on alpha.
    Move it to a separate file so only users of kasprintf are exposed
    to the dependency on kmalloc.

    Signed-off-by: Sam Ravnborg
    Cc: Jeremy Fitzhardinge
    Cc: Meelis Roos
    Cc: Richard Henderson
    Cc: Ivan Kokshaysky
    Cc: Jay Estabrook
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     
  • In current 2.6.23-rc1+git, make bootimage gives the following warning while
    compiling arch/alpha/boot/main.c. The patch below fixes the warning by
    casting callback argument explicitly to void*. The original value comes from
    START_ADDR macro and is clearly numeric so only cast it for the callback.

    CC arch/alpha/boot/main.o
    arch/alpha/boot/main.c: In function 'load':
    arch/alpha/boot/main.c:135: warning: passing argument 3 of 'callback_read' makes pointer from integer without a cast

    Signed-off-by: Meelis Roos
    Cc: Jay Estabrook
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Meelis Roos
     
  • In current 2.6.23-rc1+git, make bootimage gives the following warnings while
    compiling objstrip.c. The patch below fixes these warnings by casting strncmp
    argument to char * - it does not seem feasible to change its type in struct
    elfhdr.

    HOSTCC arch/alpha/boot/tools/objstrip
    arch/alpha/boot/tools/objstrip.c: In function 'main':
    arch/alpha/boot/tools/objstrip.c:147: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
    arch/alpha/boot/tools/objstrip.c:147: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
    arch/alpha/boot/tools/objstrip.c:147: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
    arch/alpha/boot/tools/objstrip.c:147: warning: pointer targets in passing argument 1 of 'strlen' differ in signedness
    arch/alpha/boot/tools/objstrip.c:147: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
    arch/alpha/boot/tools/objstrip.c:147: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
    arch/alpha/boot/tools/objstrip.c:147: warning: pointer targets in passing argument 1 of '__builtin_strcmp' differ in signedness
    arch/alpha/boot/tools/objstrip.c:147: warning: pointer targets in passing argument 1 of 'strncmp' differ in signedness

    Signed-off-by: Meelis Roos
    Cc: Jay Estabrook
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Meelis Roos
     
  • In current 2.6.23-rc1+git, make bootimage gives the following warnings while
    compiling mkbb.c. The patch below fixes these warnings by using the proper
    include for exit() and using appropriate printf format.

    HOSTCC arch/alpha/boot/tools/mkbb
    arch/alpha/boot/tools/mkbb.c: In function 'main':
    arch/alpha/boot/tools/mkbb.c:95: warning: implicit declaration of function 'exit'
    arch/alpha/boot/tools/mkbb.c:95: warning: incompatible implicit declaration of built-in function 'exit'
    arch/alpha/boot/tools/mkbb.c:102: warning: incompatible implicit declaration of built-in function 'exit'
    arch/alpha/boot/tools/mkbb.c:110: warning: incompatible implicit declaration of built-in function 'exit'
    arch/alpha/boot/tools/mkbb.c:117: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
    arch/alpha/boot/tools/mkbb.c:118: warning: incompatible implicit declaration of built-in function 'exit'
    arch/alpha/boot/tools/mkbb.c:125: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int'
    arch/alpha/boot/tools/mkbb.c:126: warning: incompatible implicit declaration of built-in function 'exit'
    arch/alpha/boot/tools/mkbb.c:143: warning: incompatible implicit declaration of built-in function 'exit'
    arch/alpha/boot/tools/mkbb.c:148: warning: incompatible implicit declaration of built-in function 'exit'

    Signed-off-by: Meelis Roos
    Cc: Jay Estabrook
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Meelis Roos
     
  • Documentation: document HFSPlus filesystem and its mount options.

    Signed-off-by: Wyatt Banks
    Cc: "Randy.Dunlap"
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Wyatt Banks
     
  • Give sockets up to 100ms of additional time to power down. otherwise we
    might generate false warnings with KERN_ERR priority (like in bug #8262).

    Signed-off-by: Daniel Ritz
    Cc: Nils Neumann
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Daniel Ritz
     
  • Signed-off-by: Yoichi Yuasa
    Signed-off-by: Ralf Baechle
    Acked-by: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yoichi Yuasa
     
  • Revert 7e92b4fc345f5b6f57585fbe5ffdb0f24d7c9b26. It broke Sébastien Dugué's
    machine and Jeff said (persuasively)

    This seems like it will break decades-long-working stuff, in favor of
    breaking new ground in our favorite area, "trusting the BIOS."

    It's just not worth it for serial ports, IMO. Serial ports are something
    that just shouldn't break at this late stage in the game. My new Intel
    platform boxes don't even have serial ports, so I question the value of
    messing with serial port probing even more... because... just wait a year,
    and your box won't have a serial port either! :)

    I certainly don't object to the use of platform devices (or isa_driver),
    but the probe change seems questionable. That's sorta analagous to
    rewriting the floppy driver probe routine. Sure you could do it... but why
    risk all that damage and go through debugging all over again?

    It seems clear from this report that we cannot, should not, trust BIOS for
    something (a) so simple and (b) that has been working for over a decade.

    Much discussion ensued and we've decided to have another go at all of this.

    Cc: Sébastien Dugué
    Cc: Bjorn Helgaas
    Cc: Len Brown
    Cc: Adam Belay
    Cc: Matthew Garrett
    Cc: Russell King
    Cc: Jeff Garzik
    Acked-by: Alan Cox
    Cc: Michal Piotrowski
    Cc: Sascha Sommer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Remove unused TIF_NOTIFY_RESUME flag for all processor architectures. The
    flag was not used excecpt on IA-64 where the patch replaces it with
    TIF_PERFMON_WORK.

    Signed-off-by: stephane eranian
    Cc:
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephane Eranian
     
  • Signed-off-by: Alan Cox
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alan Cox
     
  • When writing to a broken array, raid10 currently happily emits empty bio
    lists. IOW, the master bio will never be completed, sending writers to
    UNINTERRUPTIBLE_SLEEP forever.

    Signed-off-by: Arne Redlich
    Acked-by: Neil Brown
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arne Redlich
     
  • In case of read errors raid10d tries to print a nice error message,
    unfortunately using data from an already put bio.

    Signed-off-by: Maik Hampel
    Acked-By: NeilBrown
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maik Hampel
     
  • Fix kernel-doc warning:
    Warning(linux-2.6.23-rc1-mm1//mm/filemap.c:864): No description found for parameter 'ra'

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

    Randy Dunlap
     
  • Fix the following section mismatch warnings:

    WARNING: o-alpha/vmlinux.o(.text+0x1a4d4): Section mismatch: reference to .init.text:free_area_init (between 'paging_init' and 'srm_paging_stop')
    WARNING: o-alpha/vmlinux.o(.text+0x1a4dc): Section mismatch: reference to .init.text:free_area_init (between 'paging_init' and 'srm_paging_stop')

    One instance of paging_init() was declared __init but not the other one -
    used by defconfig. Fixed by declaring the second instance ___init too.

    Signed-off-by: Sam Ravnborg
    Cc: Ivan Kokshaysky
    Cc: Richard Henderson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Sam Ravnborg
     
  • A succesful downcall with a negative result (which indicates that the given
    filesystem is not exported to the given user) should not return an error.

    Currently mountd is depending on stdio to write these downcalls. With some
    versions of libc this appears to cause subsequent writes to attempt to write
    all accumulated data (for which writes previously failed) along with any new
    data. This can prevent the kernel from seeing responses to later downcalls.
    Symptoms will be that nfsd fails to respond to certain requests.

    Signed-off-by: "J. Bruce Fields"
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • We shouldn't be using negative uid's and gid's in the idmap upcalls.

    Signed-off-by: "J. Bruce Fields"
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    J. Bruce Fields
     
  • RFC 3530 says:

    If the server uses an attribute to store the exclusive create verifier, it
    will signify which attribute by setting the appropriate bit in the attribute
    mask that is returned in the results.

    Linux uses the atime and mtime to store the verifier, but sends a zeroed out
    bitmask back to the client. This patch makes sure that we set the correct
    bits in the bitmask in this situation.

    Signed-off-by: Jeff Layton
    Signed-off-by: J. Bruce Fields
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Layton