17 Feb, 2011

1 commit


16 Feb, 2011

7 commits

  • By pre-computing the maximum number of samples per tick we can avoid a
    multiplication and a conditional since MAX_INTERRUPTS >
    max_samples_per_tick.

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

    Peter Zijlstra
     
  • This kernel patch adds the ability to filter monitoring based on
    container groups (cgroups). This is for use in per-cpu mode only.

    The cgroup to monitor is passed as a file descriptor in the pid
    argument to the syscall. The file descriptor must be opened to
    the cgroup name in the cgroup filesystem. For instance, if the
    cgroup name is foo and cgroupfs is mounted in /cgroup, then the
    file descriptor is opened to /cgroup/foo. Cgroup mode is
    activated by passing PERF_FLAG_PID_CGROUP in the flags argument
    to the syscall.

    For instance to measure in cgroup foo on CPU1 assuming
    cgroupfs is mounted under /cgroup:

    struct perf_event_attr attr;
    int cgroup_fd, fd;

    cgroup_fd = open("/cgroup/foo", O_RDONLY);
    fd = perf_event_open(&attr, cgroup_fd, 1, -1, PERF_FLAG_PID_CGROUP);
    close(cgroup_fd);

    Signed-off-by: Stephane Eranian
    [ added perf_cgroup_{exit,attach} ]
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Stephane Eranian
     
  • Make the ::exit method act like ::attach, it is after all very nearly
    the same thing.

    The bug had no effect on correctness - fixing it is an optimization for
    the scheduler. Also, later perf-cgroups patches rely on it.

    Signed-off-by: Peter Zijlstra
    Acked-by: Paul Menage
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Merge reason: we need to queue up dependent patch

    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • Transparent hugepages can only be created if rmap is fully
    functional. So we must prevent hugepages to be created while
    is_vma_temporary_stack() is true.

    This also optmizes away some harmless but unnecessary setting of
    khugepaged_scan.address and it switches some BUG_ON to VM_BUG_ON.

    Signed-off-by: Andrea Arcangeli
    Acked-by: Rik van Riel
    Signed-off-by: Linus Torvalds

    Andrea Arcangeli
     
  • …/git/tip/linux-2.6-tip

    * 'perf-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
    x86: Fix text_poke_smp_batch() deadlock
    perf tools: Fix thread_map event synthesizing in top and record
    watchdog, nmi: Lower the severity of error messages
    ARM: oprofile: Fix backtraces in timer mode
    oprofile: Fix usage of CONFIG_HW_PERF_EVENTS for oprofile_perf_init and friends

    Linus Torvalds
     
  • * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
    Input: matrix_keypad - increase the limit of rows and columns
    Input: wacom - fix error path in wacom_probe()
    Input: ads7846 - check proper condition when freeing gpio
    Revert "Input: do not pass injected events back to the originating handler"
    Input: sysrq - rework re-inject logic
    Input: serio - clear pending rescans after sysfs driver rebind
    Input: rotary_encoder - use proper irqflags
    Input: wacom_w8001 - report resolution to userland

    Linus Torvalds
     

15 Feb, 2011

1 commit


14 Feb, 2011

2 commits


12 Feb, 2011

1 commit

  • When the fuction graph tracer starts, it needs to make a special
    stack for each task to save the real return values of the tasks.
    All running tasks have this stack created, as well as any new
    tasks.

    On CPU hot plug, the new idle task will allocate a stack as well
    when init_idle() is called. The problem is that cpu hotplug does
    not create a new idle_task. Instead it uses the idle task that
    existed when the cpu went down.

    ftrace_graph_init_task() will add a new ret_stack to the task
    that is given to it. Because a clone will make the task
    have a stack of its parent it does not check if the task's
    ret_stack is already NULL or not. When the CPU hotplug code
    starts a CPU up again, it will allocate a new stack even
    though one already existed for it.

    The solution is to treat the idle_task specially. In fact, the
    function_graph code already does, just not at init_idle().
    Instead of using the ftrace_graph_init_task() for the idle task,
    which that function expects the task to be a clone, have a
    separate ftrace_graph_init_idle_task(). Also, we will create a
    per_cpu ret_stack that is used by the idle task. When we call
    ftrace_graph_init_idle_task() it will check if the idle task's
    ret_stack is NULL, if it is, then it will assign it the per_cpu
    ret_stack.

    Reported-by: Benjamin Herrenschmidt
    Suggested-by: Peter Zijlstra
    Cc: Stable Tree
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     

