15 Aug, 2013

2 commits


14 Aug, 2013

3 commits

  • perf_trace_buf_prepare() + perf_trace_buf_submit(task => NULL)
    make no sense if hlist_empty(head). Change perf_trace_##call()
    to check ->perf_events beforehand and do nothing if it is empty.

    This removes the overhead for tasks without events associated
    with them. For example, "perf record -e sched:sched_switch -p1"
    attaches the counter(s) to the single task, but every task in
    system will do perf_trace_buf_prepare/submit() just to realize
    that it was not attached to this event.

    However, we can only do this if __task == NULL, so we also add
    the __builtin_constant_p(__task) check.

    With this patch "perf bench sched pipe" shows approximately 4%
    improvement when "perf record -p1" runs in parallel, many thanks
    to Steven for the testing.

    Link: http://lkml.kernel.org/r/20130806160847.GA2746@redhat.com

    Tested-by: David Ahern
    Acked-by: Peter Zijlstra
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Steven Rostedt

    Oleg Nesterov
     
  • The next patch tries to avoid the costly perf_trace_buf_* calls
    when possible but there is a problem. We can only do this if
    __task == NULL, perf_tp_event(task != NULL) has the additional
    code for this case.

    Unfortunately, TP_perf_assign/__perf_xxx which changes the default
    values of __count/__task variables for perf_trace_buf_submit() is
    called "too late", after we already did perf_trace_buf_prepare(),
    and the optimization above can't work.

    So this patch simply embeds __perf_xxx() into TP_ARGS(), this way
    DECLARE_EVENT_CLASS() can use the result of assignments hidden in
    "args" right after ftrace_get_offsets_##call() which is mostly
    trivial. This allows us to have the fast-path "__task != NULL"
    check at the start, see the next patch.

    Link: http://lkml.kernel.org/r/20130806160844.GA2739@redhat.com

    Tested-by: David Ahern
    Acked-by: Peter Zijlstra
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Steven Rostedt

    Oleg Nesterov
     
  • To simplify the review of the next patches:

    1. We are going to reimplent __perf_task/counter and embedd them
    into TP_ARGS(). expand TRACE_EVENT(sched_stat_runtime) into
    DECLARE_EVENT_CLASS() + DEFINE_EVENT(), this way they can use
    different TP_ARGS's.

    2. Change perf_trace_##call() macro to do perf_fetch_caller_regs()
    right before perf_trace_buf_prepare().

    This way it evaluates TP_ARGS() asap, the next patch explores
    this fact.

    Note: after 87f44bbc perf_trace_buf_prepare() doesn't need
    "struct pt_regs *regs", perhaps it makes sense to remove this
    argument. And perhaps we can teach perf_trace_buf_submit()
    to accept regs == NULL and do fetch_caller_regs(CALLER_ADDR1)
    in this case.

    3. Cosmetic, but the typecast from "void*" buys nothing. It just
    adds the noise, remove it.

    Link: http://lkml.kernel.org/r/20130806160841.GA2736@redhat.com

    Acked-by: Peter Zijlstra
    Tested-by: David Ahern
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Steven Rostedt

    Oleg Nesterov
     

11 Aug, 2013

2 commits

  • Pull NFS client bugfixes from Trond Myklebust:

    - Stable patch for lockd to fix Oopses due to inappropriate calls to
    utsname()->nodename

    - Stable patches for sunrpc to fix Oopses on shutdown when using
    AF_LOCAL sockets with rpcbind

    - Fix memory leak and error checking issues in nfs4_proc_lookup_mountpoint

    - Fix a regression with the sync mount option failing to work for nfs4
    mounts

    - Fix a writeback performance issue when doing cache invalidation

    - Remove an incorrect call to nfs_setsecurity in nfs_fhget

    * tag 'nfs-for-3.11-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFSv4: Fix up nfs4_proc_lookup_mountpoint
    NFS: Remove unnecessary call to nfs_setsecurity in nfs_fhget()
    NFSv4: Fix the sync mount option for nfs4 mounts
    NFS: Fix writeback performance issue on cache invalidation
    SUNRPC: If the rpcbind channel is disconnected, fail the call to unregister
    SUNRPC: Don't auto-disconnect from the local rpcbind socket
    LOCKD: Don't call utsname()->nodename from nlmclnt_setlockargs

    Linus Torvalds
     
  • Pull staging driver fixes from Greg KH:
    "Here are 3 small fixes for staging/IIO drivers for 3.11-rc5. Nothing
    huge, two IIO driver fixes, and a zcache fix. All of these have been
    in linux-next for a while"

    * tag 'staging-3.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
    staging: zcache: fix "zcache=" kernel parameter
    iio: ti_am335x_adc: Fix wrong samples received on 1st read
    iio:trigger: Fix use_count race condition

    Linus Torvalds
     

