07 Apr, 2009

40 commits

  • Impact: cleanup

    Most of the tracing files creation follow the same pattern:

    ret = debugfs_create_file(...)
    if (!ret)
    pr_warning("Couldn't create ... entry\n")

    Unify it!

    Reported-by: Ingo Molnar
    Signed-off-by: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Frederic Weisbecker
     
  • Impact: cleanup

    Use USEC_PER_SEC and NSEC_PER_SEC instead of 1000000 and 1000000000.

    Signed-off-by: Li Zefan
    LKML-Reference:
    Acked-by: Frederic Weisbecker
    Signed-off-by: Steven Rostedt

    Li Zefan
     
  • Ingo Molnar
     
  • If we cat debugfs/tracing/events/ftrace/bprint/format, we'll see:
    name: bprint
    ID: 6
    format:
    field:unsigned char common_type; offset:0; size:1;
    field:unsigned char common_flags; offset:1; size:1;
    field:unsigned char common_preempt_count; offset:2; size:1;
    field:int common_pid; offset:4; size:4;
    field:int common_tgid; offset:8; size:4;

    field:unsigned long ip; offset:12; size:4;
    field:char * fmt; offset:16; size:4;
    field: char buf; offset:20; size:0;

    print fmt: "%08lx (%d) fmt:%p %s"

    There is an inconsistent blank before char buf.

    Signed-off-by: Zhao Lei
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Zhaolei
     
  • Some of the tracers have been renamed, which was not updated in the in-kernel
    run-time README file. Update it.

    Signed-off-by: Nikanth Karthikesan
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Nikanth Karthikesan
     
  • Impact: fix a crash while cat trace file

    Currently we are using a cpumask to remind each cpu where a
    trace occured. It lets us notice the user that a cpu just had
    its first trace.

    But on latest -tip we have the following crash once we cat the trace
    file:

    IP: [] print_trace_fmt+0x45/0xe7
    *pde = 00000000
    Oops: 0000 [#1] PREEMPT SMP
    last sysfs file: /sys/class/net/eth0/carrier
    Pid: 3897, comm: cat Not tainted (2.6.29-tip-02825-g0f22972-dirty #81)
    EIP: 0060:[] EFLAGS: 00010297 CPU: 0
    EIP is at print_trace_fmt+0x45/0xe7
    EAX: 00000000 EBX: 00000000 ECX: c12d9e98 EDX: ccdb7010
    ESI: d31f4000 EDI: 00322401 EBP: d31f3f10 ESP: d31f3efc
    DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
    Process cat (pid: 3897, ti=d31f2000 task=d3b3cf20 task.ti=d31f2000)
    Stack:
    d31f4080 ccdb7010 d31f4000 d691fe70 ccdb7010 d31f3f24 c0270e5c d31f4000
    d691fe70 d31f4000 d31f3f34 c02718e8 c12d9e98 d691fe70 d31f3f70 c02bfc33
    00001000 09130000 d3b46e00 d691fe98 00000000 00000079 00000001 00000000
    Call Trace:
    [] ? print_trace_line+0x170/0x17c
    [] ? s_show+0xa7/0xbd
    [] ? seq_read+0x24a/0x327
    [] ? seq_read+0x0/0x327
    [] ? vfs_read+0x86/0xe1
    [] ? sys_read+0x40/0x65
    [] ? sysenter_do_call+0x12/0x3c
    Code: 00 00 00 89 45 ec f7 c7 00 20 00 00 89 55 f0 74 4e f6 86 98 10 00 00 02 74 45 8b 86 8c 10 00 00 8b 9e a8 10 00 00 e8 52 f3 ff ff a3 03 19 c0 85 c0 75 2b 8b 86 8c 10 00 00 8b 9e a8 10 00 00
    EIP: [] print_trace_fmt+0x45/0xe7 SS:ESP 0068:d31f3efc
    CR2: 0000000000000000
    ---[ end trace aa9cf38e5ebed9dd ]---

    This is because we alloc the iter->started cpumask on tracing_pipe_open but
    not on tracing_open.

    It hadn't been noticed until now because we need to have ring buffer overruns
    to activate the starting of cpu buffer detection.

    Also, we need a check to not print the messagge for the first trace on the file.

    Signed-off-by: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • Remove duplicated #include in arch/x86/kernel/ftrace.c.

    Signed-off-by: Huang Weiyi
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Huang Weiyi
     
  • The wakeup tracing in sched_switch does not stop when a user
    disables tracing. This is because the probe_sched_wakeup() is missing
    the check to prevent the wakeup from being traced.

    Signed-off-by: Zhao Lei
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Zhaolei
     
  • Impact: fix to crash going to kexec

    The init task did not properly initialize the function graph pointers.
    Altough these pointers are NULL, they can not be assumed to be NULL
    for the init task, and must still be properly initialize.

    This usually is not an issue since a problem only arises when a task
    exits, and the init tasks do not usually exit. But when doing tests
    with kexec, the init tasks do exit, and the bug appears.

    This patch properly initializes the init tasks function graph data
    structures.

    Reported-and-Tested-by: Yinghai Lu
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     
  • Building a kernel with tracing can raise the following warning on
    tip/master:

    kernel/trace/trace.c:1249: error: implicit declaration of function 'vbin_printf'

    We are missing an include to string.h

    Reported-by: Ingo Molnar
    Signed-off-by: Frederic Weisbecker
    LKML-Reference:
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Frederic Weisbecker
     
  • Impact: fix time output bug in 32bits system

    ns2usecs() returns 'long', it's incorrect.

    (In i386)
    ...
    -0 [000] 521.442100: _spin_lock -0 [000] 521.442101: do_timer -0 [000] 521.442102: update_wall_time -0 [000] 521.442102: update_xtime_cache <-0 [001] 4154502640.134759: rcu_bh_qsctr_inc -0 [001] 4154502640.134760: _local_bh_enable -0 [001] 4154502640.134761: idle_cpu
    LKML-Reference:
    Reported-by: Li Zefan
    Acked-by: Frederic Weisbecker
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Lai Jiangshan
     
  • Maneesh Soni was getting a crash when running the wakeup tracer.
    We debugged it down to the recording of the function with the
    CALLER_ADDR2 macro. This is used to get the location of the caller
    to schedule.

    But the problem comes when schedule is called by assmebly. In the case
    that Maneesh had, retint_careful would call schedule. But retint_careful
    does not set up a proper frame pointer. CALLER_ADDR2 is defined as
    __builtin_return_address(2). This produces the following assembly in
    the wakeup tracer code.

    mov 0x0(%rbp),%rcx
    Signed-off-by: Steven Rostedt
    Signed-off-by: Ingo Molnar

    Steven Rostedt
     
  • Merge reason: update to upstream tracing facilities

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Merge reason: this used to be a tracing/blktrace-v2 devel topic still
    cooking during the merge window - has propagated to fixes

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Due to an apparent typo, commit a67d18f89f5782806135aad4ee012ff78d45aae7
    (NFS: load the rpc/rdma transport module automatically) lead to the
    'proto=' mount option doing a double free, while Opt_mountproto leaks a
    string.

    Signed-off-by: Trond Myklebust
    Signed-off-by: Linus Torvalds

    Trond Myklebust
     
  • This makes the defautl ext3 data ordering mode (when no explicit
    ordering is set) configurable, so as to allow people to default to
    'data=writeback' and get the resulting latency improvements.

    This is a non-issue if a filesystem has been explicitly set to some
    ordering (with 'tune2fs').

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • * 'linux-next' of git://git.infradead.org/ubifs-2.6:
    UBIFS: fix recovery bug
    UBIFS: add R/O compatibility
    UBIFS: fix compiler warnings
    UBIFS: fully sort GCed nodes
    UBIFS: fix commentaries
    UBIFS: introduce a helpful variable
    UBIFS: use KERN_CONT
    UBIFS: fix lprops committing bug
    UBIFS: fix bogus assertion
    UBIFS: fix bug where page is marked uptodate when out of space
    UBIFS: amend key_hash return value
    UBIFS: improve find function interface
    UBIFS: list usage cleanup
    UBIFS: fix dbg_chk_lpt_sz()

    Linus Torvalds
     
  • * 'linux-next' of git://git.infradead.org/ubi-2.6:
    UBI: add fsync capability

    Linus Torvalds
     
  • The CAP_KILL check in exit_notify() looks just wrong, kill it.

    Whatever logic we have to reset ->exit_signal, the malicious user
    can bypass it if it execs the setuid application before exiting.

    Signed-off-by: Oleg Nesterov
    Acked-by: Serge Hallyn
    Acked-by: Roland McGrath
    Signed-off-by: Linus Torvalds

    Oleg Nesterov
     
  • * git://git.infradead.org/mtd-2.6: (53 commits)
    [MTD] struct device - replace bus_id with dev_name(), dev_set_name()
    [MTD] [NOR] Fixup for Numonyx M29W128 chips
    [MTD] mtdpart: Make ecc_stats more realistic.
    powerpc/85xx: TQM8548: Update DTS file for multi-chip support
    powerpc: NAND: FSL UPM: document new bindings
    [MTD] [NAND] FSL-UPM: Add wait flags to support board/chip specific delays
    [MTD] [NAND] FSL-UPM: add multi chip support
    [MTD] [NOR] Add device parent info to physmap_of
    [MTD] [NAND] Add support for NAND on the Socrates board
    [MTD] [NAND] Add support for 4KiB pages.
    [MTD] sysfs support should not depend on CONFIG_PROC_FS
    [MTD] [NAND] Add parent info for CAFÉ controller
    [MTD] support driver model updates
    [MTD] driver model updates (part 2)
    [MTD] driver model updates
    [MTD] [NAND] move gen_nand's probe function to .devinit.text
    [MTD] [MAPS] move sa1100 flash's probe function to .devinit.text
    [MTD] fix use after free in register_mtd_blktrans
    [MTD] [MAPS] Drop now unused sharpsl-flash map
    [MTD] ofpart: Check name property to determine partition nodes.
    ...

    Manually fix trivial conflict in drivers/mtd/maps/Makefile

    Linus Torvalds
     
  • As noted by Janne Grunau it would be good if the date was also right.

    (Web site also resynched)

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

    Alan Cox
     
  • Fix this build error:

    drivers/md/raid1.c: In function 'raid1_congested':
    drivers/md/raid1.c:589: error: 'BDI_write_congested' undeclared

    BDI_write_congested was changed in commit 1faa16d228 ("block: change the
    request allocation/congestion logic to be sync/async based")

    Signed-off-by: Alexander Beregalov
    Cc: Neil Brown
    Cc: Jens Axboe
    Signed-off-by: Linus Torvalds

    Alexander Beregalov
     
  • The 8430 patch was short a const so caused a warning.

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

    Alan Cox
     
  • Signed-off-by: Roel Kluin
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Roel Kluin
     
  • There are various bits of code here that are unfinished and instead of
    being harmless either confuse or spew stuff into the logs at higher than
    debug level. They can and should go away.

    Also remove the bogus use of tty->lowlatency. We fixed the need for this hack
    long ago (with the flip buffer rewrite) but people keep copying it into drivers.

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

    Alan Cox
     
  • Closes bug 9065

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

    Alan Cox
     
  • Bugzilla #9095 and a couple of other confirmations

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

    Alan Cox
     
  • Signed-off-by: Breno Leitao
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Breno Leitao
     
  • Fixes:

    In file included from drivers/serial/mux.c:37:
    include/linux/serial_core.h: In function 'uart_handle_sysrq_char':
    include/linux/serial_core.h:467: error: 'struct uart_port' has no member named 'sysrq'
    include/linux/serial_core.h:468: error: 'struct uart_port' has no member named 'sysrq'

    Signed-off-by: Alexander Beregalov
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Alexander Beregalov
     
  • As it was, the retval was never returned, so its assignments were silly.
    Just consolidate everything to rc, and remove the unused retval variable.

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

    Breno Leitao
     
  • Signed-off-by: Breno Leitao
    Signed-off-by: Andrew Morton
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Breno Leitao
     
  • mxser_check_modem_status is called with tty parameter, so the
    reference should be increased by callers already -- for ioctl
    syscall it is held whole time gap since open to close, for
    interrupt, the reference count is increased in the irq handler.

    There is no tty_kref_put in that function, so this also fixes
    a refcounting bug.

    Signed-off-by: Jiri Slaby
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • There is missing tty_kref_put on some paths in moxa_poll_port,
    although the reference is always taken. Fix it.

    Signed-off-by: Jiri Slaby
    Reported-by: Jan 'Yenya' Kasprzak
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Jiri Slaby
     
  • The isicom driver leaks a kref on the shutdown path. Drop the additional
    kref we took

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

    Alan Cox
     
  • Found by Daniel Marjamäki using cppcheck

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

    Alan Cox
     
  • The riscom8 module is missing the char-major-48-* alias that would cause
    it to be auto-loaded when a device of that type is opened. This patch
    adds the alias.

    Signed-off-by: Scott James Remnant
    Signed-off-by: Tim Gardner
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Scott James Remnant
     
  • The cdc_acm module is missing the char-major-166-* alias that would
    cause it to be auto-loaded when a device of that type is opened. This
    patch adds the alias.

    Signed-off-by: Scott James Remnant
    Signed-off-by: Tim Gardner
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Scott James Remnant
     
  • The specialix module is missing the char-major-75-* alias that would
    cause it to be auto-loaded when a device of that type is opened. This
    patch adds the alias.

    Signed-off-by: Scott James Remnant
    Signed-off-by: Tim Gardner
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Scott James Remnant
     
  • The cyclades module is missing the char-major-19-* alias that would
    cause it to be auto-loaded when a device of that type is opened. This
    patch adds the alias.

    Signed-off-by: Scott James Remnant
    Signed-off-by: Tim Gardner
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Scott James Remnant
     
  • The applicom module is missing the char-major-10-157 alias that would
    cause it to be auto-loaded when a device of that type is opened. This
    patch adds the alias.

    Signed-off-by: Scott James Remnant
    Signed-off-by: Tim Gardner
    Signed-off-by: Alan Cox
    Signed-off-by: Linus Torvalds

    Scott James Remnant