11 Feb, 2011

4 commits

  • Some keyboard controllers support more than 16 columns and rows.
    Increase the limit to 32.

    Signed-off-by: Trilok Soni
    Acked-by: Eric Miao
    Signed-off-by: Dmitry Torokhov

    Trilok Soni
     
  • Expand security_capable() to include cred, so that it can be usable in a
    wider range of call sites.

    Signed-off-by: Chris Wright
    Acked-by: Serge Hallyn
    Signed-off-by: James Morris

    Chris Wright
     
  • * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (21 commits)
    USB: cdc-acm: Adding second ACM channel support for Nokia N8
    USB, Mass Storage, composite, gadget: Fix build failure and memset of a struct
    USB: Fix trout build failure with ci13xxx_msm gadget
    USB: EHCI: fix scheduling while atomic during suspend
    USB: usb-storage: unusual_devs entry for Coby MP3 player
    USB: ftdi_sio: Add VID=0x0647, PID=0x0100 for Acton Research spectrograph
    USB: fix race between root-hub resume and wakeup requests
    USB: prevent buggy hubs from crashing the USB stack
    usb: r8a66597-udc: Fixed bufnum of Bulk
    USB: ftdi_sio: add ST Micro Connect Lite uart support
    USB: Storage: Add unusual_devs entry for VTech Kidizoom
    USB SL811HS HCD: Fix memory leak in sl811h_urb_enqueue()
    USB: ti_usb: fix module removal
    USB: io_edgeport: fix the reported firmware major and minor
    usb: ehci-omap: Show fatal probing time errors to end user
    usb: musb: introduce api for dma code to check compatibility with usb request
    usb: musb: maintain three states for buffer mappings instead of two
    usb: musb: disable double buffering when it's broken
    usb: musb: hsdma: change back to use musb_read/writew
    usb: musb: core: fix IRQ check
    ...

    Linus Torvalds
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (34 commits)
    virtio_net: Add schedule check to napi_enable call
    x25: Do not reference freed memory.
    pch_can: fix tseg1/tseg2 setting issue
    isdn: hysdn: Kill (partially buggy) CVS regision log reporting.
    can: softing_cs needs slab.h
    pch_gbe: Fix the issue which a driver locks when rx offload is set by ethtool
    netfilter: nf_conntrack: set conntrack templates again if we return NF_REPEAT
    pch_can: fix module reload issue with MSI
    pch_can: fix rmmod issue
    pch_can: fix 800k comms issue
    net: Fix lockdep regression caused by initializing netdev queues too early.
    net/caif: Fix dangling list pointer in freed object on error.
    USB CDC NCM errata updates for cdc_ncm host driver
    CDC NCM errata updates for cdc.h
    ixgbe: update version string
    ixgbe: cleanup variable initialization
    ixgbe: limit VF access to network traffic
    ixgbe: fix for 82599 erratum on Header Splitting
    ixgbe: fix variable set but not used warnings by gcc 4.6
    e1000: add support for Marvell Alaska M88E1118R PHY
    ...

    Linus Torvalds
     

10 Feb, 2011

1 commit


09 Feb, 2011

3 commits


08 Feb, 2011

1 commit

  • FTRACE_SYSCALLS would create events for each and every system call, even
    if it had failed to map the system call's name with it's number. This
    resulted in a number of events being created that would not behave as
    expected.

    This could happen, for example, on architectures who's symbol names are
    unusual and will not match the system call name. It could also happen
    with system calls which were mapped to sys_ni_syscall.

    This patch changes the default system call number in the metadata to -1.
    If the system call name from the metadata is not successfully mapped to
    a system call number during boot, than the event initialisation routine
    will now return an error, preventing the event from being created.

    Signed-off-by: Ian Munsie
    LKML-Reference:
    Signed-off-by: Steven Rostedt

    Ian Munsie
     

07 Feb, 2011

3 commits


05 Feb, 2011