10 Aug, 2013

2 commits

  • Pull ACPI and power management fixes from Rafael Wysocki:

    - ACPI-based memory hotplug stopped working after a recent change,
    because it's not possible to associate sufficiently many "physical"
    devices with one ACPI device object due to an artificial limit. Fix
    from Rafael J Wysocki removes that limit and makes memory hotplug
    work again.

    - A change made in 3.9 uncovered a bug in the ACPI processor driver
    preventing NUMA nodes from being put offline due to an ordering
    issue. Fix from Yasuaki Ishimatsu changes the ordering to make
    things work again.

    - One of the recent ACPI video commits (that hasn't been reverted so
    far) uncovered a bug in the code handling quirky BIOSes that caused
    some Asus machines to boot with backlight completely off which made
    it quite difficult to use them afterward. Fix from Felipe Contreras
    improves the quirk to cover this particular case correctly.

    - A cpufreq user space interface change made in 3.10 inadvertently
    renamed the ignore_nice_load sysfs attribute to ignore_nice which
    resulted in some confusion. Fix from Viresh Kumar changes the name
    back to ignore_nice_load.

    - An initialization ordering change made in 3.9 broke cpufreq on
    loongson2 boards. Fix from Aaro Koskinen restores the correct
    initialization ordering there.

    - Fix breakage resulting from a mistake made in 3.9 and causing the
    detection of some graphics adapters (that were detected correctly
    before) to fail. There are two objects representing the same PCIe
    port in the affected systems' ACPI tables and both appear as
    "enabled" and we are expected to guess which one to use. We used to
    choose the right one before by pure luck, but when we tried to
    address another similar corner case, the luck went away. This time
    we try to make our guessing a bit more educated which is reported to
    work on those systems.

    - The /proc/acpi/wakeup interface code is missing some locking which
    may lead to breakage if that file is written or read during hotplug
    of wakeup devices. That should be rare but still possible, so it's
    better to start using the appropriate locking there.

    * tag 'pm+acpi-3.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI: Try harder to resolve _ADR collisions for bridges
    cpufreq: rename ignore_nice as ignore_nice_load
    cpufreq: loongson2: fix regression related to clock management
    ACPI / processor: move try_offline_node() after acpi_unmap_lsapic()
    ACPI: Drop physical_node_id_bitmap from struct acpi_device
    ACPI / PM: Walk physical_node_list under physical_node_lock
    ACPI / video: improve quirk check in acpi_video_bqc_quirk()

    Linus Torvalds
     
  • Pull media fixes from Mauro Carvalho Chehab:
    "Some driver fixes (em28xx, coda, usbtv, s5p, hdpvr and ml86v7667) and
    a fix for media DocBook"

    * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media:
    [media] em28xx: fix assignment of the eeprom data
    [media] hdpvr: fix iteration over uninitialized lists in hdpvr_probe()
    [media] usbtv: fix dependency
    [media] usbtv: Throw corrupted frames away
    [media] usbtv: Fix deinterlacing
    [media] v4l2: added missing mutex.h include to v4l2-ctrls.h
    [media] DocBook: upgrade media_api DocBook version to 4.2
    [media] ml86v7667: fix compile warning: 'ret' set but not used
    [media] s5p-g2d: Fix registration failure
    [media] media: coda: Fix DT driver data pointer for i.MX27
    [media] s5p-mfc: Fix input/output format reporting

    Linus Torvalds
     

09 Aug, 2013

2 commits


08 Aug, 2013

