17 Jul, 2007

40 commits

  • This is a rather bizarre thing to have inlined in io.h. Stick it in lib/
    instead.

    While we're there, despaghetti it a bit, and fix its off-by-one behaviour when
    passed a zero length.

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

    Andrew Morton
     
  • I recently received a patch including a file that had a vim modeline,
    and I realized that nothing specifically proscribed that practice.

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

    Josh Triplett
     
  • Signed-off-by: Josh Triplett
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josh Triplett
     
  • Replace (n & (n-1)) with is_power_of_2

    Signed-off-by: vignesh babu
    Acked-by: Evgeniy Dushistov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    vignesh babu
     
  • The IO port range requested by parport_pc.c:sio_ite_8872_probe is too small.
    The IO-ports of ttyS1 (0x2f8) will be missconfigured by the ITE-chip. The ITE
    starts looking for the chip a 0x2a0. An IO-portrange of 32 will not overwrite
    the ports of ttyS1. Therefore register 0x60 should be written with
    0xe5000000, enabling the ITE and setting IO-portsize to 32 bytes.

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

    Niels de Vos
     
  • Replace (n & (n-1)) with is_power_of_2()

    Signed-off-by: vignesh babu
    Acked-by: Stelian Pop
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    vignesh babu
     
  • This follows a suggestion from Chuck Ebbert on how to make seccomp
    absolutely zerocost in schedule too. The only remaining footprint of
    seccomp is in terms of the bzImage size that becomes a few bytes (perhaps
    even a few kbytes) larger, measure it if you care in the embedded.

    Signed-off-by: Andrea Arcangeli
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • This reduces the memory footprint and it enforces that only the current
    task can enable seccomp on itself (this is a requirement for a
    strightforward [modulo preempt ;) ] TIF_NOTSC implementation).

    Signed-off-by: Andrea Arcangeli
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • sock_xmit() re-implements sigprocmask() and dequeue_signal_lock().

    Signed-off-by: Oleg Nesterov
    Acked-by: Paul Clements
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • kcdrwd() is a kernel thread, all signals are ignored.

    Signed-off-by: Oleg Nesterov
    Cc: Peter Osterlund
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • adb_probe_task() is forked by "events" thread, all signals are ignored, no
    need to play with signal blocking/flushing.

    Signed-off-by: Oleg Nesterov
    Acked-by: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Fix this:

    fs/block_dev.c: In function 'bd_claim_by_disk':
    fs/block_dev.c:970: warning: 'found' may be used uninitialized in this function

    and given that free_bd_holder() now needs free(NULL)-is-legal behaviour, we
    can simplify bd_release_from_kobject().

    Cc: Bjorn Steinbrink
    Cc: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Replace some funky codepaths in fs/block_dev.c with cleaner versions of the
    affected places.

    [akpm@linux-foundation.org: fix return value]
    Signed-off-by: Johannes Weiner
    Cc: Bjorn Steinbrink
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Every file should include the headers containing the prototypes for
    its global functions.

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

    Adrian Bunk
     
  • Remove pointless `else'.

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

    Andrew Morton
     
  • Add custom dentry hash and comparison operations for HFS+ filesystems that are
    case-insensitive and/or do automatic unicode decomposition. The new
    operations reuse the existing HFS+ ASCII to unicode conversion, unicode
    decomposition and case folding functionality.

    Signed-off-by: Duane Griffin
    Signed-off-by: Roman Zippel

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

    Duane Griffin
     
  • The HFS+ filesystem is case-insensitive and does automatic unicode
    decomposition by default, but does not provide custom dentry operations. This
    can lead to multiple dentries being cached for lookups on a filename with
    varying case and/or character (de)composition.

    These patches add custom dentry hash and comparison operations for
    case-sensitive and/or automatically decomposing HFS+ filesystems. Unicode
    decomposition and case-folding are performed as required to ensure equivalent
    filenames are hashed to the same values and compare as equal.

    This patch:

    Refactor existing HFS+ ASCII to unicode string conversion routine to split out
    character conversion functionality. This will be reused by the custom dentry
    hash and comparison routines. This approach avoids unnecessary memory
    allocation compared to using the string conversion routine directly in the new
    functions.

    [akpm@linux-foundation.org: avoid use-of-uninitialised]
    Signed-off-by: Duane Griffin
    Signed-off-by: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Duane Griffin
     
  • In ext4_new_blocks(), one of two ext4_block_bitmap() calls should be
    ext4_inode_bitmap() call. It is not harmful in normal processing, but it
    should be fixed.

    Signed-off-by: Toshiyuki Okajima
    Cc: Theodore Ts'o
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Toshiyuki Okajima
     
  • Hopefully this will help people to understand the new regime.

    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Poeple keep on adding new numbered sysctls, when they're supposed not to.

    Add a documentation file which explain why new sysctls should use
    CTL_UNNUMBERED. The next patch will sprinkle pointers to this throughout
    sysctl.c.

    Eric provided the text (thanks)

    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • The recent PRIVATE and REQUEUE_PI changes to the futex code made it hard to
    read. Tidy it up.

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

    Thomas Gleixner
     
  • Update the description of struct file_system_type and get_sb() in
    Documentation/filesystems/vfs.txt to match the current code.

    Signed-off-by: Borislav Petkov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Borislav Petkov
     
  • Signed-off-by: Robert P. J. Day
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • Improve performance of sys_time(). sys_time() returns time in seconds, but
    it does so by calling do_gettimeofday() and then returning the tv_sec
    portion of the GTOD time. But the data structure "xtime", which is updated
    by every timer/scheduler tick, already offers HZ granularity time.

    The patch improves the sysbench OLTP macrobenchmark significantly:

    2.6.22-rc6:

    #threads
    1: transactions: 3733 (373.21 per sec.)
    2: transactions: 6676 (667.46 per sec.)
    3: transactions: 6957 (695.50 per sec.)
    4: transactions: 7055 (705.48 per sec.)
    5: transactions: 6596 (659.33 per sec.)

    2.6.22-rc6 + sys_time.patch:

    1: transactions: 4005 (400.47 per sec.)
    2: transactions: 7379 (737.77 per sec.)
    3: transactions: 7347 (734.49 per sec.)
    4: transactions: 7468 (746.65 per sec.)
    5: transactions: 7428 (742.47 per sec.)

    Mixed API uses of gettimeofday() and time() are guaranteed to be coherent
    via the use of a at-most-once-per-second slowpath that updates xtime.

    [akpm@linux-foundation.org: build fixes]
    Signed-off-by: Ingo Molnar
    Cc: John Stultz
    Cc: Thomas Gleixner
    Cc: Roman Zippel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Ingo Molnar
     
  • Replace (n & (n-1)) in the context of power of 2 checks with
    is_power_of_2().

    Signed-off-by: vignesh babu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    vignesh babu
     
  • Replace (n & (n-1)) in the context of power of 2 checks with is_power_of_2()

    Signed-off-by: vignesh babu
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    vignesh babu
     
  • sys_ioctl() was only exported for our first version of compat ioctl
    handling. Now that the whole compat ioctl handling mess is more or less
    sorted out there are no more modular users left and we can kill it.

    There's one exception and that's sparc64's solaris compat module, but
    sparc64 has it's own export predating the generic one by years for that
    which this patch leaves untouched.

    Signed-off-by: Christoph Hellwig
    Acked-by: David S. Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     
  • Add info that the Code: bytes line contains or (wxyz) in some
    architecture oops reports and what that means.

    Add a script by Andi Kleen that reads the Code: line from an Oops report
    file and generates assembly code from the hex bytes.

    Signed-off-by: Randy Dunlap
    Cc: Andi Kleen
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • While working on unshare support for the network namespace I noticed we
    were putting clone flags in an int. Which is weird because the syscall
    uses unsigned long and we at least need an unsigned to properly hold all of
    the unshare flags.

    So to make the code consistent, this patch updates the code to use
    unsigned long instead of int for the clone flags in those places
    where we get it wrong today.

    Signed-off-by: Eric W. Biederman
    Acked-by: Cedric Le Goater
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric W. Biederman
     
  • ext3_change_inode_journal_flag() is only called from one location:
    ext3_ioctl(EXT3_IOC_SETFLAGS). That ioctl case already has a IS_RDONLY()
    call in it so this one is superfluous.

    Signed-off-by: Dave Hansen
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Hansen
     
  • The procfs-guide claims that 'the parameter start doesn't seem to be used
    anywhere in the kernel'. This is out of date. In linux/fs/proc/generic.c
    we find a very nice description of the parameters to read_func. The
    appended patch replaces the bogus description with this (as far as I know)
    accurate one.

    Cc: "Randy.Dunlap"
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    C. Scott Ananian
     
  • Signed-off-by: Robert P. J. Day
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Robert P. J. Day
     
  • OpenVZ Linux kernel team has discovered the problem with 32bit quota tools
    working on 64bit architectures. In 2.6.10 kernel sys32_quotactl() function
    was replaced by sys_quotactl() with the comment "sys_quotactl seems to be
    32/64bit clean, enable it for 32bit" However this isn't right. Look at
    if_dqblk structure:

    struct if_dqblk {
    __u64 dqb_bhardlimit;
    __u64 dqb_bsoftlimit;
    __u64 dqb_curspace;
    __u64 dqb_ihardlimit;
    __u64 dqb_isoftlimit;
    __u64 dqb_curinodes;
    __u64 dqb_btime;
    __u64 dqb_itime;
    __u32 dqb_valid;
    };

    For 32 bit quota tools sizeof(if_dqblk) == 0x44.
    But for 64 bit kernel its size is 0x48, 'cause of alignment!
    Thus we got a problem. Attached patch reintroduce sys32_quotactl() function,
    that handles this and related situations.

    [michal.k.k.piotrowski@gmail.com: build fix]
    [akpm@linux-foundation.org: Make it link with CONFIG_QUOTA=n]
    Signed-off-by: Vasily Tarasov
    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Cc: Jan Kara
    Cc:
    Signed-off-by: Michal Piotrowski
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vasily Tarasov
     
  • One common problem with 32 bit system call and ioctl emulation is the
    different alignment rules between i386 and 64 bit machines. A number of
    drivers work around this by marking the compat structures as
    'attribute((packed))', which is not the right solution because it breaks
    all the non-x86 architectures that want to use the same compat code.

    Hopefully, this patch improves the situation, it introduces two new types,
    compat_u64 and compat_s64. These are defined on all architectures to have
    the same size and alignment as the 32 bit version of u64 and s64.

    Signed-off-by: Arnd Bergmann
    Acked-by: David S. Miller
    Cc: David Woodhouse
    Cc: Andi Kleen
    Cc: Benjamin Herrenschmidt
    Cc: Vasily Tarasov
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arnd Bergmann
     
  • Fix parameter name in audit_core_dumps for kerneldoc.

    Signed-off-by: Henrik Kretzschmar
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Henrik Kretzschmar
     
  • aa95387774039096c11803c04011f1aa42d85758 removed the implementation of
    lock_cpu_hotplug_interruptible and all users of it. This stub definition
    for !CONFIG_HOTPLUG_CPU was left over -- kill it now.

    Signed-off-by: Nathan Lynch
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nathan Lynch
     
  • ext4_orphan_add() and ext4_orphan_del() functions lock sb->s_lock with a
    transaction started with ext4_mark_recovery_complete() waits for a transaction
    holding sb->s_lock, thus leading to a possible deadlock. At the moment we
    call ext4_mark_recovery_complete() from ext4_remount() we have done all the
    work needed for remounting and thus we are safe to drop sb->s_lock before we
    wait for transactions to commit. Note that at this moment we are still
    guarded by s_umount lock against other remounts/umounts.

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

    Jan Kara
     
  • ext3_orphan_add() and ext3_orphan_del() functions lock sb->s_lock with a
    transaction started with ext3_mark_recovery_complete() waits for a transaction
    holding sb->s_lock, thus leading to a possible deadlock. At the moment we
    call ext3_mark_recovery_complete() from ext3_remount() we have done all the
    work needed for remounting and thus we are safe to drop sb->s_lock before we
    wait for transactions to commit. Note that at this moment we are still
    guarded by s_umount lock against other remounts/umounts.

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

    Jan Kara
     
  • Especially when !CONFIG_HOTPLUG_CPU, avoid needlessy allocating resources for
    CPUs that can never become available.

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

    Jan Beulich
     
  • It should improve performance in some scenarii where a lot of
    these nsproxy objects are created by unsharing namespaces. This is
    a typical use of virtual servers that are being created or entered.

    This is also a good tool to find leaks and gather statistics on
    namespace usage.

    Signed-off-by: Cedric Le Goater
    Cc: Herbert Poetzl
    Cc: Pavel Emelianov
    Cc: "Eric W. Biederman"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Cedric Le Goater