31 Oct, 2008

12 commits

  • Just corrected the book name. I'm probably the only one who ever read
    this file :-)

    Signed-off-by: Jiri Pirko
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jiri Pirko
     
  • The total width of the command name plus spaces should be
    8 characters, but were 7 and 9, respectively. With 8 chars,
    all commands are now lining up nicely.

    The mandocs, psdocs, xmldocs commands are OK.

    Before:
    HOSTCC scripts/basic/docproc
    DOCPROC Documentation/DocBook/deviceiobook.xml
    HTML Documentation/DocBook/deviceiobook.html
    DOCPROC Documentation/DocBook/wanbook.xml
    PDF Documentation/DocBook/wanbook.pdf

    After:
    HOSTCC scripts/basic/docproc
    DOCPROC Documentation/DocBook/deviceiobook.xml
    HTML Documentation/DocBook/deviceiobook.html
    DOCPROC Documentation/DocBook/wanbook.xml
    PDF Documentation/DocBook/wanbook.pdf

    Signed-off-by: Hans Ulrich Niedermann
    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hans Ulrich Niedermann
     
  • Nothing uses prepare_write or commit_write. Remove them from the tree
    completely.

    [akpm@linux-foundation.org: schedule simple_prepare_write() for unexporting]
    Signed-off-by: Nick Piggin
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Nick Piggin
     
  • - remove 'private' field from struct subsys
    - remove cgroup_init_smp()

    Signed-off-by: Li Zefan
    Acked-by: Paul Menage
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Li Zefan
     
  • Just call unfreeze_cgroup() if goal_state == THAWED, and call
    try_to_freeze_cgroup() if goal_state == FROZEN.

    No behavior has been changed.

    Signed-off-by: Li Zefan
    Acked-by: Cedric Le Goater
    Acked-by: Matt Helsley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Li Zefan
     
  • Don't duplicate the implementation of thaw_process().

    [akpm@linux-foundation.org: make __thaw_process() static]
    Signed-off-by: Li Zefan
    Cc: Cedric Le Goater
    Acked-by: Matt Helsley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Li Zefan
     
  • It is sufficient to check if @task is frozen, and no need to check if the
    original freezer is frozen.

    Signed-off-by: Li Zefan
    Acked-by: Cedric Le Goater
    Acked-by: Matt Helsley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Li Zefan
     
  • The BUG_ON() should be protected by freezer->lock, otherwise it can be
    triggered easily when a task has been unfreezed but the corresponding
    cgroup hasn't been changed to FROZEN state.

    Signed-off-by: Li Zefan
    Acked-by: Cedric Le Goater
    Acked-by: Matt Helsley
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Li Zefan
     
  • I wrote a new module for Intel X38 chipset. This chipset is very similar
    to Intel 3200 chipset, but there are some different points, so I copyed
    i3200_edac.c and modified.

    This is Intel's web page describing this chipset.
    http://www.intel.com/Products/Desktop/Chipsets/X38/X38-overview.htm

    I've tested this new module with broken memory, and it seems to be working
    well.

    Signed-off-by: Hitoshi Mitake
    Signed-off-by: Doug Thompson
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Hitoshi Mitake
     
  • Signed-off-by: Alexey Dobriyan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Alexey Dobriyan
     
  • Removed duplicated #include's in drivers/video/via/global.h.
    debug.h
    viafbdev.h
    viamode.h

    Signed-off-by: Huang Weiyi
    Cc: Joseph Chan
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Huang Weiyi
     
  • By default, non-privileged tasks can only mlock() a small amount of
    memory to avoid a DoS attack by ordinary users. The Linux kernel
    defaulted to 32k (on a 4k page size system) to accommodate the needs of
    gpg.

    However, newer gpg2 needs 64k in various circumstances and otherwise
    fails miserably, see bnc#329675.

    Change the default to 64k, and make it more agnostic to PAGE_SIZE.

    Signed-off-by: Kurt Garloff
    Signed-off-by: Nick Piggin
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Kurt Garloff
     

29 Oct, 2008