4 commits

  • If rpcbind causes our connection to the AF_LOCAL socket to close after
    we've registered a service, then we want to be careful about reconnecting
    since the mount namespace may have changed.

    By simply refusing to reconnect the AF_LOCAL socket in the case of
    unregister, we avoid the need to somehow save the mount namespace. While
    this may lead to some services not unregistering properly, it should
    be safe.

    Signed-off-by: Trond Myklebust
    Cc: Nix
    Cc: Jeff Layton
    Cc: stable@vger.kernel.org # 3.9.x

    Trond Myklebust
     
  • In theory, under a given ACPI namespace node there should be only
    one child device object with _ADR whose value matches a given bus
    address exactly. In practice, however, there are systems in which
    multiple child device objects under a given parent have _ADR matching
    exactly the same address. In those cases we use _STA to determine
    which of the multiple matching devices is enabled, since some systems
    are known to indicate which ACPI device object to associate with the
    given physical (usually PCI) device this way.

    Unfortunately, as it turns out, there are systems in which many
    device objects under the same parent have _ADR matching exactly the
    same bus address and none of them has _STA, in which case they all
    should be regarded as enabled according to the spec. Still, if
    those device objects are supposed to represent bridges (e.g. this
    is the case for device objects corresponding to PCIe ports), we can
    try harder and skip the ones that have no child device objects in the
    ACPI namespace. With luck, we can avoid using device objects that we
    are not expected to use this way.

    Although this only works for bridges whose children also have ACPI
    namespace representation, it is sufficient to address graphics
    adapter detection issues on some systems, so rework the code finding
    a matching device ACPI handle for a given bus address to implement
    this idea.

    Introduce a new function, acpi_find_child(), taking three arguments:
    the ACPI handle of the device's parent, a bus address suitable for
    the device's bus type and a bool indicating if the device is a
    bridge and make it work as outlined above. Reimplement the function
    currently used for this purpose, acpi_get_child(), as a call to
    acpi_find_child() with the last argument set to 'false' and make
    the PCI subsystem use acpi_find_child() with the bridge information
    passed as the last argument to it. [Lan Tianyu notices that it is
    not sufficient to use pci_is_bridge() for that, because the device's
    subordinate pointer hasn't been set yet at this point, so use
    hdr_type instead.]

    This change fixes a regression introduced inadvertently by commit
    33f767d (ACPI: Rework acpi_get_child() to be more efficient) which
    overlooked the fact that for acpi_walk_namespace() "post-order" means
    "after all children have been visited" rather than "on the way back",
    so for device objects without children and for namespace walks of
    depth 1, as in the acpi_get_child() case, the "post-order" callbacks
    ordering is actually the same as the ordering of "pre-order" ones.
    Since that commit changed the namespace walk in acpi_get_child() to
    terminate after finding the first matching object instead of going
    through all of them and returning the last one, it effectively
    changed the result returned by that function in some rare cases and
    that led to problems (the switch from a "pre-order" to a "post-order"
    callback was supposed to prevent that from happening, but it was
    ineffective).

    As it turns out, the systems where the change made by commit
    33f767d actually matters are those where there are multiple ACPI
    device objects representing the same PCIe port (which effectively
    is a bridge). Moreover, only one of them, and the one we are
    expected to use, has child device objects in the ACPI namespace,
    so the regression can be addressed as described above.

    References: https://bugzilla.kernel.org/show_bug.cgi?id=60561
    Reported-by: Peter Wu
    Tested-by: Vladimir Lalov
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Bjorn Helgaas
    Cc: 3.9+ # 3.9+

    Rafael J. Wysocki
     
  • The only way to get the event ID is by reading the event fd,
    followed by parsing the ID value out of the returned data.

    While this is ok for current read format used by perf tool,
    it is not ok when we use PERF_FORMAT_GROUP format.

    With this format the data are returned for the whole group
    and there's no way to find out what ID belongs to our fd
    (if we are not group leader event).

    Adding a simple ioctl that returns event primary ID for given fd.

    Signed-off-by: Jiri Olsa
    Acked-by: Namhyung Kim
    Acked-by: Peter Zijlstra
    Cc: Corey Ashford
    Cc: Frederic Weisbecker
    Cc: Namhyung Kim
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/n/tip-v1bn5cto707jn0bon34afqr1@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Jiri Olsa
     
  • …t/rostedt/linux-trace

    Pull tracing fixes from Steven Rostedt:
    "Oleg Nesterov has been working hard in closing all the holes that can
    lead to race conditions between deleting an event and accessing an
    event debugfs file. This included a fix to the debugfs system (acked
    by Greg Kroah-Hartman). We think that all the holes have been patched
    and hopefully we don't find more. I haven't marked all of them for
    stable because I need to examine them more to figure out how far back
    some of the changes need to go.

    Along the way, some other fixes have been made. Alexander Z Lam fixed
    some logic where the wrong buffer was being modifed.

    Andrew Vagin found a possible corruption for machines that actually
    allocate cpumask, as a reference to one was being zeroed out by
    mistake.

    Dhaval Giani found a bad prototype when tracing is not configured.

    And I not only had some changes to help Oleg, but also finally fixed a
    long standing bug that Dave Jones and others have been hitting, where
    a module unload and reload can cause the function tracing accounting
    to get screwed up"

    * tag 'trace-fixes-3.11-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
    tracing: Fix reset of time stamps during trace_clock changes
    tracing: Make TRACE_ITER_STOP_ON_FREE stop the correct buffer
    tracing: Fix trace_dump_stack() proto when CONFIG_TRACING is not set
    tracing: Fix fields of struct trace_iterator that are zeroed by mistake
    tracing/uprobes: Fail to unregister if probe event files are in use
    tracing/kprobes: Fail to unregister if probe event files are in use
    tracing: Add comment to describe special break case in probe_remove_event_call()
    tracing: trace_remove_event_call() should fail if call/file is in use
    debugfs: debugfs_remove_recursive() must not rely on list_empty(d_subdirs)
    ftrace: Check module functions being traced on reload
    ftrace: Consolidate some duplicate code for updating ftrace ops
    tracing: Change remove_event_file_dir() to clear "d_subdirs"->i_private
    tracing: Introduce remove_event_file_dir()
    tracing: Change f_start() to take event_mutex and verify i_private != NULL
    tracing: Change event_filter_read/write to verify i_private != NULL
    tracing: Change event_enable/disable_read() to verify i_private != NULL
    tracing: Turn event/id->i_private into call->event.type

    Linus Torvalds
     

