31 Oct, 2006

2 commits

  • When the ioprio code recently got juggled a bit, a bug was introduced.
    changed_ioprio() is no longer called with interrupts disabled, so using
    plain spin_lock() on the queue_lock is a bug.

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     
  • If cfq_set_request() is called for a new process AND a non-fs io
    request (so that __GFP_WAIT may not be set), cfq_cic_link() may
    use spin_lock_irq() and spin_unlock_irq() with interrupts already
    disabled.

    Fix is to always use irq safe locking in cfq_cic_link()

    Acked-By: Arjan van de Ven
    Acked-by: Ingo Molnar
    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

30 Oct, 2006

13 commits

  • This reverts commit a2b98a697fa4e7564f78905b83db122824916cf9.

    As per Guennadi Liakhovetski, the mac address change support code breaks
    some normal uses (_without_ any address changes), and until it's all
    sorted out, we're better off without it.

    Says Francois:

    "Go revert it.

    Despite what I claimed, I can not find a third-party confirmation by
    email that it works elsewhere.

    It would probably be enough to remove the call to
    __rtl8169_set_mac_addr() in rtl8169_hw_start() though."

    See also

    http://bugzilla.kernel.org/show_bug.cgi?id=6032

    Cc: Guennadi Liakhovetski
    Acked-by: Francois Romieu
    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * master.kernel.org:/home/rmk/linux-2.6-arm:
    [ARM] 3914/1: [Jornada7xx] - Typo Fix in cpu-sa1110.c (b != B)
    [ARM] 3913/1: n2100: fix IRQ routing for second ethernet port
    [ARM] Add KBUILD_IMAGE target support
    [ARM] Fix suspend oops caused by PXA2xx PCMCIA driver
    [ARM] Fix i2c-pxa slave mode support
    [ARM] 3900/1: Fix VFP Division by Zero exception handling.
    [ARM] 3899/1: Fix the normalization of the denormal double precision number.
    [ARM] 3909/1: Disable UWIND_INFO for ARM (again)
    [ARM] Add __must_check to uaccess functions
    [ARM] Add realview SMP default configuration
    [ARM] Fix SMP irqflags support

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia-fixes-2.6:
    [PATCH] PCMCIA: fix __must_check warnings
    [PATCH] PCMCIA: handle sysfs, PCI errors
    [PATCH] Export soc_common_drv_pcmcia_remove to allow modular PCMCIA.
    [PATCH] ioremap balanced with iounmap for drivers/pcmcia
    [PATCH] pcmcia: au1000_generic fix
    [PATCH] i82092: wire up errors from pci_register_driver()
    [PATCH] CONFIG_PM=n slim: drivers/pcmcia/*
    [PATCH] pcmcia/ds: driver layer error checking
    [PATCH] pcmcia: update alloc_io_space for conflict checking for multifunction PC card
    [PATCH] pcmcia: add more IDs to hostap_cs.c
    [PATCH] pcmcia: at91_cf update

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/wim/linux-2.6-watchdog:
    [WATCHDOG] sc1200wdt.c pnp unregister fix.

    Linus Torvalds
     
  • "K4S281632b-1H" should read "K4S281632B-1H" (As it does everywhere
    else). No more coffe!

    Signed-off-by: Kristoffer Ericson
    Signed-off-by: Russell King

    Kristoffer Ericson
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394-2.6:
    ieee1394: ohci1394: revert fail on error in suspend

    Linus Torvalds
     
  • If no devices found or invalid parameter is specified,
    scl200wdt_pnp_driver is left unregistered.
    It breaks global list of pnp drivers.

    Signed-off-by: Akinobu Mita
    Signed-off-by: Wim Van Sebroeck
    Signed-off-by: Andrew Morton

    Akinobu Mita
     
  • Commit 61ce1efe6e40233663d27ab8ac9ba9710eebcaad missed the m68k initcall
    sections.

    Signed-off-by: Geert Uytterhoeven
    Signed-off-by: Linus Torvalds

    Geert Uytterhoeven
     
  • prepare_reply() adds GENL_HDRLEN to the payload (genlmsg_total_size()),
    but then it does genlmsg_put()->nlmsg_put(). This means we forget to
    reserve a room for 'struct nlmsghdr'.

    Signed-off-by: Oleg Nesterov
    Cc: Thomas Graf
    Cc: Andrew Morton
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jay Lan
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • 'return genlmsg_cancel()' in taskstats_user_cmd/taskstats_exit_send
    potentially leaks a skb. Unless we pass 'rep_skb' to the netlink layer
    we own sk_buff. This means we should always do kfree_skb() on failure.

    [ Thomas acked and pointed out missing return value in original version ]

    Signed-off-by: Oleg Nesterov
    Acked-by: Thomas Graf
    Cc: Andrew Morton
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jay Lan
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Some errors during preparation for suspended state can be skipped with a
    warning instead of a failure of the whole suspend transition, notably an
    error in pci_set_power_state.

    Signed-off-by: Stefan Richter

    Stefan Richter
     
  • The second ethernet port on the Thecus n2100 was incorrectly assigned
    to XINT1 instead of the correct XINT3 (PCI INTB instead of INTD), which
    caused that port to be non-functional.

    Signed-off-by: Lennert Buytenhek
    Signed-off-by: Russell King

    Lennert Buytenhek
     
  • As reported by Martin J. Bligh , we let through some
    non-slab bits to slab allocation through __get_vm_area_node when doing a
    vmalloc.

    I haven't been able to reproduce this, although I understand why it
    happens: vmalloc allocates memory with

    GFP_KERNEL | __GFP_HIGHMEM

    and commit 52fd24ca1db3a741f144bbc229beefe044202cac resulted in the same
    flags are passed down to cache_alloc_refill, causing the BUG. The
    following patch fixes it.

    Note that when calling kmalloc_node, I am masking off __GFP_HIGHMEM with
    GFP_LEVEL_MASK, whereas __vmalloc_area_node does the same with

    ~(__GFP_HIGHMEM | __GFP_ZERO).

    IMHO, using GFP_LEVEL_MASK is preferable, but either should fix this
    problem.

    Signed-off-by: Giridhar Pemmasani (pgiri@yahoo.com)
    Cc: Martin J. Bligh
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Giridhar Pemmasani
     

29 Oct, 2006

25 commits

  • Add support for KBUILD_IMAGE on ARM. This takes the usual target
    specifiers (zImage/Image/etc) in the same way that powerpc does
    (iow, without the arch/arm/boot prefix).

    Signed-off-by: Russell King

    Russell King
     
  • The PXA2xx PCMCIA driver was registering a device_driver with the
    platform_bus_type. Unfortunately, this causes data outside the
    device_driver structure to be dereferenced as if it were a
    platform_driver structure, causing an oops. Convert the PXA2xx
    core driver to use the proper platform_driver structure.

    Signed-off-by: Russell King

    Russell King
     
  • i2c-pxa times out when trying to enable slave mode due to an
    incorrect test. Also, check that i2c->slave is non-NULL
    before dereferencing it.

    Signed-off-by: Russell King

    Russell King
     
  • * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
    [S390] cio: Make ccw_device_register() static.
    [S390] Improve AP bus device removal.
    [S390] uaccess error handling.
    [S390] cio: css_probe_device() must be called enabled.
    [S390] Initialize interval value to 0.
    [S390] sys_getcpu compat wrapper.

    Linus Torvalds
     
  • absent_pages_in_range() made the assumption that users of the
    arch-independent zone-sizing API would not care about holes beyound the end
    of physical memory. This was not the case and was "fixed" in a patch
    called "Account for holes that are outside the range of physical memory".
    However, when given a range that started before a hole in "real" memory and
    ended beyond the end of memory, it would get the result wrong. The bug is
    in mainline but a patch is below.

    It has been tested successfully on a number of machines and architectures.
    Additional credit to Keith Mannthey for discovering the problem, helping
    identify the correct fix and confirming it Worked For Him.

    Signed-off-by: Mel Gorman
    Cc: keith mannthey
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mel Gorman
     
  • This patch (as812) changes the kerneldoc comments explaining the return
    values from queue_work(), queue_delayed_work(), and
    queue_delayed_work_on(). The updated comments explain more accurately the
    meaning of the return code and avoid suggesting that a 0 value means the
    routine was unsuccessful.

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

    Alan Stern
     
  • The Jmicron JMB368 is PATA only so has the PATA on function zero. Don't
    therefore skip function zero on this device when probing

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

    Alan Cox
     
  • _cpu_down() acquires `workqueue_mutex' on its process, but doen't release it
    if __cpu_disable() fails.

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

    Satoru Takeuchi
     
  • I notice that the code which implements adjtime clears the time_adjust
    value before using it. The attached patch makes the obvious fix.

    Acked-by: Roman Zippel
    Signed-off-by: Jim Houston
    Cc: John Stultz
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jim Houston
     
  • Put SYS_HYPERVISOR inside the Generic Driver Config menu where it should
    be. Otherwise xconfig displays it as a dangling (lost) menu item under
    Device Drivers, all by itself (when all options are displayed).

    Signed-off-by: Randy Dunlap
    Cc:
    Cc: Martin Schwidefsky
    Cc: Heiko Carstens
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • fill_tgid() should skip not only an already exited group leader. If the
    task has ->exit_state != 0 it already did exit_notify(), so it also did
    fill_tgid_exit()->delayacct_add_tsk(->signal->stats) and we should skip it
    to avoid a double accounting.

    This patch doesn't close the race completely, but it cleanups the code.

    Signed-off-by: Oleg Nesterov
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Remove tasklist_lock from taskstats.c. find_task_by_pid() is rcu-safe.
    ->siglock allows us to traverse subthread without tasklist.

    Q: delay accounting looks wrong to me. If sub-thread has already called
    taskstats_exit_send() but didn't call release_task(self) yet it will be
    accounted twice. The window is big. No?

    Signed-off-by: Oleg Nesterov
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • signal_struct is (mostly) protected by ->sighand->siglock, I think we don't
    need ->taskstats_lock to protect ->stats. This also allows us to simplify the
    locking in fill_tgid().

    Signed-off-by: Oleg Nesterov
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • Every subthread (except first) does unneeded kmem_cache_alloc/kmem_cache_free.

    Signed-off-by: Oleg Nesterov
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • taskstats_tgid_free() is called on copy_process's error path. This is wrong.

    IF (clone_flags & CLONE_THREAD)
    We should not clear ->signal->taskstats, current uses it,
    it probably has a valid accumulated info.
    ELSE
    taskstats_tgid_init() set ->signal->taskstats = NULL,
    there is nothing to free.

    Move the callsite to __exit_signal(). We don't need any locking, entire
    thread group is exiting, nobody should have a reference to soon to be
    released ->signal.

    Signed-off-by: Oleg Nesterov
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • 1. ts = timespec_sub(uptime, current->group_leader->start_time);

    It is possible that current != tsk. Probably it was supposed
    to be 'tsk->group_leader->start_time. But why we are reading
    group_leader's start_time ? This accounting is per thread,
    not per procees, I changed this to 'tsk->start_time.
    Please corect me.

    2. stats->ac_ppid = (tsk->parent) ? tsk->parent->pid : 0;

    tsk->parent never == NULL, and it is unsafe to dereference it.
    Both the task and it's parent may exit after the caller unlocks
    tasklist_lock, the memory could be unmapped (DEBUG_SLAB).
    (And we should use ->real_parent->tgid in fact).

    Q: I don't understand the 'if (thread_group_leader(tsk))' check.
    Why it is needed ?

    Signed-off-by: Oleg Nesterov
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Acked-by: Jay Lan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • 1. fill_tgid() forgets to do put_task_struct(first).

    2. release_task(first) can happen after fill_tgid() drops tasklist_lock,
    it is unsafe to dereference first->signal.

    This is a temporary fix, imho the locking should be reworked.

    Signed-off-by: Oleg Nesterov
    Cc: Shailabh Nagar
    Cc: Balbir Singh
    Cc: Jay Lan
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • strstrip() does not remove the last blank from strings which only consist
    of blanks.

    Example:
    char string[] = " ";
    strstrip(string);

    results in " ", but should produce an empty string!

    The following patch solves this problem:

    Acked-by: Martin Schwidefsky
    Signed-off-by: Michael Holzheu
    Acked-by: Pekka Enberg
    Acked-by Joern Engel
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michael Holzheu
     
  • This means we can call it when the bitmap we want to fetch is declared
    const.

    Signed-off-by: Stephen Rothwell
    Cc: Christoph Lameter
    Cc: Paul Jackson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Stephen Rothwell
     
  • With Vasily Averin

    Fix an error in unused dentry counting in shrink_dcache_for_umount_subtree()
    in which the count is modified without the dcache_lock held.

    Signed-off-by: David Howells
    Cc: Vasily Averin
    Cc: Neil Brown
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • On the the following patch:
    http://linux.bkbits.net:8080/linux-2.6/gnupatch@449b144ecSF1rYskg3q-SeR2vf88zg

    # ChangeSet
    # 2006/06/22 15:05:57-07:00 neilb@suse.de
    # [PATCH] Fix dcache race during umount

    # If prune_dcache finds a dentry that it cannot free, it leaves it where it
    # is (at the tail of the list) and exits, on the assumption that some other
    # thread will be removing that dentry soon.

    However as far as I see this comment is not correct: when we cannot take
    s_umount rw_semaphore (for example because it was taken in do_remount) this
    dentry is already extracted from dentry_unused list and we do not add it
    into the list again. Therefore dentry will not be found by prune_dcache()
    and shrink_dcache_sb() and will leave in memory very long time until the
    partition will be unmounted.

    The patch adds this dentry into tail of the dentry_unused list.

    Signed-off-by: Vasily Averin
    Cc: Neil Brown
    Acked-by: David Howells
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Vasily Averin
     
  • If you truncated an mmap'ed hugetlbfs file, then faulted on the truncated
    area, /proc/meminfo's HugePages_Rsvd wrapped hugely "negative". Reinstate my
    preliminary i_size check before attempting to allocate the page (though this
    only fixes the most obvious case: more work will be needed here).

    Signed-off-by: Hugh Dickins
    Cc: Adam Litke
    Cc: David Gibson
    Cc: "Chen, Kenneth W"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • hugetlb_vmtruncate_list was misconverted to prio_tree: its prio_tree is in
    units of PAGE_SIZE (PAGE_CACHE_SIZE) like any other, not HPAGE_SIZE (whereas
    its radix_tree is kept in units of HPAGE_SIZE, otherwise slots would be
    absurdly sparse).

    At first I thought the error benign, just calling __unmap_hugepage_range on
    more vmas than necessary; but on 32-bit machines, when the prio_tree is
    searched correctly, it happens to ensure the v_offset calculation won't
    overflow. As it stood, when truncating at or beyond 4GB, it was liable to
    discard pages COWed from lower offsets; or even to clear pmd entries of
    preceding vmas, triggering exit_mmap's BUG_ON(nr_ptes).

    Signed-off-by: Hugh Dickins
    Cc: Adam Litke
    Cc: David Gibson
    Cc: "Chen, Kenneth W"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • On 32-bit machines, mount -t hugetlbfs -o size=4G gave a 0GB filesystem,
    size=5G gave a 1GB filesystem etc: there's no point in masking size with
    HPAGE_MASK just before shifting its lower bits away, and since HPAGE_MASK is a
    UL, that removed all the higher bits of the unsigned long long size.

    Signed-off-by: Hugh Dickins
    Cc: Adam Litke
    Cc: David Gibson
    Cc: "Chen, Kenneth W"
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hugh Dickins
     
  • Fix printk format warnings:
    drivers/block/cciss.c:2000: warning: long long int format, long unsigned int arg (arg 2)
    drivers/block/cciss.c:2035: warning: long long int format, long unsigned int arg (arg 2)

    Signed-off-by: Randy Dunlap
    Acked-by: Mike Miller
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy Dunlap