23 Dec, 2006

40 commits

  • While developing more functionality in mdadm I found some bugs in md...

    - When we remove a device from an inactive array (write 'remove' to
    the 'state' sysfs file - see 'state_store') would should not
    update the superblock information - as we may not have
    read and processed it all properly yet.

    - initialise all raid_disk entries to '-1' else the 'slot sysfs file
    will claim '0' for all devices in an array before the array is
    started.

    - all '\n' not to be present at the end of words written to
    sysfs files

    - when we use SET_ARRAY_INFO to set the md metadata version,
    set the flag to say that there is persistant metadata.

    - allow GET_BITMAP_FILE to be called on an array that hasn't
    been started yet.

    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • Linus sayeth:

    Google knows everything, and finds, on MS own site no less:

    "Windows 2000 default resources:

    One 4K memory window

    One 2 MB memory window

    Two 256-byte I/O windows"

    which is clearly utterly bogus and insufficient. But Microsoft apparently
    realized this, and:

    "Windows XP default resources:

    Because one memory window of 4K and one window of 2 MB are not
    sufficient for CardBus controllers in many configurations, Windows XP
    allocates larger memory windows to CardBus controllers where possible.
    However, resource windows are static (that is, the operating system
    does not dynamically allocate larger memory windows if new devices
    appear.) Under Windows XP, CardBus controllers will be assigned the
    following resources:

    One 4K memory window, as in Windows 2000

    64 MB memory, if that amount of memory is available. If 64 MB is not
    available the controller will receive 32 MB; if 32 MB is not available,
    the controller will receive 16 MB; if 16 MB is not available, the
    bridge will receive 8 MB; and so on down to a minimum assignment of 1
    MB in configurations where memory is too constrained for the operating
    system to provide a larger window.

    Two 256-byte I/O windows"

    So I think we have our answer. Windows uses one 4k window, and one 64MB
    window. And they are no more dynamic than we are (we _could_ try to do it
    dynamically, but let's face it, it's fairly painful to dynamically expand
    PCI bus resources - you may need to reprogram everything up to the root,
    so it would be absolutely crazy to do that unless you have some serious
    masochistic tendencies).

    So let's just increase our default value to 64M too.

    Cc: Markus Rechberger
    Cc: Daniel Ritz
    Cc: Dominik Brodowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • text data bss dec hex filename
    before: 4036 44 0 4080 ff0 kernel/relay.o
    after: 3727 44 0 3771 ebb kernel/relay.o

    Cc: Mathieu Desnoyers
    Cc: Tom Zanussi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • The PDA patches introduced a bug in ptrace: it reads eflags from the wrong
    place on the target's stack, but writes it back to the correct place. The
    result is a corrupted eflags, which is most visible when it turns interrupts
    off unexpectedly.

    This patch fixes this by making the ptrace code a little less fragile. It
    changes [gs]et_stack_long to take a straightforward byte offset into struct
    pt_regs, rather than requiring all callers to do a sizeof(struct pt_regs)
    offset adjustment. This means that the eflag's offset (EFL_OFFSET) on the
    target stack can be simply computed with offsetof().

    Signed-off-by: Jeremy Fitzhardinge
    Cc: Frederik Deweerdt
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeremy Fitzhardinge
     
  • Fix compile error when config memory hotplug with numa on i386.

    The cause of compile error was missing of arch_add_memory(),
    remove_memory(), and memory_add_physaddr_to_nid().

    Signed-off-by: Yasunori Goto
    Acked-by: David Rientjes
    Acked-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     
  • This is a change to include in which is
    needed for "struct fddi_statistics".

    Signed-off-by: Maciej W. Rozycki
    Cc: Ralf Baechle
    Cc: Jeff Garzik
    Cc: "David S. Miller"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Maciej W. Rozycki
     
  • I don't have the time to work on Linux Documentation, so I really should
    document that in MAINTAINERS. With Randy, kernel-doc is in good hands
    anyway.

    Signed-off-by: Martin Waitz
    Cc: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Martin Waitz
     
  • Make kernel-doc support unnamed (anonymous) structs and unions. There is
    one (union) in include/linux/skbuff.h (inside struct sk_buff) that is
    currently generating a kernel-doc warning, so this fixes that warning.

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

    Randy Dunlap
     
  • Christoph Hellwig has expressed concerns that the recent fdtable changes
    expose the details of the RCU methodology used to release no-longer-used
    fdtable structures to the rest of the kernel. The trivial patch below
    addresses these concerns by introducing the appropriate free_fdtable()
    calls, which simply wrap the release RCU usage. Since free_fdtable() is a
    one-liner, it makes sense to promote it to an inline helper.

    Signed-off-by: Vadim Lobanov
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vadim Lobanov
     
  • This fixes some bugs in the gxt4500 framebuffer driver, and adds support
    for GXT6000P cards.

    First, I had the red and blue channels swapped in the colormap update code,
    resulting in penguins' noses and feet turning blue (though the penguins
    weren't actually shivering :).

    Secondly, the code that calculated the values to put in the PLL that
    generates the pixel clock wasn't observing some constraints that I wasn't
    originally aware of, but am now that I have some documentation on the chip.

    The GXT6000P is essentially identical from software's point of view, except
    for a different reference clock for the PLL, and the addition of a geometry
    engine (which this driver doesn't use).

    Signed-off-by: Paul Mackerras
    Cc: James Simmons
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Mackerras
     
  • It is unnecessary and invalid to call sysfs_remove_group() after
    sysfs_create_group() failure.

    Cc: Sebastien Bouchard
    Cc: Mark Gross
    Signed-off-by: Akinobu Mita
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • Change the email address for the S3C2410 and S3C2440 maintainer. The old
    addresses have been deleted due to spam issues.

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

    Ben Dooks
     
  • Structure mc_cpu_notifier references a __cpuinit function, but isn't
    declared __cpuinitdata itself:

    WARNING: arch/i386/kernel/microcode.o - Section mismatch: reference
    to .init.text: from .data after 'mc_cpu_notifier' (at offset 0x118)

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

    Jean Delvare
     
  • Kyle is hitting this warning, and we don't have a clue what it's caused by.
    Add the obligatory dump_stack().

    Cc: kyle
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Return error and prevent from loading module when gss_mech_register()
    failed.

    Cc: Andy Adamson
    Cc: J. Bruce Fields
    Acked-by: Trond Myklebust
    Signed-off-by: Akinobu Mita
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • kstrdup() returns NULL on error.

    Cc: David Woodhouse
    Signed-off-by: Akinobu Mita
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Akinobu Mita
     
  • register_memory() becomes double definition in 2.6.20-rc1. It is defined
    in arch/i386/kernel/setup.c as static definition in 2.6.19. But it is
    moved to arch/i386/kernel/e820.c in 2.6.20-rc1. And same name function is
    defined in driver/base/memory.c too. So, it becomes cause of compile error
    of duplicate definition if memory hotplug option is on.

    Signed-off-by: Yasunori Goto
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     
  • This is to disallow to make SLOB with SMP or SPARSEMEM. This avoids latent
    troubles of SLOB with SLAB_DESTROY_BY_RCU. And fix compile error.

    Signed-off-by: Yasunori Goto
    Acked-by: Randy Dunlap
    Acked-by: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yasunori Goto
     
  • Add more debugging in the rmap code in an attempt to locate to source of
    the occasional "mapcount went negative" assertions.

    Cc: Hugh Dickins
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • Fix a bug that only appears when AoE goes over a network card that does not
    support scatter-gather. The headers in the linear part of the skb appeared
    to be larger than they really were, resulting in data that was offset by 24
    bytes.

    This patch eliminates the offset data on cards that don't support
    scatter-gather or have had scatter-gather turned off. There remains an
    unrelated issue that I'll address in a separate email.

    Fixes bugzilla #7662

    Signed-off-by: "Ed L. Cashin"
    Cc:
    Cc: Greg KH
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ed L. Cashin
     
  • Add a new section to the CodingStyle file, encouraging people not to
    re-invent available kernel macros such as ARRAY_SIZE(), FIELD_SIZEOF(),
    min() and max(), among others.

    Signed-off-by: Robert P. J. Day
    Acked-by: Randy Dunlap
    Acked-by: Jan Engelhardt
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Mark JFFS as broken and provide a warning to users that it is deprecated
    and scheduled for removal in 2.6.21

    Signed-off-by: Josh Boyer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Boyer
     
  • Matthew Wilcox noticed that the debug_locks_silent use should be inverted
    in DEBUG_LOCKS_WARN_ON(). This bug was causing spurious stacktraces and
    incorrect failures in the locking self-test on the parisc kernel.

    Bug-found-by: Matthew Wilcox
    Signed-off-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Trevor found a file size problem in eCryptfs in recent kernels, and he
    tracked it down to an fsstack change.

    This was the eCryptfs copy_attr_all:

    > -void ecryptfs_copy_attr_all(struct inode *dest, const struct inode *src)
    > -{
    > - dest->i_mode = src->i_mode;
    > - dest->i_nlink = src->i_nlink;
    > - dest->i_uid = src->i_uid;
    > - dest->i_gid = src->i_gid;
    > - dest->i_rdev = src->i_rdev;
    > - dest->i_atime = src->i_atime;
    > - dest->i_mtime = src->i_mtime;
    > - dest->i_ctime = src->i_ctime;
    > - dest->i_blkbits = src->i_blkbits;
    > - dest->i_flags = src->i_flags;
    > -}

    This is the fsstack copy_attr_all:

    > +void fsstack_copy_attr_all(struct inode *dest, const struct inode *src,
    > + int (*get_nlinks)(struct inode *))
    > +{
    > + if (!get_nlinks)
    > + dest->i_nlink = src->i_nlink;
    > + else
    > + dest->i_nlink = (*get_nlinks)(dest);
    > +
    > + dest->i_mode = src->i_mode;
    > + dest->i_uid = src->i_uid;
    > + dest->i_gid = src->i_gid;
    > + dest->i_rdev = src->i_rdev;
    > + dest->i_atime = src->i_atime;
    > + dest->i_mtime = src->i_mtime;
    > + dest->i_ctime = src->i_ctime;
    > + dest->i_blkbits = src->i_blkbits;
    > + dest->i_flags = src->i_flags;
    > +
    > + fsstack_copy_inode_size(dest, src);
    > +}

    The addition of copy_inode_size breaks eCryptfs, since eCryptfs needs to
    interpolate the file sizes (eCryptfs has extra space in the lower file for
    the header). The setting of the upper inode size occurs elsewhere in
    eCryptfs, and the new copy_attr_all now undoes what eCryptfs was doing
    right beforehand.

    I see three ways of going forward from here. (1) Something like this patch
    needs to go in (assuming it jives with Unionfs), (2) we need to make a
    change to the fsstack API for more fine-grained control over copying
    attributes (e.g., by also including a callback function for calculating the
    right file size, which will require some more work on both eCryptfs and
    Unionfs), or (3) the fsstack patch on eCryptfs (commit
    0cc72dc7f050188d8d7344b1dd688cbc68d3cd30 made on Fri Dec 8 02:36:31 2006
    -0800) needs to be yanked in 2.6.20.

    I think the simplest solution, from eCryptfs' perspective, is to just
    remove the inode size copy.

    Remove inode size copy in general fsstack attr copy code. Stacked
    filesystems may need to interpolate the inode size, since the file
    size in the lower file may be different than the file size in the
    stacked layer.

    Signed-off-by: Michael Halcrow
    Acked-by: Josef "Jeff" Sipek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Halcrow
     
  • Teach this driver about the workqueue changes.

    Cc: Vitaly Wool
    Cc: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Fix the compilation failure for smc911x.c when NET_POLL_CONTROLLER is set.

    Signed-off-by: Vitaly Wool
    Cc: Jeff Garzik
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vitaly Wool
     
  • The sanity check for no_irq_chip in __set_irq_hander() is unconditional on
    both install and uninstall of an handler. This triggers false warnings and
    replaces no_irq_chip by dummy_irq_chip in the uninstall case.

    Check only, when a real handler is installed.

    Signed-off-by: Thomas Gleixner
    Acked-by: Ingo Molnar
    Acked-by: Sylvain Munaut
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Gleixner
     
  • fix vm_events_fold_cpu() build breakage

    2.6.20-rc1 does not build properly if CONFIG_VM_EVENT_COUNTERS is set
    and CONFIG_HOTPLUG is unset:

    CC init/version.o
    LD init/built-in.o
    LD .tmp_vmlinux1
    mm/built-in.o: In function `page_alloc_cpu_notify':
    page_alloc.c:(.text+0x56eb): undefined reference to `vm_events_fold_cpu'
    make: *** [.tmp_vmlinux1] Error 1

    [akpm@osdl.org: cleanup]
    Signed-off-by: Magnus Damm
    Cc: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Magnus Damm
     
  • The structure cpu_isolated_map is used not only during initialization.
    Multi-core scheduler configuration changes and exclusive cpusets
    use this during run time. During setting of sched_mc_power_savings
    policy, this structure is accessed to update sched_domains.

    Signed-off-by: Tim Chen
    Acked-by: Suresh Siddha
    Acked-by: Ingo Molnar
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Chen
     
  • Ignore files generated by 'make cscope'

    Signed-off-by: Tobias Klauser
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tobias Klauser
     
  • The version of mm/vmscan.c in Linus' current tree has swapped parameters in
    the shrink_all_zones declaration and call, used by the various
    suspend-to-disk implementations. This doesn't seem to have any great
    adverse effect, but it's clearly wrong.

    Signed-off-by: Nigel Cunningham
    Cc: Pavel Machek
    Cc: "Rafael J. Wysocki"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nigel Cunningham
     
  • Add proper prototypes for sysv_{init,destroy}_icache() in sysv.h

    Signed-off-by: Adrian Bunk
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Fix kernel-doc warnings in 2.6.20-rc1.

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

    Randy Dunlap
     
  • The declaration of kmem_ptr_validate in slab.h does not match the
    one in slab.c. Remove the fastcall attribute (this is the only use in
    slab.c).

    Signed-off-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • drivers/char/rtc.c:116: warning: 'hpet_rtc_interrupt' defined but not used

    Cc: Jan Beulich
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Ran into BUG() while doing madvise(REMOVE) testing. If we are punching a
    hole into shared memory segment using madvise(REMOVE) and the entire hole
    is below the indirect blocks, we hit following assert.

    BUG_ON(limit
    Cc: Hugh Dickins
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     
  • Commit 2d7d253548cffdce80f4e03664686e9ccb1b0ed7 ("fix cond_resched() fix")
    introduced an 'expected_preempt_count' parameter to __resched_legal() to
    fix a bug where it was returning a false negative when called from
    cond_resched_lock() and preemption was enabled.

    Unfortunately this broke things for when preemption is disabled.
    preempt_count() will always return zero, thus failing the check against any
    value of expected_preempt_count not equal to zero. cond_resched_lock() for
    example, passes an expected_preempt_count value of 1.

    So fix the fix for the cond_resched() fix by skipping the check of
    preempt_count() against expected_preempt_count when preemption is disabled.

    Credit should go to Sunil Mushran for spotting the bug during testing.

    Signed-off-by: Mark Fasheh
    Acked-by: Ingo Molnar
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mark Fasheh
     
  • The VM event counters, enabled by CONFIG_VM_EVENT_COUNTERS, which provides
    VM event counters in /proc/vmstat, has become more essential to
    non-EMBEDDED kernel configurations than they were in the past. Comments in
    the code and the Kconfig configuration explanation were stale, downplaying
    their role excessively.

    Refresh those comments to correctly reflect the current role of VM event
    counters.

    Signed-off-by: Paul Jackson
    Acked-by: Christoph Lameter
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Jackson
     
  • Add compile-time and run-time API versioning.

    Signed-off-by: Avi Kivity
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Avi Kivity