07 Aug, 2013

1 commit

  • regmap.h requires linux/err.h if CONFIG_REGMAP is not defined. Without it I get
    error.
    CC drivers/media/platform/exynos4-is/fimc-reg.o
    In file included from drivers/media/platform/exynos4-is/fimc-reg.c:14:0:
    include/linux/regmap.h: In function ‘regmap_write’:
    include/linux/regmap.h:525:10: error: ‘EINVAL’ undeclared (first use in this function)
    include/linux/regmap.h:525:10: note: each undeclared identifier is reported only once for each function it appears in

    Signed-off-by: Mateusz Krawczuk
    Signed-off-by: Kyungmin Park
    Signed-off-by: Mark Brown
    Cc: stable@kernel.org

    Mateusz Krawczuk
     

06 Aug, 2013

1 commit

  • The physical_node_id_bitmap in struct acpi_device is only used for
    looking up the first currently unused dependent phyiscal node ID
    by acpi_bind_one(). It is not really necessary, however, because
    acpi_bind_one() walks the entire physical_node_list of the given
    device object for sanity checking anyway and if that list is always
    sorted by node_id, it is straightforward to find the first gap
    between the currently used node IDs and use that number as the ID
    of the new list node.

    This also removes the artificial limit of the maximum number of
    dependent physical devices per ACPI device object, which now depends
    only on the capacity of unsigend int. As a result, it fixes a
    regression introduced by commit e2ff394 (ACPI / memhotplug: Bind
    removable memory blocks to ACPI device nodes) that caused
    acpi_memory_enable_device() to fail when the number of 128 MB blocks
    within one removable memory module was greater than 32.

    Reported-and-tested-by: Yasuaki Ishimatsu
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Toshi Kani
    Reviewed-by: Yasuaki Ishimatsu

    Rafael J. Wysocki
     

05 Aug, 2013

1 commit


04 Aug, 2013

1 commit

  • Pull networking fixes from David Miller:

    1) Don't ignore user initiated wireless regulatory settings on cards
    with custom regulatory domains, from Arik Nemtsov.

    2) Fix length check of bluetooth information responses, from Jaganath
    Kanakkassery.

    3) Fix misuse of PTR_ERR in btusb, from Adam Lee.

    4) Handle rfkill properly while iwlwifi devices are offline, from
    Emmanuel Grumbach.

    5) Fix r815x devices DMA'ing to stack buffers, from Hayes Wang.

    6) Kernel info leak in ATM packet scheduler, from Dan Carpenter.

    7) 8139cp doesn't check for DMA mapping errors, from Neil Horman.

    8) Fix bridge multicast code to not snoop when no querier exists,
    otherwise mutlicast traffic is lost. From Linus Lüssing.

    9) Avoid soft lockups in fib6_run_gc(), from Michal Kubecek.

    10) Fix races in automatic address asignment on ipv6, which can result
    in incorrect lifetime assignments. From Jiri Benc.

    11) Cure build bustage when CONFIG_NET_LL_RX_POLL is not set and rename
    it CONFIG_NET_RX_BUSY_POLL to eliminate the last reference to the
    original naming of this feature. From Cong Wang.

    12) Fix crash in TIPC when server socket creation fails, from Ying Xue.

    13) macvlan_changelink() silently succeeds when it shouldn't, from
    Michael S Tsirkin.

    14) HTB packet scheduler can crash due to sign extension, fix from
    Stephen Hemminger.

    15) With the cable unplugged, r8169 prints out a message every 10
    seconds, make it netif_dbg() instead of netif_warn(). From Peter
    Wu.

    16) Fix memory leak in rtm_to_ifaddr(), from Daniel Borkmann.

    17) sis900 gets spurious TX queue timeouts due to mismanagement of link
    carrier state, from Denis Kirjanov.

    18) Validate somaxconn sysctl to make sure it fits inside of a u16.
    From Roman Gushchin.

    19) Fix MAC address filtering on qlcnic, from Shahed Shaikh.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (68 commits)
    qlcnic: Fix for flash update failure on 83xx adapter
    qlcnic: Fix link speed and duplex display for 83xx adapter
    qlcnic: Fix link speed display for 82xx adapter
    qlcnic: Fix external loopback test.
    qlcnic: Removed adapter series name from warning messages.
    qlcnic: Free up memory in error path.
    qlcnic: Fix ingress MAC learning
    qlcnic: Fix MAC address filter issue on 82xx adapter
    net: ethernet: davinci_emac: drop IRQF_DISABLED
    netlabel: use domain based selectors when address based selectors are not available
    net: check net.core.somaxconn sysctl values
    sis900: Fix the tx queue timeout issue
    net: rtm_to_ifaddr: free ifa if ifa_cacheinfo processing fails
    r8169: remove "PHY reset until link up" log spam
    net: ethernet: cpsw: drop IRQF_DISABLED
    htb: fix sign extension bug
    macvlan: handle set_promiscuity failures
    macvlan: better mode validation
    tipc: fix oops when creating server socket fails
    net: rename CONFIG_NET_LL_RX_POLL to CONFIG_NET_RX_BUSY_POLL
    ...

    Linus Torvalds
     

