26 Mar, 2006

40 commits

  • text data bss dec hex filename
    before: 3605597 1363528 363328 5332453 515de5 vmlinux
    after: 3605295 1363612 363200 5332107 515c8b vmlinux

    218 bytes saved.

    Also, optimise any_online_cpu() out of existence on CONFIG_SMP=n.

    This function seems inefficient. Can't we simply AND the two masks, then use
    find_first_bit()?

    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Shrinks the only caller (net/bridge/netfilter/ebtables.c) by 174 bytes.

    Also, optimise highest_possible_processor_id() out of existence on
    CONFIG_SMP=n.

    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • text data bss dec hex filename
    before: 3488027 1322496 360128 5170651 4ee5db vmlinux
    after: 3485112 1322480 359968 5167560 4ed9c8 vmlinux

    2931 bytes saved

    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • text data bss dec hex filename
    before: 3490577 1322408 360000 5172985 4eeef9 vmlinux
    after: 3488027 1322496 360128 5170651 4ee5db vmlinux

    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Add rs422 support to the Altix ioc4 serial driver.

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

    Pat Gefre
     
  • dev should be validated before it is being used as index to array.

    Coverity bug #871

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

    Eugene Teo
     
  • Fix a check-after-use spotted by the Coverity checker.

    Signed-off-by: Adrian Bunk
    Cc: Karsten Keil
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Documentation changes to help radix tree users avoid overrunning the tags
    array. RADIX_TREE_TAGS moves to linux/radix-tree.h and is now known as
    RADIX_TREE_MAX_TAGS (Nick Piggin's idea). Tag parameters are changed to
    unsigned, and some comments are updated.

    Signed-off-by: Jonathan Corbet
    Cc: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan Corbet
     
  • Correct some error handling on the compat version of the nfsservctl()
    system. It was detecting errors while copying in the arguments from user
    space, but then attempting to use the arguments anyway. This didn't seem
    so good.

    Signed-off-by: Peter Staubach
    Cc: Trond Myklebust
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Staubach
     
  • This patch fixes i2o_dump_hrt output from dmesg:

    iop0: HRT has 1 entries of 16 bytes each.
    Adapter 00000012: TID 0000:[HPC*]:PCI 1: Bus 1 Device 22
    Function 0

    Signed-off-by: Vasily Averin
    Cc: Markus Lidel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vasily Averin
     
  • The "rounded up to nearest power of 2 in size" algorithm in
    alloc_large_system_hash is not correct. As coded, it takes an otherwise
    acceptable power-of-2 value and doubles it. For example, we see the error
    if we boot with thash_entries=2097152 which produces a hash table with
    4194304 entries.

    Signed-off-by: John Hawkes
    Cc: Roland Dreier
    Cc: "Chen, Kenneth W"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    John Hawkes
     
  • fls() takes an integer, so roundup_pow_of_two() is busted for ulongs larger
    than 2^32-1.

    Fix this by implementing and using fls_long().

    (Why does roundup_pow_of_two() return a long?)

    (Why is roundup_pow_of_two() __attribute_const__ whereas long_log2() is
    __attribute_pure__?)

    (Why does long_log2() suck so much? Because we were missing fls_long()?)

    Cc: Roland Dreier
    Cc: "Chen, Kenneth W"
    Cc: John Hawkes
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • While doing some benchmarks of an Apache/PHP SMP server, I noticed high
    oprofile numbers in in_group_p() and _atomic_dec_and_lock().

    rank percent
    1 4.8911 % __link_path_walk
    2 4.8503 % __d_lookup
    *3 4.2911 % _atomic_dec_and_lock
    4 3.9307 % __copy_to_user_ll
    5 4.9004 % sysenter_past_esp
    *6 3.3248 % in_group_p

    It appears that in_group_p() does an uncessary

    get_group_info(current->group_info); /* atomic_inc() */
    ... /* access current->group_info */
    put_group_info(current->group_info); /* _atomic_dec_and_lock */

    It is not necessary to do this, because the current task holds a reference
    on its own group_info, and this reference cannot change during the lookup.

    This patch deletes the get_group_info()/put_group_info() pair from
    sys_getgroups(), in_group_p() and in_egroup_p() functions.

    Signed-off-by: Eric Dumazet
    Cc: Tim Hockin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Eric Dumazet
     
  • If I mount ext2 "rw", I want it to say "rw", not "rw,nogrpid".

    I caught this writing an automated regression test script for the busybox
    mount command. The symptom is
    /dev/loop0 on /images/ext2.dir type ext2 (rw,nogrpid)
    instead of:
    /dev/loop0 on /images/ext2.dir type ext2 (rw)

    The behavior was introduced by git commit
    8fc2751beb0941966d3a97b26544e8585e428c08.

    Signed-off-by: Rob Landley
    Cc: Mark Bellon
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rob Landley
     
  • http://mpeg.openprojects.net/ doesn't exist

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

    Johannes Stezenbach
     
  • As prepare_write, commit_write and readpage are allowed to return
    AOP_TRUNCATE_PAGE, page_symlink should respond to them.

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

    NeilBrown
     
  • Flesh out the description of the address_space operations.

    Signed-off-by: Neil Brown
    Cc: Avishay Traeger
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    NeilBrown
     
  • fs/reiserfs/item_ops.c: In function 'indirect_print_item':
    fs/reiserfs/item_ops.c:278: warning: 'num' may be used uninitialized in this function

    (akpm: this is probably just gcc being dumb)

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

    Benoit Boissinot
     
  • Mailing this address gives.. Sorry your message to max_mk@yahoo.com cannot
    be delivered. This account has been disabled or discontinued [#102].
    mta129.mail.re4.yahoo.com)

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

    Dave Jones
     
  • Nice place isn't it? I've lived in 7 other houses since then.

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

    Jamie Lokier
     
  • The Coverity checker found this memory leak.

    Signed-off-by: Adrian Bunk
    Acked-by: Corey Minyard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • We dereference bitmap both one line above and one line below this check
    rendering this check quite useless.

    Spotted by the Coverity checker.

    Signed-off-by: Adrian Bunk
    Cc: Alasdair G Kergon
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • The Coverity checker wasn't happy seeing a size_t compared with -ENODATA
    and -ENOSYS.

    Since the only place where size is set is through the result of
    reiserfs_xattr_get() which is an int, we could simply make size an int.

    Signed-off-by: Adrian Bunk
    Cc: Jeff Mahoney
    Cc: Chris Mason
    Cc: Hans Reiser
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     
  • Initramfs initrd images do not need a ramdisk device, so remove this
    restriction in Kconfig. BLK_DEV_RAM=n saves about 13k on i386. Also
    without ramdisk device there's no need for "dry run", so initramfs unpacks
    much faster.

    People using cramfs, squashfs, or gzipped ext2/minix initrd images are
    probably smart enough not to turn off ramdisk support by accident.

    Cc: Al Viro
    Cc: Christoph Hellwig
    Cc: "H. Peter Anvin"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Zdenek Pavlas
     
  • A couple of places are forgetting to take it.

    The kswapd case is probably unimportant. keventd_create_kthread() was racy.

    The whole thing is a bit flakey: you start a kernel thread, get its pid from
    kernel_thread() then look up its task_struct.

    a) It assumes that pid recycling takes a "long" time.

    b) We get a task_struct but no reference was taken on it. The owner of the
    kswapd and kthread task_struct*'s must assume that the new thread won't
    exit unexpectedly. Because if it does, they're left holding dead memory
    and any attempt to control or stop that task will crash.

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

    Andrew Morton
     
  • When EXT3FS_DEBUG is #define-d, the compile breaks due to #include file
    issues.

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

    Kirk True
     
  • This fixes coverity bugs #398 and #397

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

    Jesper Juhl
     
  • This patch reduces scheduling latency in shrink_dcache_sb() noticed during
    remounting of big partitions with many cached dentries. The same latency
    fix was applied to select_parent() long ago.

    Signed-off-by: Denis Lunev
    Signed-off-by: Pavel Emelianov
    Signed-off-by: Kirill Korotaev
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kirill Korotaev
     
  • In here, I think the following order is more cache-friendly.

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

    OGAWA Hirofumi
     
  • freeze_bdev() uses a fsync_super() without sync_blockdev(). This patch
    makes __fsync_super() and shares it.

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

    OGAWA Hirofumi
     
  • Believe it or not, but in fs/minix/*, the oldest filesystem in the kernel,
    something still can be fixed:

    printk("new_inode: bit already set");

    "\n" is missing!

    While at it, I also removed periods from the end of error messages and made
    capitalization uniform. Also s/i-node/inode/, s/printk (/printk(/

    Signed-ff-by: Denis Vlasenko

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

    Denis Vlasenko
     
  • PTRACE_TRACEME doesn't have proper capabilities validation when parent is
    less privileged than child. Issue pointed out by Ram Gupta
    .

    Note: I haven't identified a strong security issue, and it's a small ABI
    change that could break apps that rely on existing behaviour (which allows
    parent that is less privileged than child to ptrace when child does
    PTRACE_TRACEME).

    Signed-off-by: Chris Wright
    Cc: Ram Gupta
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chris Wright
     
  • Move capable() to kernel/capability.c and eliminate duplicate
    implementations. Add __capable() function which can be used to check for
    capabiilty of any process.

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

    Chris Wright
     
  • This patch adds a proper prototype for setup_arch() in init.h.

    This patch is based on a patch by Ben Dooks .

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

    Adrian Bunk
     
  • Implement the half-closed devices notifiation, by adding a new POLLRDHUP
    (and its alias EPOLLRDHUP) bit to the existing poll/select sets. Since the
    existing POLLHUP handling, that does not report correctly half-closed
    devices, was feared to be changed, this implementation leaves the current
    POLLHUP reporting unchanged and simply add a new bit that is set in the few
    places where it makes sense. The same thing was discussed and conceptually
    agreed quite some time ago:

    http://lkml.org/lkml/2003/7/12/116

    Since this new event bit is added to the existing Linux poll infrastruture,
    even the existing poll/select system calls will be able to use it. As far
    as the existing POLLHUP handling, the patch leaves it as is. The
    pollrdhup-2.6.16.rc5-0.10.diff defines the POLLRDHUP for all the existing
    archs and sets the bit in the six relevant files. The other attached diff
    is the simple change required to sys/epoll.h to add the EPOLLRDHUP
    definition.

    There is "a stupid program" to test POLLRDHUP delivery here:

    http://www.xmailserver.org/pollrdhup-test.c

    It tests poll(2), but since the delivery is same epoll(2) will work equally.

    Signed-off-by: Davide Libenzi
    Cc: "David S. Miller"
    Cc: Michael Kerrisk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Davide Libenzi
     
  • This fix prevents re-disabling and enabling of a previously disabled
    interrupt. On an SMP system with irq balancing enabled; If an interrupt is
    disabled from within its own interrupt context with disable_irq_nosync and is
    also earmarked for processor migration, the interrupt is blindly moved to the
    other processor and enabled without regard for its current "enabled" state.
    If there is an interrupt pending, it will unexpectedly invoke the irq handler
    on the new irq owning processor (even though the irq was previously disabled)

    The more intuitive fix would be to invoke disable_irq_nosync and
    enable_irq, but since we already have the desc->lock from __do_IRQ, we
    cannot call them directly. Instead we can use the same logic to disable
    and enable found in disable_irq_nosync and enable_irq, with regards to the
    desc->depth.

    This now prevents a disabled interrupt from being re-disabled, and more
    importantly prevents a disabled interrupt from being incorrectly enabled on
    a different processor.

    Signed-off-by: Bryan Holty
    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Bryan Holty
     
  • Uninline some massive IRQ migration functions. Put them in the new
    kernel/irq/migration.c.

    Cc: Andi Kleen
    Cc: "Luck, Tony"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • sparc32:

    drivers/input/touchscreen/ads7846.c: In function `ads7846_read12_ser':
    drivers/input/touchscreen/ads7846.c:206: warning: implicit declaration of function `disable_irq'
    drivers/input/touchscreen/ads7846.c:208: warning: implicit declaration of function `enable_irq'

    Cc: Dmitry Torokhov
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • In file included from drivers/char/tpm/tpm_nsc.c:23:
    drivers/char/tpm/tpm.h: In function `tpm_read_index':
    drivers/char/tpm/tpm.h:92: warning: implicit declaration of function `outb'
    drivers/char/tpm/tpm.h:93: warning: implicit declaration of function `inb'

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

    Andrew Morton
     
  • This adds missing bits of collie (sharp sl-5500) PCMCIA support and
    MFD support.

    Signed-off-by: Pavel Machek
    Acked-by: Richard Purdie
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Pavel Machek