30 Aug, 2006

2 commits


28 Aug, 2006

38 commits

  • Linus Torvalds
     
  • Unlike the other tty comment patch this one has code changes. Specifically
    it limits the queue size for a tty to 64K characters (128Kbytes) worst case
    even if the tty is ignoring tty->throttle. This is because certain drivers
    don't honour the throttle value correctly, although it is a useful
    safeguard anyway.

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

    Alan Cox
     
  • Doesn't fix them but does show up some interesting areas that need review
    and fixing.

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

    Alan Cox
     
  • Fix printk format warning:
    drivers/cdrom/gscd.c:269: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 2 has type ‘unsigned int’

    Signed-off-by: Randy Dunlap
    Cc: Jens Axboe
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • When we select NUMA with i386, the system is only X86_NUMAQ or using ACPI.

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

    KAMEZAWA Hiroyuki
     
  • None of the other /proc/meminfo lines have a space in the identifier. This
    post-2.6.17 addition has the potential to break existing parsers, so use an
    underscore instead (like Committed_AS).

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

    Andrew Morton
     
  • This fixes the locking error noticed by lockdep:

    =============================================
    [ INFO: possible recursive locking detected ]
    ---------------------------------------------
    init/1 is trying to acquire lock:
    (&sighand->siglock){....}, at: [] flush_old_exec+0x3ae/0x859

    but task is already holding lock:
    (&sighand->siglock){....}, at: [] flush_old_exec+0x39e/0x859

    other info that might help us debug this:
    2 locks held by init/1:
    #0: (tasklist_lock){..--}, at: [] flush_old_exec+0x38e/0x859
    #1: (&sighand->siglock){....}, at: [] flush_old_exec+0x39e/0x859

    stack backtrace:
    [] show_trace_log_lvl+0x54/0xfd
    [] show_trace+0xd/0x10
    [] dump_stack+0x19/0x1b
    [] __lock_acquire+0x773/0x997
    [] lock_acquire+0x4b/0x6c
    [] _spin_lock+0x19/0x28
    [] flush_old_exec+0x3ae/0x859
    [] load_elf_binary+0x4aa/0x1628
    [] search_binary_handler+0xa7/0x24e
    [] do_execve+0x15b/0x1f9
    [] sys_execve+0x29/0x4d
    [] syscall_call+0x7/0xb

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Dave Jones
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • reiserfs seems to have another locking level layer for the i_mutex due to the
    xattrs-are-a-directory thing.

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

    Ingo Molnar
     
  • idescsi_pc_intr() uses local_irq_enable() in IRQ context: annotate it.

    (this has no effect on kernels with lockdep disabled. On kernels with lockdep
    enabled this means that we wont actually disable interrupts, and the warning
    message will go away as well.)

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

    Ingo Molnar
     
  • In file included from include/asm/mmzone.h:18,
    from include/linux/mmzone.h:439,

    include/asm/srat.h:31:2: error: #error CONFIG_ACPI_SRAT not defined, and srat.h header has been included
    make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1

    This can happen with CONFIG_NUMA && !CONFIG_ACPI && !CONFIG_X86_NUMAQ

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

    KAMEZAWA Hiroyuki
     
  • cpuset_excl_nodes_overlap always returns 0 if current is exiting. This caused
    customer's systems to panic in the OOM killer when processes were having
    trouble getting memory for the final put_user in mm_release. Even though
    there were lots of processes to kill.

    Change to returning 1 in this case. This achieves parity with !CONFIG_CPUSETS
    case, and was observed to fix the problem.

    Signed-off-by: Nick Piggin
    Acked-by: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • register_one_node()'s should be defined under CONFIG_NUMA=n.
    fixes following bug.

    CC init/version.o
    LD init/built-in.o
    LD .tmp_vmlinux1
    mm/built-in.o: In function `add_memory': undefined reference to `register_one_node'

    Signed-off-by: KAMEZAWA Hiroyuki
    Acked-by: Yasunori Goto
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    KAMEZAWA Hiroyuki
     
  • JBD currently allocates commit and frozen buffers from slabs. With
    CONFIG_SLAB_DEBUG, its possible for an allocation to cross the page
    boundary causing IO problems.

    https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=200127

    So, instead of allocating these from regular slabs - manage allocation from
    its own slabs and disable slab debug for these slabs.

    [akpm@osdl.org: cleanups]
    Signed-off-by: Badari Pulavarty
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Badari Pulavarty
     
  • Change the list of cpus allowed to tasks in the top (root) cpuset to
    dynamically track what cpus are online, using a CPU hotplug notifier. Make
    this top cpus file read-only.

    On systems that have cpusets configured in their kernel, but that aren't
    actively using cpusets (for some distros, this covers the majority of
    systems) all tasks end up in the top cpuset.

    If that system does support CPU hotplug, then these tasks cannot make use
    of CPUs that are added after system boot, because the CPUs are not allowed
    in the top cpuset. This is a surprising regression over earlier kernels
    that didn't have cpusets enabled.

    In order to keep the behaviour of cpusets consistent between systems
    actively making use of them and systems not using them, this patch changes
    the behaviour of the 'cpus' file in the top (root) cpuset, making it read
    only, and making it automatically track the value of cpu_online_map. Thus
    tasks in the top cpuset will have automatic use of hot plugged CPUs allowed
    by their cpuset.

    Thanks to Anton Blanchard and Nathan Lynch for reporting this problem,
    driving the fix, and earlier versions of this patch.

    Signed-off-by: Paul Jackson
    Cc: Nathan Lynch
    Cc: Anton Blanchard
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul Jackson
     
  • A recent patch broke the ability to do a user-request check of a raid1.
    This patch fixes the breakage and also moves a comment that was dislocated
    by the same patch.

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

    NeilBrown
     
  • If we
    - shut down a clean array,
    - restart with one (or more) drive(s) missing
    - make some changes
    - pause, so that they array gets marked 'clean',
    the event count on the superblock of included drives
    will be the same as that of the removed drives.
    So adding the removed drive back in will cause it
    to be included with no resync.

    To avoid this, we only update the eventcount backwards when the array
    is not degraded. In this case there can (should) be no non-connected
    drives that we can get confused with, and this is the particular case
    where updating-backwards is valuable.

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

    NeilBrown
     
  • Fix two compile failures in eventpoll.c code which would happen if
    DEBUG_EPOLL is bigger than zero.

    Signed-off-by: Masoud Sharbiani
    Cc: Davide Libenzi
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Masoud Asgharifard Sharbiani
     
  • Here's updated documentation for the relay interface, rewritten to match
    the relayfs->relay changes. It also moves relayfs.txt to relay.txt in the
    process.

    It includes the changes to relayfs.txt previously posted by Randy Dunlap,
    thanks for those.

    The relay-apps examples have also been updated to match, and can be found
    on the sourceforge relayfs website.

    Signed-off-by: Tom Zanussi
    Cc: "Randy.Dunlap"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tom Zanussi
     
  • An up() is called in kernel/stop_machine.c on failure, and also in the
    caller (unconditionally).

    Signed-off-by: Zhou Yingchao
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Yingchao Zhou
     
  • 1) When we allocated last fragment in ufs_truncate, we read page, check
    if block mapped to address, and if not trying to allocate it. This is
    wrong behaviour, fragment may be NOT allocated, but mapped, this
    happened because of "block map" function not checked allocated fragment
    or not, it just take address of the first fragment in the block, add
    offset of fragment and return result, this is correct behaviour in
    almost all situation except call from ufs_truncate.

    2) Almost all implementation of UFS, which I can investigate have such
    "defect": if you have full disk, and try truncate file, for example 3GB
    to 2MB, and have hole in this region, truncate return -ENOSPC. I tried
    evade from this problem, but "block allocation" algorithm is tied to
    right value of i_lastfrag, and fix of this corner case may slow down of
    ordinaries scenarios, so this patch makes behavior of "truncate"
    operations similar to what other UFS implementations do.

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

    Evgeniy Dushistov
     
  • On UFS, this scenario:
    open(O_TRUNC)
    lseek(1024 * 1024 * 80)
    write("A")
    lseek(1024 * 2)
    write("A")

    may cause access to invalid address.

    This happened because of "goal" is calculated in wrong way in block
    allocation path, as I see this problem exists also in 2.4.

    We use construction like this i_data[lastfrag], i_data array of pointers to
    direct blocks, indirect and so on, it has ceratain size ~20 elements, and
    lastfrag may have value for example 40000.

    Also this patch fixes related to handling such scenario issues, wrong
    zeroing metadata, in case of block(not fragment) allocation, and wrong goal
    calculation, when we allocate block

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

    Evgeniy Dushistov
     
  • To handle the earlier bogus ENOSPC error caused by filesystem full of block
    reservation, current code falls back to non block reservation, starts to
    allocate block(s) from the goal allocation block group as if there is no
    block reservation.

    Current code needs to re-load the corresponding block group descriptor for
    the initial goal block group in this case. The patch fixes this.

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

    Mingming Cao
     
  • Mounting an ext2 filesystem with zero s_inodes_per_group will cause a
    divide error.

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

    Andries Brouwer
     
  • Mounting a (corrupt) minix filesystem with zero s_zmap_blocks
    gives a spectacular crash on my 2.6.17.8 system, no doubt
    because minix/inode.c does an unconditional
    minix_set_bit(0,sbi->s_zmap[0]->b_data);

    [akpm@osdl.org: make labels conistent while we're there]

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

    Andries Brouwer
     
  • The recent hwctrl core conversion for MTD NAND devices broke the Amstrad
    Delta driver. This fixes it up and uses the existing control line defines
    rather than unclear magic numbers.

    Signed-off-by: Jonathan McDowell
    Acked-by: David Woodhouse
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jonathan McDowell
     
  • futex_find_get_task:

    if (p->state == EXIT_ZOMBIE || p->exit_state == EXIT_ZOMBIE)
    return NULL;

    I can't understand this. First, p->state can't be EXIT_ZOMBIE. The
    ->exit_state check looks strange too. Sub-threads or tasks whose ->parent
    ignores SIGCHLD go directly to EXIT_DEAD state (I am ignoring a ptrace
    case). Why EXIT_DEAD tasks should be ok? Yes, EXIT_ZOMBIE is more
    important (a task may stay zombie for a long time), but this doesn't mean
    we should explicitely ignore other EXIT_XXX states.

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

    Oleg Nesterov
     
  • When reading /dev/vcsa while a font with more than 256 characters is
    loaded, one of the attribute bits records the 9th bit of the character.
    But depending on the console driver (vgacon or fbcon for instance), that's
    bit 3 or bit 0. And there is no way for userland to know that, thus no way
    for userland to safely grab the screen content. So here is a (tested)
    patch:

    Add a VT_GETHIFONTMASK ioctl for knowing which bit is the 9th bit for VC
    text (vc_hi_font_mask field of the vc_data structure).

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

    Samuel Thibault
     
  • I wish I was happier about this patch. It'll serve as a placeholder for
    the moment. I'm still trying to get a G550 working in order to even
    reproduce the problem this patch introduces. I find that the G450 has
    jitter even without this patch, so it won't show me what the patch changed.
    At this point, I'll continue trying to get the G550 to work, and in
    parallel work with the G450 to work out the kinks.

    The patch is below.

    Set XDVICLKCTRL only on PPC, as doing this apparently introduces jitter on
    the G550, at least on x86 architectures.

    Signed-off-by: Paul A. Clarke
    Signed-off-by: Petr Vandrovec
    Cc: "Antonino A. Daplas"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paul A. Clarke
     
  • While testing Moxa C218T/PCI on PowerPC 405EP I found that loading firmware
    using the linux kernel driver fails because calculation of the checksum is
    not endianess independent in the original code.

    After I fixed this I found that uploading firmware in a system with
    multiple cards causes a kernel oops. I had a look in the recent moxa
    sources and found that they do some kind of locking there. Applying this
    lock fixed the problem.

    Alan sayeth:

    Checksum changes are clearly correct. Other changes is an improvement but
    not I think enough to handle malicious firmware attacks. That said such an
    attacker has CAP_SYS_RAWIO anyway so that part is irrelevant except for
    neatness.

    [akpm@osdl.org: cleanups]
    Signed-off-by: Dirk Eibach
    Acked-by: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dirk Eibach
     
  • Ignore the return value of early_init_acpi(), as it can give false error
    messages. If there is something really wrong, then register_driver will
    fail cleanly with EINVAL later.

    [ background: modprobe acpi-cpufreq on systems not capable of speed-scaling
    started failing with 'invalid argument', where previously it would only
    ever -ENODEV

    I'm not 100% happy with the solution. It'd be better to handle
    failure properly, but this is a low-impact change for 2.6.18
    We can always revisit doing this better in .19 --davej.]

    Signed-off-by: Venkatesh Pallipadi
    Signed-off-by: Dave Jones
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Dave Jones
     
  • sched_setscheduler() looks at ->signal->rlim[]. It is unsafe do
    dereference ->signal unless tasklist_lock or ->siglock is held (or p ==
    current). We pin the task structure, but this can't prevent from
    release_task()->__exit_signal() which sets ->signal = NULL.

    Restore tasklist_lock across the setscheduler call.

    Signed-off-by: Oleg Nesterov
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Commit b64ef8afa58f397e1eaba2bd9ecaa6812064d464 ("[PATCH] add imacfb
    documentation and detection") contained a wrong DMI_MATCH.

    Signed-off-by: Thomas Meyer
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Thomas Meyer
     
  • Read the return value before we release the nand device otherwise the
    value can become corrupted by another user of chip->ops, ultimately
    resulting in filesystem corruption.

    Signed-off-by: Richard Purdie
    Cc: David Woodhouse
    Acked-by: Josh Boyer
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Richard Purdie
     
  • On Wed, 2006-08-09 at 07:57 +0200, Rolf Eike Beer wrote:
    > =============================================
    > [ INFO: possible recursive locking detected ]
    > ---------------------------------------------
    > parted/7929 is trying to acquire lock:
    > (&bdev->bd_mutex){--..}, at: [] __blkdev_put+0x1e/0x13c
    >
    > but task is already holding lock:
    > (&bdev->bd_mutex){--..}, at: [] do_open+0x72/0x3a8
    >
    > other info that might help us debug this:
    > 1 lock held by parted/7929:
    > #0: (&bdev->bd_mutex){--..}, at: [] do_open+0x72/0x3a8
    > stack backtrace:
    > [] show_trace_log_lvl+0x58/0x15b
    > [] show_trace+0xd/0x10
    > [] dump_stack+0x17/0x1a
    > [] __lock_acquire+0x753/0x99c
    > [] lock_acquire+0x4a/0x6a
    > [] mutex_lock_nested+0xc8/0x20c
    > [] __blkdev_put+0x1e/0x13c
    > [] blkdev_put+0xa/0xc
    > [] do_open+0x336/0x3a8
    > [] blkdev_open+0x1f/0x4c
    > [] __dentry_open+0xc7/0x1aa
    > [] nameidata_to_filp+0x1c/0x2e
    > [] do_filp_open+0x2e/0x35
    > [] do_sys_open+0x38/0x68
    > [] sys_open+0x16/0x18
    > [] sysenter_past_esp+0x56/0x8d

    OK, I'm having a look here; its all new to me so bear with me.

    blkdev_open() calls
    do_open(bdev, ...,BD_MUTEX_NORMAL) and takes
    mutex_lock_nested(&bdev->bd_mutex, BD_MUTEX_NORMAL)

    then something fails, and we're thrown to:

    out_first: where
    if (bdev != bdev->bd_contains)
    blkdev_put(bdev->bd_contains) which is
    __blkdev_put(bdev->bd_contains, BD_MUTEX_NORMAL) which does
    mutex_lock_nested(&bdev->bd_contains->bd_mutex, BD_MUTEX_NORMAL) bd_contains is either bdev or whole, and
    since we take the branch it must be whole. So it seems to me the
    following patch would be the right one:

    [akpm@osdl.org: compile fix]
    Signed-off-by: Peter Zijlstra
    Cc: Arjan van de Ven
    Acked-by: NeilBrown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Peter Zijlstra
     
  • Recently a patch was added for preliminary suspend/resume handling on
    !PPC_PMAC. However, this broke both suspend and firewire on powerpc
    because it saves the pci state after the device has already been disabled.

    This moves the save state to before the pmac specific code.

    Signed-off-by: Danny Tholen
    Cc: Stefan Richter
    Acked-by: Benjamin Herrenschmidt
    Cc: Ben Collins
    Cc: Jody McIntyre
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Danny Tholen
     
  • Sergey Vlasov noticed that there is not kernel.suid_dumpable, but
    fs.suid_dumpable.

    How KERN_SETUID_DUMPABLE ended up in fs_table[]? Hell knows...

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

    Alexey Dobriyan
     
  • When cdev_add() failed there is no reason to call cdev_del().

    Signed-off-by: Rolf Eike Beer
    Cc: Alan Cox
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rolf Eike Beer
     
  • Fix the year check on setting the time with the S3C24XX RTC driver. Also
    move the debug to before the set to see what is going on if it does fail.

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

    Ben Dooks