03 Aug, 2013

4 commits

  • When CONFIG_TRACING is not enabled, the stub prototype for trace_dump_stack()
    is incorrect. It has (void) when it should be (int).

    Link: http://lkml.kernel.org/r/CAPhKKr_H=ukFnBL4WgDOVT5ay2xeF-Ho+CA0DWZX0E2JW-=vSQ@mail.gmail.com

    Signed-off-by: Dhaval Giani
    Signed-off-by: Steven Rostedt

    Dhaval Giani
     
  • tracing_read_pipe zeros all fields bellow "seq". The declaration contains
    a comment about that, but it doesn't help.

    The first field is "snapshot", it's true when current open file is
    snapshot. Looks obvious, that it should not be zeroed.

    The second field is "started". It was converted from cpumask_t to
    cpumask_var_t (v2.6.28-4983-g4462344), in other words it was
    converted from cpumask to pointer on cpumask.

    Currently the reference on "started" memory is lost after the first read
    from tracing_read_pipe and a proper object will never be freed.

    The "started" is never dereferenced for trace_pipe, because trace_pipe
    can't have the TRACE_FILE_ANNOTATE options.

    Link: http://lkml.kernel.org/r/1375463803-3085183-1-git-send-email-avagin@openvz.org

    Cc: stable@vger.kernel.org # 2.6.30
    Signed-off-by: Andrew Vagin
    Signed-off-by: Steven Rostedt

    Andrew Vagin
     
  • Pull infiniband/rdma fixes from Roland Dreier:
    - Fixes for the newly merged mlx5 hardware driver
    - Stack info leak fixes from Dan Carpenter
    - Fixes for pkey table handling with SR-IOV
    - A few other small things

    * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    IPoIB: Fix pkey change flow for virtualization environments
    IPoIB: Make sure child devices use valid/proper pkeys
    IB/core: Create QP1 using the pkey index which contains the default pkey
    mlx5_core: Variable may be used uninitialized
    mlx5_core: Implement new initialization sequence
    mlx5_core: Fix use after free in mlx5_cmd_comp_handler()
    IB/mlx5: Fix stack info leak in mlx5_ib_alloc_ucontext()
    IB/mlx5: Fix error return code in init_one()
    IB/mlx4: Use default pkey when creating tunnel QPs
    RDMA/cma: Only call cma_save_ib_info() for CM REQs
    RDMA/cma: Fix accessing invalid private data for UD
    RDMA/cma: Fix gcc warning
    Revert "RDMA/nes: Fix compilation error when nes_debug is enabled"
    IB/qib: Add err_decode() call for ring dump
    RDMA/cxgb3: Fix stack info leak in iwch_create_cq()
    RDMA/nes: Fix info leaks in nes_create_qp() and nes_create_cq()
    RDMA/ocrdma: Fix several stack info leaks
    RDMA/cxgb4: Fix stack info leak in c4iw_create_qp()
    RDMA/ocrdma: Remove unused include

    Linus Torvalds
     
  • Pull ACPI and power management fixes from Rafael Wysocki:

    - Revert two cpuidle commits added during the 3.8 development cycle
    that turn out to have introduced a significant performance regression
    as requested by Jeremy Eder.

    - The recent patches that made the freezer less heavy-weight introduced
    a regression causing user-space-driven hibernation using the ioctl()
    interface to block indefinitely when the hibernate process executes
    try_to_freeze(). Fix from Colin Cross addresses this by adding a
    process flag to mark the hibernate/suspend process to inform the
    freezer that that process should be ignored.

    - One of the recent cpufreq reverts uncovered a problem in the core
    causing the cpufreq driver module refcount to become negative after a
    system suspend-resume cycle. Fix from Rafael J Wysocki.

    - The evaluation of the ACPI battery _BIX method has never worked
    correctly, because the commit that added support for it forgot to
    take the "Revision" field in the return package into account. As a
    result, the reading of battery info doesn't work at all on some
    systems, which is addressed by a fix from Lan Tianyu.

    * tag 'pm+acpi-3.11-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    freezer: set PF_SUSPEND_TASK flag on tasks that call freeze_processes
    ACPI / battery: Fix parsing _BIX return value
    cpufreq: Fix cpufreq driver module refcount balance after suspend/resume
    Revert "cpuidle: Quickly notice prediction failure for repeat mode"
    Revert "cpuidle: Quickly notice prediction failure in general case"

    Linus Torvalds
     