4 commits

  • The mask which filters out the valid bits which can be set via
    irq_modify_status() is missing IRQ_NO_BALANCING, which breaks UV.

    Add IRQ_PER_CPU as well to avoid another one line patch for 39.

    Signed-off-by: Thomas Gleixner

    Thomas Gleixner
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (68 commits)
    net: can: janz-ican3: world-writable sysfs termination file
    net: can: at91_can: world-writable sysfs files
    MAINTAINERS: update email ids of the be2net driver maintainers.
    bridge: Don't put partly initialized fdb into hash
    r8169: prevent RxFIFO induced loops in the irq handler.
    r8169: RxFIFO overflow oddities with 8168 chipsets.
    r8169: use RxFIFO overflow workaround for 8168c chipset.
    include/net/genetlink.h: Allow genlmsg_cancel to accept a NULL argument
    net: Provide compat support for SIOCGETMIFCNT_IN6 and SIOCGETSGCNT_IN6.
    net: Support compat SIOCGETVIFCNT ioctl in ipv4.
    net: Fix bug in compat SIOCGETSGCNT handling.
    niu: Fix races between up/down and get_stats.
    tcp_ecn is an integer not a boolean
    atl1c: Add missing PCI device ID
    s390: Fix possibly wrong size in strncmp (smsgiucv)
    s390: Fix wrong size in memcmp (netiucv)
    qeth: allow OSA CHPARM change in suspend state
    qeth: allow HiperSockets framesize change in suspend
    qeth: add more strict MTU checking
    qeth: show new mac-address if its setting fails
    ...

    Linus Torvalds
     
  • This patch fixes the below compilation errors.

    CC drivers/usb/gadget/ci13xxx_msm.o
    CC net/mac80211/led.o
    drivers/usb/gadget/ci13xxx_msm.c: In function 'ci13xxx_msm_notify_event':
    drivers/usb/gadget/ci13xxx_msm.c:42: error: 'USB_AHBBURST' undeclared (first use in this function)
    drivers/usb/gadget/ci13xxx_msm.c:42: error: (Each undeclared identifier is reported only once
    drivers/usb/gadget/ci13xxx_msm.c:42: error: for each function it appears in.)
    drivers/usb/gadget/ci13xxx_msm.c:43: error: 'USB_AHBMODE' undeclared (first use in this function)
    make[4]: *** [drivers/usb/gadget/ci13xxx_msm.o] Error 1
    make[3]: *** [drivers/usb/gadget] Error 2

    MSM USB driver is not supported on boards like trout (MSM7201) which
    has an external PHY.

    Signed-off-by: Pavankumar Kondeti
    Signed-off-by: Greg Kroah-Hartman

    Pavankumar Kondeti
     
  • …t/rostedt/linux-2.6-trace into perf/urgent

    Ingo Molnar
     

04 Feb, 2011

1 commit


03 Feb, 2011

