01 Jul, 2006

40 commits

  • Since nfsv4 actually keeps around the file descriptors it gets from open
    (instead of just using them for a single read or write operation), we need to
    make sure that we can do RDWR opens and not just RDONLY/WRONLY.

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

    J. Bruce Fields
     
  • These tests always returned true; clearly that wasn't what was intended.

    In keeping with kernel style, make them functions instead of macros while
    we're at it.

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

    J. Bruce Fields
     
  • Adopt a simpler convention for gss_mech_put(), to simplify rsc_parse().

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

    J. Bruce Fields
     
  • In the event that lookup_one_len() fails in nfsd_link(), fh_unlock() is
    skipped and locks are held overlong.

    Patch was tested on 2.6.17-rc2 by causing lookup_one_len() to fail and
    verifying that fh_unlock() gets called appropriately.

    Signed-off-by: David M. Richter
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David M. Richter
     
  • We're checking nfs_in_grace here a few times when there isn't really any
    reason to--bad_stateid is probably the more sensible return value anyway.

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

    J. Bruce Fields
     
  • In the typical v2/v3 case the only new filehandles used as arguments to
    operations are filehandles taken directly off the wire, which don't get
    dentries until fh_verify() is called.

    But in v4 the filehandles that are arguments to operations were often created
    by previous operations (putrootfh, lookup, etc.) using fh_compose, which sets
    the dentry in the filehandle without calling nfsd_setuser().

    This also means that, for example, if filesystem B is mounted on filesystem A,
    and filesystem A is exported without root-squashing, then a client can bypass
    the rootsquashing on B using a compound that starts at a filehandle in A,
    crosses into B using lookups, and then does stuff in B.

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

    J. Bruce Fields
     
  • Fix an improper unlock in an error path.

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

    J. Bruce Fields
     
  • nfsd tries to return to a client the same sort of filehandle as was used by
    the client. This removes some filehandle aliasing issues and means that a
    server upgrade followed by a downgrade will not confused clients not restarted
    during that time.

    However when crossing a mountpoint, the filehandle used for one filesystem
    doesn't provide any useful information on what sort of filehandle should be
    used on the other, and can provide misleading information. So if the
    reference filehandle is on a different filesystem to the one being generated,
    ignore it.

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

    NeilBrown
     
  • There is a perfectly valid situation where fh_update gets called on an already
    uptodate filehandle - in nfsd_create_v3 where a CREATE_UNCHECKED finds an
    existing file and wants to just set the size.

    We could possible optimise out the call in that case, but the only harm
    involved is that fh_update prints a warning, so it is easier to remove the
    warning.

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

    NeilBrown
     
  • Type '3' is used for the fsid in filehandles when the device number of the
    device holding the filesystem has more than 8 bits in either major or minor.
    Unfortunately expkey_parse doesn't recognise type 3. Fix this.

    (Slighty modified from Frank's original)

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

    Frank Filz
     
  • Just testing the i_sb isn't really enough, at least the vfsmnt must be the
    same. Thanks Al.

    Cc: Al Viro
    Signed-off-by: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • Removed Dave Peterson as per his request as co-maintainer of EDAC Thanks Dave.

    Added Mark Gross as maintainer of edac-e752x driver Thanks Mark

    Signed-off-by: Doug Thompson
    Signed-off-by: Dave Peterson
    Signed-off-by: Mark Gross
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Doug Thompson
     
  • - Add lower-level functions that handle various parts of the initialization
    done by the xxx_probe1() functions. Some of the xxx_probe1() functions are
    much too long and complicated (see "Chapter 5: Functions" in
    Documentation/CodingStyle).

    - Cleanup of probe1() functions in EDAC

    Signed-off-by: Doug Thompson
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Doug Thompson
     
  • Remove add_mc_to_global_list(). In next patch, this function will be
    reimplemented with different semantics.

    1 Reimplement add_mc_to_global_list() with semantics that allow the caller to
    determine the ID number for a mem_ctl_info structure. Then modify
    edac_mc_add_mc() so that the caller specifies the ID number for the new
    mem_ctl_info structure. Platform-specific code should be able to assign the
    ID numbers in a platform-specific manner. For instance, on Opteron it makes
    sense to have the ID of the mem_ctl_info structure match the ID of the node
    that the memory controller belongs to.

    2 Modify callers of edac_mc_add_mc() so they use the new semantics.

    Signed-off-by: Doug Thompson
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Doug Thompson
     
  • Change MC drivers from using CVS revision strings for their version number,
    Now each driver has its own local string.

    Remove some PCI dependencies from the core EDAC module. Made the code 'struct
    device' centric instead of 'struct pci_dev' Most of the code changes here are
    from a patch by Dave Jiang. It may be best to eventually move the
    PCI-specific code into a separate source file.

    Signed-off-by: Doug Thompson
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Doug Thompson
     
  • Two typos in Documentation/IPMI.

    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Matt LaPlante
     
  • Add __acquire annotations to rcu_read_lock and rcu_read_lock_bh, and add
    __release annotations to rcu_read_unlock and rcu_read_unlock_bh. This
    allows sparse to detect improperly paired calls to these functions.

    Signed-off-by: Josh Triplett
    Acked-by: Paul E. McKenney
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • - make __cm206_init() __init (required since it calls
    the __init cm206_init())
    - make the needlessly global bcdbin() static
    - remove a comment with an obsolete compile command

    Signed-off-by: Adrian Bunk
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Don't show a menu that can't be entered due to lack of contents on arm (the
    options are only available on arm26).

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

    Adrian Bunk
     
  • This corrects the comments describing the 'enabled' and 'pending' flags in
    struct rtc_wkalrm of include/linux/rtc.h.

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

    Andrew Victor
     
  • Fix a bug identified by Zou Nan hai :

    If the system is in state SYSTEM_BOOTING, and need_resched() is true,
    cond_resched() returns true even though it didn't reschedule. Consequently
    need_resched() remains true and JBD locks up.

    Fix that by teaching cond_resched() to only return true if it really did call
    schedule().

    cond_resched_lock() and cond_resched_softirq() have a problem too. If we're
    in SYSTEM_BOOTING state and need_resched() is true, these functions will drop
    the lock and will then try to call schedule(), but the SYSTEM_BOOTING state
    will prevent schedule() from being called. So on return, need_resched() will
    still be true, but cond_resched_lock() has to return 1 to tell the caller that
    the lock was dropped. The caller will probably lock up.

    Bottom line: if these functions dropped the lock, they _must_ call schedule()
    to clear need_resched(). Make it so.

    Also, uninline __cond_resched(). It's largeish, and slowpath.

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

    Andrew Morton
     
  • The x86_64 build requires a definition for __raw_writeq.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • I run an x86_64 kernel with i386 userspace (Ubuntu Dapper) and decided to try
    out UML today. I found that UML wasn't quite aware of biarch compilers (which
    Ubuntu i386 ships). A fix similar to what was done for x86_64 should probably
    be committed (see
    http://marc.theaimsgroup.com/?l=linux-kernel&m=113425940204010&w=2). Without
    the FLAGS changes, the build will fail at a number of places and without the
    LINK change, the final link will fail.

    Signed-off-by: Nishanth Aravamudan
    Cc: Paolo 'Blaisorblade' Giarrusso
    Cc: Sam Ravnborg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Forgot to remove arch/um/kernel/time.c when it was mostly moved to
    arch/um/os-Linux.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Remove um_time() and um_stime() syscalls since they are identical to
    system-wide ones.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • do_timer must be called with xtime_lock held. I'm not sure boot_timer_handler
    needs this, however I don't think it hurts: it simply disables irq and takes a
    spinlock.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • -mm in combination with an FC5 init started dying with 'stderr=1' because init
    didn't like the lack of /dev/console and exited. The problem was that the
    stderr console, which is intended to dump printk output to the terminal before
    the regular console is initialized, isn't a tty, and so can't make
    /dev/console operational.

    However, since it is registered first, the normal console, when it is
    registered, doesn't become the preferred console, and isn't attached to
    /dev/console. Thus, /dev/console is never operational.

    This patch makes the stderr console unregister itself in an initcall, which is
    late enough that the normal console is registered. When that happens, the
    normal console will become the preferred console and will be able to run
    /dev/console.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Fix an off-by-one bug in temp file creation. Seeking to the desired length
    and writing a byte resulted in the file being one byte longer than expected.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • When parsing /proc/mounts looking for a tmpfs mount on /dev/shm, if a string
    that we are looking for if split across reads, then it won't be recognized.

    Fix this by refilling the buffer whenever we advance the cursor.

    Signed-off-by: Jeff Dike
    Cc: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • Fix the INIT_ENV_ARG_LIMIT dependencies to what seems to have been
    intended.

    Spotted by Jean-Luc Leger.

    Signed-off-by: Adrian Bunk
    Acked-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Presently, smp_processor_id() isn't necessarily set up until setup_arch().
    But it's used in boot_cpu_init() and printk() and perhaps in other places,
    prior to setup_arch() being called.

    So provide a new smp_setup_processor_id() which is called before anything
    else, wire it up for Voyager (which boots on a CPU other than #0, and broke).

    Cc: James Bottomley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Add a new security hook definition for the sys_ioprio_get operation. At
    present, the SELinux hook function implementation for this hook is
    identical to the getscheduler implementation but a separate hook is
    introduced to allow this check to be specialized in the future if
    necessary.

    This patch also creates a helper function get_task_ioprio which handles the
    access check in addition to retrieving the ioprio value for the task.

    Signed-off-by: David Quigley
    Acked-by: Stephen Smalley
    Signed-off-by: James Morris
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Quigley
     
  • This patch updates the USB core to save and pass the sending task secid when
    sending signals upon AIO completion so that proper security checking can be
    applied by security modules.

    Signed-off-by: David Quigley
    Signed-off-by: James Morris
    Cc: Stephen Smalley
    Cc: Chris Wright
    Signed-off-by: Greg Kroah-Hartman
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Quigley
     
  • This patch adds a call to the extended security_task_kill hook introduced by
    the prior patch to the kill_proc_info_as_uid function so that these signals
    can be properly mediated by security modules. It also updates the existing
    hook call in check_kill_permission.

    Signed-off-by: David Quigley
    Signed-off-by: James Morris
    Cc: Stephen Smalley
    Cc: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Quigley
     
  • This patch extends the security_task_kill hook to handle signals sent by AIO
    completion. In this case, the secid of the task responsible for the signal
    needs to be obtained and saved earlier, so a security_task_getsecid() hook is
    added, and then this saved value is passed subsequently to the extended
    task_kill hook for use in checking.

    Signed-off-by: David Quigley
    Signed-off-by: James Morris
    Cc: Stephen Smalley
    Cc: Chris Wright
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Quigley
     
  • Post and discussion:
    http://marc.theaimsgroup.com/?t=115074342800003&r=1&w=2

    Code in __shrink_node() duplicates code in cache_reap()

    Add a new function drain_freelist that removes slabs with objects that are
    already free and use that in various places.

    This eliminates the __node_shrink() function and provides the interrupt
    holdoff reduction from slab_free to code that used to call __node_shrink.

    [akpm@osdl.org: build fixes]
    Signed-off-by: Christoph Lameter
    Cc: Pekka Enberg
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • The remaining counters in page_state after the zoned VM counter patches
    have been applied are all just for show in /proc/vmstat. They have no
    essential function for the VM.

    We use a simple increment of per cpu variables. In order to avoid the most
    severe races we disable preempt. Preempt does not prevent the race between
    an increment and an interrupt handler incrementing the same statistics
    counter. However, that race is exceedingly rare, we may only loose one
    increment or so and there is no requirement (at least not in kernel) that
    the vm event counters have to be accurate.

    In the non preempt case this results in a simple increment for each
    counter. For many architectures this will be reduced by the compiler to a
    single instruction. This single instruction is atomic for i386 and x86_64.
    And therefore even the rare race condition in an interrupt is avoided for
    both architectures in most cases.

    The patchset also adds an off switch for embedded systems that allows a
    building of linux kernels without these counters.

    The implementation of these counters is through inline code that hopefully
    results in only a single instruction increment instruction being emitted
    (i386, x86_64) or in the increment being hidden though instruction
    concurrency (EPIC architectures such as ia64 can get that done).

    Benefits:
    - VM event counter operations usually reduce to a single inline instruction
    on i386 and x86_64.
    - No interrupt disable, only preempt disable for the preempt case.
    Preempt disable can also be avoided by moving the counter into a spinlock.
    - Handling is similar to zoned VM counters.
    - Simple and easily extendable.
    - Can be omitted to reduce memory use for embedded use.

    References:

    RFC http://marc.theaimsgroup.com/?l=linux-kernel&m=113512330605497&w=2
    RFC http://marc.theaimsgroup.com/?l=linux-kernel&m=114988082814934&w=2
    local_t http://marc.theaimsgroup.com/?l=linux-kernel&m=114991748606690&w=2
    V2 http://marc.theaimsgroup.com/?t=115014808400007&r=1&w=2
    V3 http://marc.theaimsgroup.com/?l=linux-kernel&m=115024767022346&w=2
    V4 http://marc.theaimsgroup.com/?l=linux-kernel&m=115047968808926&w=2

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

    Christoph Lameter
     
  • The numa statistics are really event counters. But they are per node and
    so we have had special treatment for these counters through additional
    fields on the pcp structure. We can now use the per zone nature of the
    zoned VM counters to realize these.

    This will shrink the size of the pcp structure on NUMA systems. We will
    have some room to add additional per zone counters that will all still fit
    in the same cacheline.

    Bits Prior pcp size Size after patch We can add
    ------------------------------------------------------------------
    64 128 bytes (16 words) 80 bytes (10 words) 48
    32 76 bytes (19 words) 56 bytes (14 words) 8 (64 byte cacheline)
    72 (128 byte)

    Remove the special statistics for numa and replace them with zoned vm
    counters. This has the side effect that global sums of these events now
    show up in /proc/vmstat.

    Also take the opportunity to move the zone_statistics() function from
    page_alloc.c into vmstat.c.

    Discussions:
    V2 http://marc.theaimsgroup.com/?t=115048227000002&r=1&w=2

    Signed-off-by: Christoph Lameter
    Acked-by: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Lameter
     
  • No callers.

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

    Andrew Morton
     
  • Remove writeback state

    We can remove some functions now that were needed to calculate the page state
    for writeback control since these statistics are now directly available.

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

    Christoph Lameter