02 Aug, 2013

4 commits

  • Eliezer renames several *ll_poll to *busy_poll, but forgets
    CONFIG_NET_LL_RX_POLL, so in case of confusion, rename it too.

    Cc: Eliezer Tamir
    Cc: David S. Miller
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     
  • When CONFIG_NET_LL_RX_POLL is not set, I got:

    net/socket.c: In function ‘sock_poll’:
    net/socket.c:1165:4: error: implicit declaration of function ‘sk_busy_loop’ [-Werror=implicit-function-declaration]

    Fix this by adding a nop when !CONFIG_NET_LL_RX_POLL.

    Cc: Eliezer Tamir
    Cc: David S. Miller
    Signed-off-by: Cong Wang
    Signed-off-by: David S. Miller

    Cong Wang
     
  • On a high-traffic router with many processors and many IPv6 dst
    entries, soft lockup in fib6_run_gc() can occur when number of
    entries reaches gc_thresh.

    This happens because fib6_run_gc() uses fib6_gc_lock to allow
    only one thread to run the garbage collector but ip6_dst_gc()
    doesn't update net->ipv6.ip6_rt_last_gc until fib6_run_gc()
    returns. On a system with many entries, this can take some time
    so that in the meantime, other threads pass the tests in
    ip6_dst_gc() (ip6_rt_last_gc is still not updated) and wait for
    the lock. They then have to run the garbage collector one after
    another which blocks them for quite long.

    Resolve this by replacing special value ~0UL of expire parameter
    to fib6_run_gc() by explicit "force" parameter to choose between
    spin_lock_bh() and spin_trylock_bh() and call fib6_run_gc() with
    force=false if gc_thresh is reached but not max_size.

    Signed-off-by: Michal Kubecek
    Signed-off-by: David S. Miller

    Michal Kubeček
     
  • …wireless into for-davem

    John W. Linville
     

01 Aug, 2013