8 commits

  • …nel/git/tip/linux-2.6-tip

    * 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (31 commits)
    ftrace: fix current_tracer error return
    tracing: fix a build error on alpha
    ftrace: use a real variable for ftrace_nop in x86
    tracing/ftrace: make boot tracer select the sched_switch tracer
    tracepoint: check if the probe has been registered
    asm-generic: define DIE_OOPS in asm-generic
    trace: fix printk warning for u64
    ftrace: warning in kernel/trace/ftrace.c
    ftrace: fix build failure
    ftrace, powerpc, sparc64, x86: remove notrace from arch ftrace file
    ftrace: remove ftrace hash
    ftrace: remove mcount set
    ftrace: remove daemon
    ftrace: disable dynamic ftrace for all archs that use daemon
    ftrace: add ftrace warn on to disable ftrace
    ftrace: only have ftrace_kill atomic
    ftrace: use probe_kernel
    ftrace: comment arch ftrace code
    ftrace: return error on failed modified text.
    ftrace: dynamic ftrace process only text section
    ...

    Linus Torvalds
     
  • * 'kvm-updates/2.6.28' of git://git.kernel.org/pub/scm/linux/kernel/git/avi/kvm:
    KVM: ia64: Makefile fix for forcing to re-generate asm-offsets.h
    KVM: Future-proof device assignment ABI
    KVM: ia64: Fix halt emulation logic
    KVM: Fix guest shared interrupt with in-kernel irqchip
    KVM: MMU: sync root on paravirt TLB flush

    Linus Torvalds
     
  • …/git/tip/linux-2.6-tip

    * 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    lockdep: fix irqs on/off ip tracing
    lockdep: minor fix for debug_show_all_locks()
    x86: restore the old swiotlb alloc_coherent behavior
    x86: use GFP_DMA for 24bit coherent_dma_mask
    swiotlb: remove panic for alloc_coherent failure
    xen: compilation fix of drivers/xen/events.c on IA64
    xen: portability clean up and some minor clean up for xencomm.c
    xen: don't reload cr3 on suspend
    kernel/resource: fix reserve_region_with_split() section mismatch
    printk: remove unused code from kernel/printk.c

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'irq-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    irq: make variable static

    Linus Torvalds
     
  • …l/git/tip/linux-2.6-tip

    * 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    sched: fix documentation reference for sched_min_granularity_ns
    sched: virtual time buddy preemption
    sched: re-instate vruntime based wakeup preemption
    sched: weaken sync hint
    sched: more accurate min_vruntime accounting
    sched: fix a find_busiest_group buglet
    sched: add CONFIG_SMP consistency

    Linus Torvalds
     
  • …git/tip/linux-2.6-tip

    * 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86, memory hotplug: remove wrong -1 in calling init_memory_mapping()
    x86: keep the /proc/meminfo page count correct
    x86/uv: memory allocation at initialization
    xen: fix Xen domU boot with batched mprotect

    Linus Torvalds
     
  • * 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6:
    [S390] s390: Fix build for !CONFIG_S390_GUEST + CONFIG_VIRTIO_CONSOLE
    [S390] No more 4kb stacks.
    [S390] Change default IPL method to IPL_VM.
    [S390] tape: disable interrupts in tape_open and tape_release
    [S390] appldata: unsigned ops->size cannot be negative
    [S390] tape block: complete request with correct locking
    [S390] Fix sysdev class file creation.
    [S390] pgtables: Fix race in enable_sie vs. page table ops
    [S390] qdio: remove incorrect memset
    [S390] qdio: prevent double qdio shutdown in case of I/O errors

    Linus Torvalds
     
  • * 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
    libata: ahci enclosure management bit mask
    libata: ahci enclosure management led sync
    pata_ninja32: suspend/resume support
    libata: Fix LBA48 on pata_it821x RAID volumes.
    libata: clear saved xfer_mode and ncq_enabled on device detach
    sata_sil24: configure max read request size to 4k
    libata: add missing kernel-doc
    libata: fix device iteration bugs
    ahci: Add support for Promise PDC42819
    ata: Switch all my stuff to a common address

    Linus Torvalds
     

28 Oct, 2008

