24 Sep, 2010

1 commit


23 Sep, 2010

14 commits


22 Sep, 2010

13 commits


21 Sep, 2010

12 commits

  • The per-pmu per-cpu context patch converted things from
    get_cpu_var() to this_cpu_ptr(), but that only works if
    rcu_read_lock() actually disables preemption, and since
    there is no such guarantee, we need to fix that.

    Use the newly introduced {get,put}_cpu_ptr().

    Signed-off-by: Peter Zijlstra
    Cc: Tejun Heo
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • These are similar to {get,put}_cpu_var() except for dynamically
    allocated per-cpu memory.

    Signed-off-by: Peter Zijlstra
    Acked-by: Tejun Heo
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Merge reason: Pick up the latest fixes in -rc5.

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • There's a situation where the nohz balancer will try to wake itself:

    cpu-x is idle which is also ilb_cpu
    got a scheduler tick during idle
    and the nohz_kick_needed() in trigger_load_balance() checks for
    rq_x->nr_running which might not be zero (because of someone waking a
    task on this rq etc) and this leads to the situation of the cpu-x
    sending a kick to itself.

    And this can cause a lockup.

    Avoid this by not marking ourself eligible for kicking.

    Signed-off-by: Suresh Siddha
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Suresh Siddha
     
  • Mike reported a kernel crash when a usb key hotplug is performed while all
    kernel thrads are not in a root cgroup and are running in one of the child
    cgroups of blkio controller.

    BUG: unable to handle kernel NULL pointer dereference at 0000002c
    IP: [] cfq_get_queue+0x232/0x412
    *pde = 00000000
    Oops: 0000 [#1] PREEMPT
    last sysfs file: /sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/host3/scsi_host/host3/uevent

    [..]
    Pid: 30039, comm: scsi_scan_3 Not tainted 2.6.35.2-fg.roam #1 Volvi2 /Aspire 4315
    EIP: 0060:[] EFLAGS: 00010086 CPU: 0
    EIP is at cfq_get_queue+0x232/0x412
    EAX: f705f9c0 EBX: e977abac ECX: 00000000 EDX: 00000000
    ESI: f00da400 EDI: f00da4ec EBP: e977a800 ESP: dff8fd00
    DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
    Process scsi_scan_3 (pid: 30039, ti=dff8e000 task=f6b6c9a0 task.ti=dff8e000)
    Stack:
    00000000 00000000 00000001 01ff0000 f00da508 00000000 f00da524 f00da540
    e7994940 dd631750 f705f9c0 e977a820 e977ac44 f00da4d0 00000001 f6b6c9a0
    00000010 00008010 0000000b 00000000 00000001 e977a800 dd76fac0 00000246
    Call Trace:
    [] ? cfq_set_request+0x228/0x34c
    [] ? cfq_set_request+0x0/0x34c
    [] ? elv_set_request+0xf/0x1c
    [] ? get_request+0x1ad/0x22f
    [] ? get_request_wait+0x1f/0x11a
    [] ? kvasprintf+0x33/0x3b
    [] ? scsi_execute+0x1d/0x103
    [] ? scsi_execute_req+0x58/0x83
    [] ? scsi_probe_and_add_lun+0x188/0x7c2
    [] ? attribute_container_add_device+0x15/0xfa
    [] ? kobject_get+0xf/0x13
    [] ? get_device+0x10/0x14
    [] ? scsi_alloc_target+0x217/0x24d
    [] ? __scsi_scan_target+0x95/0x480
    [] ? dequeue_entity+0x14/0x1fe
    [] ? update_curr+0x165/0x1ab
    [] ? update_curr+0x165/0x1ab
    [] ? scsi_scan_channel+0x4a/0x76
    [] ? scsi_scan_host_selected+0x77/0xad
    [] ? do_scan_async+0x0/0x11a
    [] ? do_scsi_scan_host+0x51/0x56
    [] ? do_scan_async+0x0/0x11a
    [] ? do_scan_async+0xe/0x11a
    [] ? do_scan_async+0x0/0x11a
    [] ? kthread+0x5e/0x63
    [] ? kthread+0x0/0x63
    [] ? kernel_thread_helper+0x6/0x10
    Code: 44 24 1c 54 83 44 24 18 54 83 fa 03 75 94 8b 06 c7 86 64 02 00 00 01 00 00 00 83 e0 03 09 f0 89 06 8b 44 24 28 8b 90 58 01 00 00 42 2c 85 c0 75 03 8b 42 08 8d 54 24 48 52 8d 4c 24 50 51 68
    EIP: [] cfq_get_queue+0x232/0x412 SS:ESP 0068:dff8fd00
    CR2: 000000000000002c
    ---[ end trace 9a88306573f69b12 ]---

    The problem here is that we don't have bdi->dev information available when
    thread does some IO. Hence when dev_name() tries to access bdi->dev, it
    crashes.

    This problem does not happen if kernel threads are in root group as root
    group is statically allocated at device initialization time and we don't
    hit this piece of code.

    Fix it by delaying the filling of major and minor number information of
    device in blk_group. Initially a blk_group is created with 0 as device
    information and this information is filled later once some more IO comes
    in from same group.

    Reported-by: Mike Kazantsev
    Signed-off-by: Vivek Goyal
    Signed-off-by: Jens Axboe

    Vivek Goyal
     
  • This bug was introduced in 7b6d91daee5cac6402186ff224c3af39d79f4a0e
    "block: unify flags for struct bio and struct request"

    Cc: Boaz Harrosh
    Signed-off-by: Benny Halevy
    Signed-off-by: Jens Axboe

    Benny Halevy
     
  • The "h->scatter_list" is allocated inside a for loop. If any of those
    allocations fail, then the rest of the list is uninitialized data. When
    we free it we should start from the top and free backwards so that we
    don't call kfree() on uninitialized pointers.

    Also if the allocation for "h->scatter_list" fails then we would get an
    Oops here. I should have noticed this when I send: 4ee69851c "cciss:
    handle allocation failure." but I didn't. Sorry about that.

    Signed-off-by: Dan Carpenter
    Signed-off-by: Jens Axboe

    Dan Carpenter
     
  • Chris Wilson
     
  • If another cpu does a very wide munmap() on the signal frame area,
    it can tear down the page table hierarchy from underneath us.

    Borrow an idea from the 64-bit fault path's get_user_insn(), and
    disable cross call interrupts during the page table traversal
    to lock them in place while we operate.

    Reported-by: Al Viro
    Signed-off-by: David S. Miller

    David S. Miller
     
  • We used to have a hypercall which reloaded the entire GDT, then we
    switched to one which loaded a single entry (to match the IDT code).

    Some comments were not updated, so fix them.

    Signed-off-by: Rusty Russell
    Reported by: Eviatar Khen

    Rusty Russell
     
  • A userspace could submit a buffer with 0 length to be written to the
    host. Prevent such a situation.

    This was not needed previously, but recent changes in the way write()
    works exposed this condition to trigger a virtqueue event to the host,
    causing a NULL buffer to be sent across.

    Signed-off-by: Amit Shah
    Signed-off-by: Rusty Russell
    CC: stable@kernel.org

    Amit Shah
     
  • I found this while working on a Linux agent for spice, the symptom I was
    seeing was select blocking on the spice vdagent virtio serial port even
    though there were messages queued up there.

    virtio_console's port_fops_poll checks port->inbuf != NULL to determine
    if read won't block. However if an application reads enough bytes from
    inbuf through port_fops_read, to empty the current port->inbuf,
    port->inbuf will be NULL even though there may be buffers left in the
    virtqueue.

    This causes poll() to block even though there is data to be read,
    this patch fixes this by using will_read_block(port) instead of the
    port->inbuf != NULL check.

    Signed-off-By: Hans de Goede
    Signed-off-by: Amit Shah
    Signed-off-by: Rusty Russell
    Cc: stable@kernel.org

    Hans de Goede