8 commits

  • Pull drm fixes from Dave Airlie:
    "Radeon, nouveau, exynos, intel, mgag200..

    Not all strictly regressions but there was probably only one patch I'd
    have really left out and it didn't seem worth respinning exynos to
    avoid it, the line change count is quite low.

    radeon: regressions + more dynamic powermanagement fixes, since DPM
    is a new feature, and off by default I'd prefer to keep merging
    fixes since it has a large userbase already and I'd like to keep
    them on mainline

    nouveau: is mostly regression fixes

    i915: is a regression fix since Daniel is on holidays I've merged it.

    mgag200: I've picked a bunch of targetted fixes from a big bunch of
    distro patches,

    exynos: build fixes mostly, one regression fix

    I expect things will slow right down now, I may send on the intel
    early quirk from Jesse separatly, since I think the x86 maintainers
    acked it"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (37 commits)
    drm/i915: fix missed hunk after GT access breakage
    drm/radeon/dpm: re-enable cac control on SI
    drm/radeon/dpm: fix calculations in si_calculate_leakage_for_v_and_t_formula
    drm: fix 64 bit drm fixed point helpers
    drm/radeon/atom: initialize more atom interpretor elements to 0
    drm/nouveau: fix semaphore dmabuf obj
    drm/nouveau/vm: make vm refcount into a kref
    drm/nv31/mpeg: don't recognize nv3x cards as having nv44 graph class
    drm/nv40/mpeg: write magic value to channel object to make it work
    drm/nouveau: fix size check for cards without vm
    drm/nv50-/disp: remove dcb_outp_match call, and related variables
    drm/nva3-/disp: fix hda eld writing, needs to be padded
    drm/nv31/mpeg: fix mpeg engine initialization
    drm/nv50/mc: include vp in the fb error reporting mask
    drm/nouveau: fix null pointer dereference in poll_changed
    drm/nv50/gpio: post-nv92 cards have 32 interrupt lines
    drm/nvc0/fb: take lock in nvc0_ram_put()
    drm/nouveau/core: xtensa firmware size needs to be 0x40000 no matter what
    drm/mgag200: Fix LUT programming for 16bpp
    drm/mgag200: Fix framebuffer pitch calculation
    ...

    Linus Torvalds
     
  • Merge more patches from Andrew Morton:
    "A bunch of fixes.

    Plus Joe's printk move and rework. It's not a -rc3 thing but now
    would be a nice time to offload it, while things are quiet. I've been
    sitting on it all for a couple of weeks, no issues"

    * emailed patches from Andrew Morton :
    vmpressure: make sure there are no events queued after memcg is offlined
    vmpressure: do not check for pending work to prevent from new work
    vmpressure: change vmpressure::sr_lock to spinlock
    printk: rename struct log to struct printk_log
    printk: use pointer for console_cmdline indexing
    printk: move braille console support into separate braille.[ch] files
    printk: add console_cmdline.h
    printk: move to separate directory for easier modification
    drivers/rtc/rtc-twl.c: fix: rtcX/wakealarm attribute isn't created
    mm: zbud: fix condition check on allocation size
    thp, mm: avoid PageUnevictable on active/inactive lru lists
    mm/swap.c: clear PageActive before adding pages onto unevictable list
    arch/x86/platform/ce4100/ce4100.c: include reboot.h
    mm: sched: numa: fix NUMA balancing when !SCHED_DEBUG
    rapidio: fix use after free in rio_unregister_scan()
    .gitignore: ignore *.lz4 files
    MAINTAINERS: dynamic debug: Jason's not there...
    dmi_scan: add comments on dmi_present() and the loop in dmi_scan_machine()
    ocfs2/refcounttree: add the missing NULL check of the return value of find_or_create_page()
    mm: mempolicy: fix mbind_range() && vma_adjust() interaction

    Linus Torvalds
     
  • Signed-off-by: Joe Perches
    Signed-off-by: David S. Miller

    Joe Perches
     
  • vmpressure is called synchronously from reclaim where the target_memcg
    is guaranteed to be alive but the eventfd is signaled from the work
    queue context. This means that memcg (along with vmpressure structure
    which is embedded into it) might go away while the work item is pending
    which would result in use-after-release bug.

    We have two possible ways how to fix this. Either vmpressure pins memcg
    before it schedules vmpr->work and unpin it in vmpressure_work_fn or
    explicitely flush the work item from the css_offline context (as
    suggested by Tejun).

    This patch implements the later one and it introduces vmpressure_cleanup
    which flushes the vmpressure work queue item item. It hooks into
    mem_cgroup_css_offline after the memcg itself is cleaned up.

    [akpm@linux-foundation.org: coding-style fixes]
    Signed-off-by: Michal Hocko
    Reported-by: Tejun Heo
    Cc: Anton Vorontsov
    Cc: Johannes Weiner
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Cc: Li Zefan
    Acked-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     
  • There is nothing that can sleep inside critical sections protected by
    this lock and those sections are really small so there doesn't make much
    sense to use mutex for them. Change the log to a spinlock

    Signed-off-by: Michal Hocko
    Reported-by: Tejun Heo
    Cc: Anton Vorontsov
    Cc: Johannes Weiner
    Cc: KAMEZAWA Hiroyuki
    Cc: KOSAKI Motohiro
    Cc: Li Zefan
    Reviewed-by: Tejun Heo
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Michal Hocko
     
  • Introduce enbale_hca and disable_hca commands to signify when the
    driver starts or ceases to operate on the device.

    In addition the driver will use boot and init pages count; boot pages
    is required to allow firmware to complete boot commands and the other
    to complete init hca. Command interface revision is bumped to 4 to
    enforce using supported firmware.

    This patch breaks compatibility with old versions of firmware (< 4);
    however, the first GA firmware we will publish will support version 4
    so this should not be a problem.

    Signed-off-by: Eli Cohen
    Signed-off-by: Roland Dreier

    Eli Cohen
     
  • Pull networking fixes from David Miller:

    1) Fix association failures not triggering a connect-failure event in
    cfg80211, from Johannes Berg.

    2) Eliminate a potential NULL deref with older iptables tools when
    configuring xt_socket rules, from Eric Dumazet.

    3) Missing RTNL locking in wireless regulatory code, from Johannes
    Berg.

    4) Fix OOPS caused by firmware loading races in ath9k_htc, from Alexey
    Khoroshilov.

    5) Fix usb URB leak in usb_8dev CAN driver, also from Alexey
    Khoroshilov.

    6) VXLAN namespace teardown fails to unregister devices, from Stephen
    Hemminger.

    7) Fix multicast settings getting dropped by firmware in qlcnic driver,
    from Sucheta Chakraborty.

    8) Add sysctl range enforcement for tcp_syn_retries, from Michal Tesar.

    9) Fix a nasty bug in bridging where an active timer would get
    reinitialized with a setup_timer() call. From Eric Dumazet.

    10) Fix use after free in new mlx5 driver, from Dan Carpenter.

    11) Fix freed pointer reference in ipv6 multicast routing on namespace
    cleanup, from Hannes Frederic Sowa.

    12) Some usbnet drivers report TSO and SG in their feature set, but the
    usbnet layer doesn't really support them. From Eric Dumazet.

    13) Fix crash on EEH errors in tg3 driver, from Gavin Shan.

    14) Drop cb_lock when requesting modules in genetlink, from Stanislaw
    Gruszka.

    15) Kernel stack leaks in cbq scheduler and af_key pfkey messages, from
    Dan Carpenter.

    16) FEC driver erroneously signals NETDEV_TX_BUSY on transmit leading to
    endless loops, from Uwe Kleine-König.

    17) Fix hangs from loading mvneta driver, from Arnaud Patard.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (84 commits)
    mlx5: fix error return code in mlx5_alloc_uuars()
    mvneta: Try to fix mvneta when compiled as module
    mvneta: Fix hang when loading the mvneta driver
    atl1c: Fix misuse of netdev_alloc_skb in refilling rx ring
    genetlink: fix usage of NLM_F_EXCL or NLM_F_REPLACE
    af_key: more info leaks in pfkey messages
    net/fec: Don't let ndo_start_xmit return NETDEV_TX_BUSY without link
    net_sched: Fix stack info leak in cbq_dump_wrr().
    igb: fix vlan filtering in promisc mode when not in VT mode
    ixgbe: Fix Tx Hang issue with lldpad on 82598EB
    genetlink: release cb_lock before requesting additional module
    net: fec: workaround stop tx during errata ERR006358
    qlcnic: Fix diagnostic interrupt test for 83xx adapters.
    qlcnic: Fix setting Guest VLAN
    qlcnic: Fix operation type and command type.
    qlcnic: Fix initialization of work function.
    Revert "atl1c: Fix misuse of netdev_alloc_skb in refilling rx ring"
    atl1c: Fix misuse of netdev_alloc_skb in refilling rx ring
    net/tg3: Fix warning from pci_disable_device()
    net/tg3: Fix kernel crash
    ...

    Linus Torvalds
     
  • Change trace_remove_event_call(call) to return the error if this
    call is active. This is what the callers assume but can't verify
    outside of the tracing locks. Both trace_kprobe.c/trace_uprobe.c
    need the additional changes, unregister_trace_probe() should abort
    if trace_remove_event_call() fails.

    The caller is going to free this call/file so we must ensure that
    nobody can use them after trace_remove_event_call() succeeds.
    debugfs should be fine after the previous changes and event_remove()
    does TRACE_REG_UNREGISTER, but still there are 2 reasons why we need
    the additional checks:

    - There could be a perf_event(s) attached to this tp_event, so the
    patch checks ->perf_refcount.

    - TRACE_REG_UNREGISTER can be suppressed by FTRACE_EVENT_FL_SOFT_MODE,
    so we simply check FTRACE_EVENT_FL_ENABLED protected by event_mutex.

    Link: http://lkml.kernel.org/r/20130729175033.GB26284@redhat.com

    Reviewed-by: Masami Hiramatsu
    Signed-off-by: Oleg Nesterov
    Signed-off-by: Steven Rostedt

    Oleg Nesterov
     