20 commits

  • The commit (in linux-tip) c2931e05ec5965597cbfb79ad332d4a29aeceb23
    ( ftrace: return an error when setting a nonexistent tracer )
    added useful code that would error when a bad tracer was written into
    the current_tracer file.

    But this had a bug if the amount written was more than the amount read by
    that code. The first iteration would set the tracer correctly, but since
    it did not consume the rest of what was written (usually whitespace), the
    userspace utility would continue to write what was not consumed. This
    second iteration would fail to find a tracer and return -EINVAL. Funny
    thing is that the tracer would have already been set.

    This patch just consumes all the data that is written to the file.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     
  • To avoid using stale asm-offsets.h.

    Signed-off-by: Xiantao Zhang
    Signed-off-by: Avi Kivity

    Xiantao Zhang
     
  • Reserve some space so we can add more data.

    Signed-off-by: Avi Kivity

    Avi Kivity
     
  • Common halt logic was changed by x86 and did not update ia64. This patch
    updates halt for ia64.

    Fixes a regression causing guests to hang with more than 2 vcpus.

    Signed-off-by: Xiantao Zhang
    Signed-off-by: Avi Kivity

    Xiantao Zhang
     
  • Every call of kvm_set_irq() should offer an irq_source_id, which is
    allocated by kvm_request_irq_source_id(). Based on irq_source_id, we
    identify the irq source and implement logical OR for shared level
    interrupts.

    The allocated irq_source_id can be freed by kvm_free_irq_source_id().

    Currently, we support at most sizeof(unsigned long) different irq sources.

    [Amit: - rebase to kvm.git HEAD
    - move definition of KVM_USERSPACE_IRQ_SOURCE_ID to common file
    - move kvm_request_irq_source_id to the update_irq ioctl]

    [Xiantao: - Add kvm/ia64 stuff and make it work for kvm/ia64 guests]

    Signed-off-by: Sheng Yang
    Signed-off-by: Amit Shah
    Signed-off-by: Xiantao Zhang
    Signed-off-by: Avi Kivity

    Sheng Yang
     
  • The pvmmu TLB flush handler should request a root sync, similarly to
    a native read-write CR3.

    Signed-off-by: Marcelo Tosatti
    Signed-off-by: Avi Kivity

    Marcelo Tosatti
     
  • Impact: fix lockdep lock-api-caller output when irqsoff tracing is enabled

    81d68a96 "ftrace: trace irq disabled critical timings" added wrappers around
    trace_hardirqs_on/off_caller. However these functions use
    __builtin_return_address(0) to figure out which function actually disabled
    or enabled irqs. The result is that we save the ips of trace_hardirqs_on/off
    instead of the real caller. Not very helpful.

    However since the patch from Steven the ip already gets passed. So use that
    and get rid of __builtin_return_address(0) in these two functions.

    Signed-off-by: Heiko Carstens
    Signed-off-by: Ingo Molnar

    Heiko Carstens
     
  • The s390 kernel does not compile if virtio console is enabled, but guest
    support is disabled:

    LD .tmp_vmlinux1
    arch/s390/kernel/built-in.o: In function `setup_arch':
    /space/linux-2.5/arch/s390/kernel/setup.c:773: undefined reference to
    `s390_virtio_console_init'

    The fix is related to
    commit 99e65c92f2bbf84f43766a8bf701e36817d62822
    Author: Christian Borntraeger
    Date: Fri Jul 25 15:50:04 2008 +0200
    KVM: s390: Fix guest kconfig

    Which changed the build process to build kvm_virtio.c only if CONFIG_S390_GUEST
    is set. We must ifdef the prototype in the header file accordingly.

    Reported-by: Heiko Carstens
    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • We got a stack overflow with a small stack configuration on a 32 bit
    system. It just looks like as 4kb isn't enough and too dangerous.
    So lets get rid of 4kb stacks on 32 bit.

    But one thing I completely dislike about the call trace below is that
    just for debugging or tracing purposes sprintf gets called (cio_start_key):

    /* process condition code */
    sprintf(dbf_txt, "ccode:%d", ccode);
    CIO_TRACE_EVENT(4, dbf_txt);

    But maybe its just me who thinks that this could be done better.

    Kernel stack overflow.
    Modules linked in: dm_multipath sunrpc bonding qeth_l2 dm_mod qeth ccwgroup vmur
    CPU: 1 Not tainted 2.6.27-30.x.20081015-s390default #1
    Process httpd (pid: 3807, task: 20ae2df8, ksp: 1666fb78)
    Krnl PSW : 040c0000 8027098a (number+0xe/0x348)
    R:0 T:1 IO:0 EX:0 Key:0 M:1 W:0 P:0 AS:0 CC:0 PM:0
    Krnl GPRS: 00d43318 0027097c 1666f277 9666f270
    00000000 00000000 0000000a ffffffff
    9666f270 1666f228 1666f277 1666f098
    00000002 80270982 80271016 1666f098
    Krnl Code: 8027097e: f0340dd0a7f1 srp 3536(4,%r0),2033(%r10),4
    80270984: 0f00 clcl %r0,%r0
    80270986: a7840001 brc 8,80270988
    >8027098a: 18ef lr %r14,%r15
    8027098c: a7faff68 ahi %r15,-152
    80270990: 18bf lr %r11,%r15
    80270992: 18a2 lr %r10,%r2
    80270994: 1893 lr %r9,%r3

    Modified calltrace with annotated stackframe size of each function:

    stackframe size
    |
    0 304 vsnprintf+850 [0x271016]
    1 72 sprintf+74 [0x271522]
    2 56 cio_start_key+262 [0x2d4c16]
    3 56 ccw_device_start_key+222 [0x2dfe92]
    4 56 ccw_device_start+40 [0x2dff28]
    5 48 raw3215_start_io+104 [0x30b0f8]
    6 56 raw3215_write+494 [0x30ba0a]
    7 40 con3215_write+68 [0x30bafc]
    8 40 __call_console_drivers+146 [0x12b0fa]
    9 32 _call_console_drivers+102 [0x12b192]
    10 64 release_console_sem+268 [0x12b614]
    11 168 vprintk+462 [0x12bca6]
    12 72 printk+68 [0x12bfd0]
    13 256 __print_symbol+50 [0x15a882]
    14 56 __show_trace+162 [0x103d06]
    15 32 show_trace+224 [0x103e70]
    16 48 show_stack+152 [0x103f20]
    17 56 dump_stack+126 [0x104612]
    18 96 __alloc_pages_internal+592 [0x175004]
    19 80 cache_alloc_refill+776 [0x196f3c]
    20 40 __kmalloc+258 [0x1972ae]
    21 40 __alloc_skb+94 [0x328086]
    22 32 pskb_copy+50 [0x328252]
    23 32 skb_realloc_headroom+110 [0x328a72]
    24 104 qeth_l2_hard_start_xmit+378 [0x7803bfde]
    25 56 dev_hard_start_xmit+450 [0x32ef6e]
    26 56 __qdisc_run+390 [0x3425d6]
    27 48 dev_queue_xmit+410 [0x331e06]
    28 40 ip_finish_output+308 [0x354ac8]
    29 56 ip_output+218 [0x355b6e]
    30 24 ip_local_out+56 [0x354584]
    31 120 ip_queue_xmit+300 [0x355cec]
    32 96 tcp_transmit_skb+812 [0x367da8]
    33 40 tcp_push_one+158 [0x369fda]
    34 112 tcp_sendmsg+852 [0x35d5a0]
    35 240 sock_sendmsg+164 [0x32035c]
    36 56 kernel_sendmsg+86 [0x32064a]
    37 88 sock_no_sendpage+98 [0x322b22]
    38 104 tcp_sendpage+70 [0x35cc1e]
    39 48 sock_sendpage+74 [0x31eb66]
    40 64 pipe_to_sendpage+102 [0x1c4b2e]
    41 64 __splice_from_pipe+120 [0x1c5340]
    42 72 splice_from_pipe+90 [0x1c57e6]
    43 56 generic_splice_sendpage+38 [0x1c5832]
    44 48 do_splice_from+104 [0x1c4c38]
    45 48 direct_splice_actor+52 [0x1c4c88]
    46 80 splice_direct_to_actor+180 [0x1c4f80]
    47 72 do_splice_direct+70 [0x1c5112]
    48 64 do_sendfile+360 [0x19de18]
    49 72 sys_sendfile64+126 [0x19df32]
    50 336 sysc_do_restart+18 [0x111a1a]

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • allyesconfig and allmodconfig built kernels have a tape IPL record.
    A the vmreader record makes much more sense, since hardly anybody will
    ever IPL a kernel from tape. So change the default.
    As I side effect I can test these kernels without fiddling around with
    the kernel config ;)

    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • Get tape device lock with interrupts disabled. Otherwise lockdep will issue a
    warning similar to:

    =================================
    [ INFO: inconsistent lock state ]
    2.6.27 #1
    ---------------------------------
    inconsistent {in-hardirq-W} -> {hardirq-on-W} usage.
    vol_id/2903 [HC0[0]:SC0[0]:HE1:SE1] takes:
    (sch->lock){++..}, at: [] tape_open+0x42/0x1a4 [tape]
    {in-hardirq-W} state was registered at:
    [] __lock_acquire+0x894/0xa74
    [] lock_acquire+0x92/0xb8
    [] _spin_lock+0x5c/0x9c
    [] do_IRQ+0x124/0x1f0
    [] io_return+0x0/0x8

    irq event stamp: 847
    hardirqs last enabled at (847): [] trace_hardirqs_on+0x2a/0x38
    hardirqs last disabled at (846): [] trace_hardirqs_off+0x2a/0x38
    softirqs last enabled at (0): [] copy_process+0x43e/0x11f4
    softirqs last disabled at (0): [] 0x0

    other info that might help us debug this:
    1 lock held by vol_id/2903:
    #0: (&bdev->bd_mutex){--..}, at: [] do_open+0x78/0x358

    stack backtrace:
    CPU: 1 Not tainted 2.6.27 #1},
    Process vol_id (pid: 2903, task: 000000003d4c0000, ksp: 000000003d4e3b10)
    0400000000000000 000000003d4e3830 0000000000000002 0000000000000000
    000000003d4e38d0 000000003d4e3848 000000003d4e3848 00000000000168a8
    0000000000000000 000000003d4e3b10 0000000000000000 0000000000000000
    000000003d4e3830 000000000000000c 000000003d4e3830 000000003d4e38a0
    000000000034aa98 00000000000168a8 000000003d4e3830 000000003d4e3880
    Call Trace:
    ([] show_trace+0x138/0x158)
    [] show_stack+0xc6/0xf8
    [] dump_stack+0xb0/0xc0
    [] print_usage_bug+0x1e8/0x228
    [] mark_lock+0xb14/0xd24
    [] __lock_acquire+0x792/0xa74
    [] lock_acquire+0x92/0xb8
    [] _spin_lock+0x5c/0x9c
    [] tape_open+0x42/0x1a4 [tape]
    [] tapeblock_open+0x98/0xd0 [tape]

    Signed-off-by: Frank Munzert
    Signed-off-by: Martin Schwidefsky

    Frank Munzert
     
  • unsigned ops->size cannot be negative

    Signed-off-by: Roel Kluin
    Signed-off-by: Martin Schwidefsky

    Roel Kluin
     
  • __blk_end_request must be called with request queue lock held. We need to use
    blk_end_request rather than __blk_end_request.

    Signed-off-by: Frank Munzert
    Signed-off-by: Martin Schwidefsky

    Frank Munzert
     
  • Use sysdev_class_create_file() to create create sysdev class attributes
    instead of sysfs_create_file(). Using sysfs_create_file() wasn't a very
    good idea since the show and store functions have a different amount of
    parameters for sysfs files and sysdev class files.
    In particular the pointer to the buffer is the last argument and
    therefore accesses to random memory regions happened.
    Still worked surprisingly well until we got a kernel panic.

    Cc: stable@kernel.org
    Signed-off-by: Heiko Carstens
    Signed-off-by: Martin Schwidefsky

    Heiko Carstens
     
  • The current enable_sie code sets the mm->context.pgstes bit to tell
    dup_mm that the new mm should have extended page tables. This bit is also
    used by the s390 specific page table primitives to decide about the page
    table layout - which means context.pgstes has two meanings. This can cause
    any kind of bugs. For example - e.g. shrink_zone can call
    ptep_clear_flush_young while enable_sie is running. ptep_clear_flush_young
    will test for context.pgstes. Since enable_sie changed that value of the old
    struct mm without changing the page table layout ptep_clear_flush_young will
    do the wrong thing.
    The solution is to split pgstes into two bits
    - one for the allocation
    - one for the current state

    Signed-off-by: Christian Borntraeger
    Signed-off-by: Martin Schwidefsky

    Christian Borntraeger
     
  • Remove the memset since zeroing the string is not needed and use
    snprintf instead of sprintf.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • In case of I/O errors on a qdio subchannel qdio_shutdown may be
    called twice by the qdio driver and by zfcp. Remove the
    superfluous shutdown from qdio and let the upper layer driver
    handle the error condition.

    Signed-off-by: Jan Glauber
    Signed-off-by: Martin Schwidefsky

    Jan Glauber
     
  • When we failed to get tasklist_lock eventually (count equals 0),
    we should only print " ignoring it.\n", and not print
    " locked it.\n" needlessly.

    Signed-off-by: Qinghuang Feng
    Signed-off-by: Ingo Molnar

    qinghuang feng
     
  • Impact: build fix on Alpha

    When tracing is enabled, some arch have included
    on their but others like alpha or m68k don't.

    Build error on alpha:

    kernel/trace/trace.c: In function 'tracing_cpumask_write':
    kernel/trace/trace.c:2145: error: implicit declaration of function 'raw_local_irq_disable'
    kernel/trace/trace.c:2162: error: implicit declaration of function 'raw_local_irq_enable'

    Tested on Alpha through a cross-compiler (should correct a similar issue on m68k).

    Reported-by: Alexey Dobriyan
    Signed-off-by: Frederic Weisbecker
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • Impact: fix crash with memory hotplug

    Shuahua Li found:

    | I just did some experiments on a desktop for memory hotplug and this bug
    | triggered a crash in my test.
    |
    | Yinghai's suggestion also fixed the bug.

    We don't need to round it, just remove that extra -1

    Signed-off-by: Yinghai
    Signed-off-by: Ingo Molnar

    Shaohua Li