7 commits

  • Currently the syscall_meta structures for the syscall tracepoints are
    placed in the __syscall_metadata section, and at link time, the linker
    makes one large array of all these syscall metadata structures. On boot
    up, this array is read (much like the initcall sections) and the syscall
    data is processed.

    The problem is that there is no guarantee that gcc will place complex
    structures nicely together in an array format. Two structures in the
    same file may be placed awkwardly, because gcc has no clue that they
    are suppose to be in an array.

    A hack was used previous to force the alignment to 4, to pack the
    structures together. But this caused alignment issues with other
    architectures (sparc).

    Instead of packing the structures into an array, the structures' addresses
    are now put into the __syscall_metadata section. As pointers are always the
    natural alignment, gcc should always pack them tightly together
    (otherwise initcall, extable, etc would also fail).

    By having the pointers to the structures in the section, we can still
    iterate the trace_events without causing unnecessary alignment problems
    with other architectures, or depending on the current behaviour of
    gcc that will likely change in the future just to tick us kernel developers
    off a little more.

    The __syscall_metadata section is also moved into the .init.data section
    as it is now only needed at boot up.

    Suggested-by: David Miller
    Acked-by: David S. Miller
    Cc: Mathieu Desnoyers
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • Make the tracepoints more robust, making them solid enough to handle compiler
    changes by not relying on anything based on compiler-specific behavior with
    respect to structure alignment. Implement an approach proposed by David Miller:
    use an array of const pointers to refer to the individual structures, and export
    this pointer array through the linker script rather than the structures per se.
    It will consume 32 extra bytes per tracepoint (24 for structure padding and 8
    for the pointers), but are less likely to break due to compiler changes.

    History:

    commit 7e066fb8 tracepoints: add DECLARE_TRACE() and DEFINE_TRACE()
    added the aligned(32) type and variable attribute to the tracepoint structures
    to deal with gcc happily aligning statically defined structures on 32-byte
    multiples.

    One attempt was to use a 8-byte alignment for tracepoint structures by applying
    both the variable and type attribute to tracepoint structures definitions and
    declarations. It worked fine with gcc 4.5.1, but broke with gcc 4.4.4 and 4.4.5.

    The reason is that the "aligned" attribute only specify the _minimum_ alignment
    for a structure, leaving both the compiler and the linker free to align on
    larger multiples. Because tracepoint.c expects the structures to be placed as an
    array within each section, up-alignment cause NULL-pointer exceptions due to the
    extra unexpected padding.

    (this patch applies on top of -tip)

    Signed-off-by: Mathieu Desnoyers
    Acked-by: David S. Miller
    LKML-Reference:
    CC: Frederic Weisbecker
    CC: Ingo Molnar
    CC: Thomas Gleixner
    CC: Andrew Morton
    CC: Peter Zijlstra
    CC: Rusty Russell
    Signed-off-by: Steven Rostedt

    Mathieu Desnoyers
     
  • Oleg reported that on architectures with
    __ARCH_WANT_INTERRUPTS_ON_CTXSW the IPI from
    task_oncpu_function_call() can land before perf_event_task_sched_in()
    and cause interesting situations for eg. perf_install_in_context().

    This patch reworks the task_oncpu_function_call() interface to give a
    more usable primitive as well as rework all its users to hopefully be
    more obvious as well as remove the races.

    While looking at the code I also found a number of races against
    perf_event_task_sched_out() which can flip contexts between tasks so
    plug those too.

    Reported-and-reviewed-by: Oleg Nesterov
    Signed-off-by: Peter Zijlstra
    LKML-Reference:
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     
  • Currently the trace_event structures are placed in the _ftrace_events
    section, and at link time, the linker makes one large array of all
    the trace_event structures. On boot up, this array is read (much like
    the initcall sections) and the events are processed.

    The problem is that there is no guarantee that gcc will place complex
    structures nicely together in an array format. Two structures in the
    same file may be placed awkwardly, because gcc has no clue that they
    are suppose to be in an array.

    A hack was used previous to force the alignment to 4, to pack the
    structures together. But this caused alignment issues with other
    architectures (sparc).

    Instead of packing the structures into an array, the structures' addresses
    are now put into the _ftrace_event section. As pointers are always the
    natural alignment, gcc should always pack them tightly together
    (otherwise initcall, extable, etc would also fail).

    By having the pointers to the structures in the section, we can still
    iterate the trace_events without causing unnecessary alignment problems
    with other architectures, or depending on the current behaviour of
    gcc that will likely change in the future just to tick us kernel developers
    off a little more.

    The _ftrace_event section is also moved into the .init.data section
    as it is now only needed at boot up.

    Suggested-by: David Miller
    Cc: Mathieu Desnoyers
    Acked-by: David S. Miller
    Signed-off-by: Steven Rostedt

    Steven Rostedt
     
  • FMODE_EXEC is a constant type of fmode_t but was used with normal integer
    constants. This results in following warnings from sparse. Fix it using
    new macro __FMODE_EXEC.

    fs/exec.c:116:58: warning: restricted fmode_t degrades to integer
    fs/exec.c:689:58: warning: restricted fmode_t degrades to integer
    fs/fcntl.c:777:9: warning: restricted fmode_t degrades to integer

    Signed-off-by: Namhyung Kim
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namhyung Kim
     
  • AND-ing FMODE_* constant with normal integer results in following
    sparse warnings. Fix it.

    fs/open.c:662:21: warning: restricted fmode_t degrades to integer
    fs/anon_inodes.c:123:34: warning: restricted fmode_t degrades to integer

    Signed-off-by: Namhyung Kim
    Cc: Al Viro
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Namhyung Kim
     
  • If reclaim after a failed charging was unsuccessful, the limits are
    checked again, just in case they settled by means of other tasks.

    This is all fine as long as every charge is of size PAGE_SIZE, because in
    that case, being below the limit means having at least PAGE_SIZE bytes
    available.

    But with transparent huge pages, we may end up in an endless loop where
    charging and reclaim fail, but we keep going because the limits are not
    yet exceeded, although not allowing for a huge page.

    Fix this up by explicitely checking for enough room, not just whether we
    are within limits.

    Signed-off-by: Johannes Weiner
    Acked-by: KAMEZAWA Hiroyuki
    Reviewed-by: Minchan Kim
    Cc: Balbir Singh
    Cc: Daisuke Nishimura
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     