31 Jul, 2013

3 commits


30 Jul, 2013

2 commits

  • Calling freeze_processes sets a global flag that will cause any
    process that calls try_to_freeze to enter the refrigerator. It
    skips sending a signal to the current task, but if the current
    task ever hits try_to_freeze, all threads will be frozen and the
    system will deadlock.

    Set a new flag, PF_SUSPEND_TASK, on the task that calls
    freeze_processes. The flag notifies the freezer that the thread
    is involved in suspend and should not be frozen. Also add a
    WARN_ON in thaw_processes if the caller does not have the
    PF_SUSPEND_TASK flag set to catch if a different task calls
    thaw_processes than the one that called freeze_processes, leaving
    a task with PF_SUSPEND_TASK permanently set on it.

    Threads that spawn off a task with PF_SUSPEND_TASK set (which
    swsusp does) will also have PF_SUSPEND_TASK set, preventing them
    from freezing while they are helping with suspend, but they need
    to be dead by the time suspend is triggered, otherwise they may
    run when userspace is expected to be frozen. Add a WARN_ON in
    thaw_processes if more than one thread has the PF_SUSPEND_TASK
    flag set.

    Reported-and-tested-by: Michael Leun
    Signed-off-by: Colin Cross
    Signed-off-by: Rafael J. Wysocki

    Colin Cross
     
  • Pull firewire regression fix from Stefan Richter:
    "This fixes corrupted video capture, seen with IIDC/DCAM video and
    certain buffer settings. (Regression since v3.4 inclusive.)"

    * tag 'firewire-fix' of git://git.kernel.org/pub/scm/linux/kernel/git/ieee1394/linux1394:
    firewire: fix libdc1394/FlyCap2 iso event regression

    Linus Torvalds