01 Feb, 2011

3 commits

  • * 'bugfixes' of git://git.linux-nfs.org/projects/trondmy/nfs-2.6:
    NFS: NFSv4 readdir loses entries
    NFS: Micro-optimize nfs4_decode_dirent()
    NFS: Fix an NFS client lockdep issue
    NFS construct consistent co_ownerid for v4.1
    NFS: nfs_wcc_update_inode() should set nfsi->attr_gencount
    NFS improve pnfs_put_deviceid_cache debug print
    NFS fix cb_sequence error processing
    NFS do not find client in NFSv4 pg_authenticate
    NLM: Fix "kernel BUG at fs/lockd/host.c:417!" or ".../host.c:283!"
    NFS: Prevent memory allocation failure in nfsacl_encode()
    NFS: nfsacl_{encode,decode} should return signed integer
    NFS: Fix "kernel BUG at fs/nfs/nfs3xdr.c:1338!"
    NFS: Fix "kernel BUG at fs/aio.c:554!"
    NFS4: Avoid potential NULL pointer dereference in decode_and_add_ds().
    NFS: fix handling of malloc failure during nfs_flush_multi()

    Linus Torvalds
     
  • Fix kernel-doc warning in kernel.h from commit 7ef88ad56145
    ("BUILD_BUG_ON: make it handle more cases"):

    Warning(include/linux/kernel.h:605): No description found for parameter 'condition'
    Warning(include/linux/kernel.h:605): Excess function parameter 'cond' description in 'BUILD_BUG_ON'

    Signed-off-by: Randy Dunlap
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     
  • * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (42 commits)
    usb: gadget: composite: avoid access beyond array max length
    USB: serial: handle Data Carrier Detect changes
    USB: gadget: Fix endpoint representation in ci13xxx_udc
    USB: gadget: Fix error path in ci13xxx_udc gadget probe function
    usb: pch_udc: Fix the worning log issue at gadget driver remove
    USB: serial: Updated support for ICOM devices
    USB: ehci-mxc: add work-around for efika mx/sb bug
    USB: unbreak ehci-mxc on otg port of i.MX27
    drivers: update to pl2303 usb-serial to support Motorola cables
    USB: adding USB support for Cinterion's HC2x, EU3 and PH8 products
    USB serial: add missing .usb_driver field in serial drivers
    USB: ehci-fsl: Fix 'have_sysif_regs' detection
    USB: g_printer: fix bug in module parameter definitions
    USB: g_printer: fix bug in unregistration
    USB: uss720: remove duplicate USB device
    MAINTAINERS: add ueagle-atm entry
    USB: EHCI: fix DMA deallocation bug
    USB: pch_udc: support new device ML7213 IOH
    usb: pch_udc: Fixed issue which does not work with g_serial
    usb: set ep_dev async suspend should be later than device_initialize
    ...

    Linus Torvalds
     

30 Jan, 2011

1 commit

  • SIOCGETSGCNT is not a unique ioctl value as it it maps tio SIOCPROTOPRIVATE +1,
    which unfortunately means the existing infrastructure for compat networking
    ioctls is insufficient. A trivial compact ioctl implementation would conflict
    with:

    SIOCAX25ADDUID
    SIOCAIPXPRISLT
    SIOCGETSGCNT_IN6
    SIOCGETSGCNT
    SIOCRSSCAUSE
    SIOCX25SSUBSCRIP
    SIOCX25SDTEFACILITIES

    To make this work I have updated the compat_ioctl decode path to mirror the
    the normal ioctl decode path. I have added an ipv4 inet_compat_ioctl function
    so that I can have ipv4 specific compat ioctls. I have added a compat_ioctl
    function into struct proto so I can break out ioctls by which kind of ip socket
    I am using. I have added a compat_raw_ioctl function because SIOCGETSGCNT only
    works on raw sockets. I have added a ipmr_compat_ioctl that mirrors the normal
    ipmr_ioctl.

    This was necessary because unfortunately the struct layout for the SIOCGETSGCNT
    has unsigned longs in it so changes between 32bit and 64bit kernels.

    This change was sufficient to run a 32bit ip multicast routing daemon on a
    64bit kernel.

    Reported-by: Bill Fenner
    Signed-off-by: Eric W. Biederman
    Signed-off-by: David S. Miller

    Eric W. Biederman