21 Nov, 2013

1 commit

  • Doing an if statement to test some condition to know if we should
    trigger a tracepoint is pointless when tracing is disabled. This just
    adds overhead and wastes a branch prediction. This is why the
    TRACE_EVENT_CONDITION() was created. It places the check inside the jump
    label so that the branch does not happen unless tracing is enabled.

    That is, instead of doing:

    if (em)
    trace_btrfs_get_extent(root, em);

    Which is basically this:

    if (em)
    if (static_key(trace_btrfs_get_extent)) {

    Using a TRACE_EVENT_CONDITION() we can just do:

    trace_btrfs_get_extent(root, em);

    And the condition trace event will do:

    if (static_key(trace_btrfs_get_extent)) {
    if (em) {
    ...

    The static key is a non conditional jump (or nop) that is faster than
    having to check if em is NULL or not.

    Signed-off-by: Steven Rostedt
    Signed-off-by: Josef Bacik
    Signed-off-by: Chris Mason

    Steven Rostedt
     

12 Nov, 2013

1 commit

  • So both Liu and I made huge messes of find_lock_delalloc_range trying to fix
    stuff, me first by fixing extent size, then him by fixing something I broke and
    then me again telling him to fix it a different way. So this is obviously a
    candidate for some testing. This patch adds a pseudo fs so we can allocate fake
    inodes for tests that need an inode or pages. Then it addes a bunch of tests to
    make sure find_lock_delalloc_range is acting the way it is supposed to. With
    this patch and all of our previous patches to find_lock_delalloc_range I am sure
    it is working as expected now. Thanks,

    Signed-off-by: Josef Bacik
    Signed-off-by: Chris Mason

    Josef Bacik
     

04 Nov, 2013

1 commit

  • Negative message lengths make no sense -- so don't do negative queue
    lenghts or identifier counts. Prevent them from getting negative.

    Also change the underlying data types to be unsigned to avoid hairy
    surprises with sign extensions in cases where those variables get
    evaluated in unsigned expressions with bigger data types, e.g size_t.

    In case a user still wants to have "unlimited" sizes she could just use
    INT_MAX instead.

    Signed-off-by: Mathias Krause
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mathias Krause
     

02 Nov, 2013

1 commit


31 Oct, 2013

1 commit

  • this_cpu_sub() is implemented as negation and addition.

    This patch casts the adjustment to the counter type before negation to
    sign extend the adjustment. This helps in cases where the counter type
    is wider than an unsigned adjustment. An alternative to this patch is
    to declare such operations unsupported, but it seemed useful to avoid
    surprises.

    This patch specifically helps the following example:
    unsigned int delta = 1
    preempt_disable()
    this_cpu_write(long_counter, 0)
    this_cpu_sub(long_counter, delta)
    preempt_enable()

    Before this change long_counter on a 64 bit machine ends with value
    0xffffffff, rather than 0xffffffffffffffff. This is because
    this_cpu_sub(pcp, delta) boils down to this_cpu_add(pcp, -delta),
    which is basically:
    long_counter = 0 + 0xffffffff

    Also apply the same cast to:
    __this_cpu_sub()
    __this_cpu_sub_return()
    this_cpu_sub_return()

    All percpu_test.ko passes, especially the following cases which
    previously failed:

    l -= ui_one;
    __this_cpu_sub(long_counter, ui_one);
    CHECK(l, long_counter, -1);

    l -= ui_one;
    this_cpu_sub(long_counter, ui_one);
    CHECK(l, long_counter, -1);
    CHECK(l, long_counter, 0xffffffffffffffff);

    ul -= ui_one;
    __this_cpu_sub(ulong_counter, ui_one);
    CHECK(ul, ulong_counter, -1);
    CHECK(ul, ulong_counter, 0xffffffffffffffff);

    ul = this_cpu_sub_return(ulong_counter, ui_one);
    CHECK(ul, ulong_counter, 2);

    ul = __this_cpu_sub_return(ulong_counter, ui_one);
    CHECK(ul, ulong_counter, 1);

    Signed-off-by: Greg Thelen
    Acked-by: Tejun Heo
    Acked-by: Johannes Weiner
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Greg Thelen
     

29 Oct, 2013

1 commit

  • The PPC64 people noticed a missing memory barrier and crufty old
    comments in the perf ring buffer code. So update all the comments and
    add the missing barrier.

    When the architecture implements local_t using atomic_long_t there
    will be double barriers issued; but short of introducing more
    conditional barrier primitives this is the best we can do.

    Reported-by: Victor Kaplansky
    Tested-by: Victor Kaplansky
    Signed-off-by: Peter Zijlstra
    Cc: Mathieu Desnoyers
    Cc: michael@ellerman.id.au
    Cc: Paul McKenney
    Cc: Michael Neuling
    Cc: Frederic Weisbecker
    Cc: anton@samba.org
    Cc: benh@kernel.crashing.org
    Link: http://lkml.kernel.org/r/20131025173749.GG19466@laptop.lan
    Signed-off-by: Ingo Molnar

    Peter Zijlstra
     

28 Oct, 2013

1 commit

  • Pull SCSI target fixes from Nicholas Bellinger:
    "Here are the outstanding target pending fixes for v3.12-rc7.

    This includes a number of EXTENDED_COPY related fixes as a result of
    Thomas and Doug's continuing testing and feedback.

    Also included is an important vhost/scsi fix that addresses a long
    standing issue where the 'write' parameter for get_user_pages_fast()
    was incorrectly set for virtio-scsi WRITEs -> DMA_TO_DEVICE, and not
    for virtio-scsi READs -> DMA_FROM_DEVICE.

    This resulted in random userspace segfaults and other unpleasantness
    on KVM host, and unfortunately has been an issue since the initial
    merge of vhost/scsi in v3.6. This patch is CC'ed to stable, along
    with two other less critical items"

    * git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
    vhost/scsi: Fix incorrect usage of get_user_pages_fast write parameter
    target/pscsi: fix return value check
    target: Fail XCOPY for non matching source + destination block_size
    target: Generate failure for XCOPY I/O with non-zero scsi_status
    target: Add missing XCOPY I/O operation sense_buffer
    iser-target: check device before dereferencing its variable
    target: Return an error for WRITE SAME with ANCHOR==1
    target: Fix assignment of LUN in tracepoints
    target: Reject EXTENDED_COPY when emulate_3pc is disabled
    target: Allow non zero ListID in EXTENDED_COPY parameter list
    target: Make target_do_xcopy failures return INVALID_PARAMETER_LIST

    Linus Torvalds
     

23 Oct, 2013

2 commits

  • Pull infiniband bugfix from Roland Dreier:
    "Disable not-quite-ready userspace ABI for IB flow steering"

    * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    IB/core: Temporarily disable create_flow/destroy_flow uverbs

    Linus Torvalds
     
  • Pull networking fixes from David Miller:
    "Sorry I let so much accumulate, I was in Buffalo and wanted a few
    things to cook in my tree for a while before sending to you. Anyways,
    it's a lot of little things as usual at this stage in the game"

    1) Make bonding MAINTAINERS entry reflect reality, from Andy
    Gospodarek.

    2) Fix accidental sock_put() on timewait mini sockets, from Eric
    Dumazet.

    3) Fix crashes in l2tp due to mis-handling of ipv4 mapped ipv6
    addresses, from François CACHEREUL.

    4) Fix heap overflow in __audit_sockaddr(), from the eagle eyed Dan
    Carpenter.

    5) tcp_shifted_skb() doesn't take handle FINs properly, from Eric
    Dumazet.

    6) SFC driver bug fixes from Ben Hutchings.

    7) Fix TX packet scheduling wedge after channel change in ath9k driver,
    from Felix Fietkau.

    8) Fix user after free in BPF JIT code, from Alexei Starovoitov.

    9) Source address selection test is reversed in
    __ip_route_output_key(), fix from Jiri Benc.

    10) VLAN and CAN layer mis-size netlink attributes, from Marc
    Kleine-Budde.

    11) Fix permission checks in sysctls to use current_euid() instead of
    current_uid(). From Eric W Biederman.

    12) IPSEC policies can go away while a timer is still pending for them,
    add appropriate ref-counting to fix, from Steffen Klassert.

    13) Fix mis-programming of FDR and RMCR registers on R8A7740 sh_eth
    chips, from Nguyen Hong Ky and Simon Horman.

    14) MLX4 forgets to DMA unmap pages on RX, fix from Amir Vadai.

    15) IPV6 GRE tunnel MTU upper limit is miscalculated, from Oussama
    Ghorbel.

    16) Fix typo in fq_change(), we were assigning "initial quantum" to
    "quantum". From Eric Dumazet.

    17) Set a more appropriate sk_pacing_rate for non-TCP sockets, otherwise
    FQ packet scheduler does not pace those flows properly. Also from
    Eric Dumazet.

    18) rtlwifi miscalculates packet pointers, from Mark Cave-Ayland.

    19) l2tp_xmit_skb() can be called from process context, not just softirq
    context, so we must always make sure to BH disable around it. From
    Eric Dumazet.

    20) On qdisc reset, we forget to purge the RB tree of SKBs in netem
    packet scheduler. From Stephen Hemminger.

    21) Fix info leak in farsync WAN driver ioctl() handler, from Dan
    Carpenter and Salva Peiró.

    22) Fix PHY reset and other issues in dm9000 driver, from Nikita
    Kiryanov and Michael Abbott.

    23) When hardware can do SCTP crc32 checksums, we accidently don't
    disable the csum offload when IPSEC transformations have been
    applied. From Fan Du and Vlad Yasevich.

    24) Tail loss probing in TCP leaves the socket in the wrong congestion
    avoidance state. From Yuchung Cheng.

    25) In CPSW driver, enable NAPI before interrupts are turned on, from
    Markus Pargmann.

    26) Integer underflow and dual-assignment in YAM hamradio driver, from
    Dan Carpenter.

    27) If we are going to mangle a packet in tcp_set_skb_tso_segs() we must
    unclone it. This fixes various hard to track down crashes in
    drivers where the SKBs ->gso_segs was changing right from underneath
    the driver during TX queueing. From Eric Dumazet.

    28) Fix the handling of VLAN IDs, and in particular the special IDs 0
    and 4095, in the bridging layer. From Toshiaki Makita.

    29) Another info leak, this time in wanxl WAN driver, from Salva Peiró.

    30) Fix race in socket credential passing, from Daniel Borkmann.

    31) WHen NETLABEL is disabled, we don't validate CIPSO packets properly,
    from Seif Mazareeb.

    32) Fix identification of fragmented frames in ipv4/ipv6 UDP
    Fragmentation Offload output paths, from Jiri Pirko.

    33) Virtual Function fixes in bnx2x driver from Yuval Mintz and Ariel
    Elior.

    34) When we removed the explicit neighbour pointer from ipv6 routes a
    slight regression was introduced for users such as IPVS, xt_TEE, and
    raw sockets. We mix up the users requested destination address with
    the routes assigned nexthop/gateway. From Julian Anastasov and
    Simon Horman.

    35) Fix stack overruns in rt6_probe(), the issue is that can end up
    doing two full packet xmit paths at the same time when emitting
    neighbour discovery messages. From Hannes Frederic Sowa.

    36) davinci_emac driver doesn't handle IFF_ALLMULTI correctly, from
    Mariusz Ceier.

    37) Make sure to set TCP sk_pacing_rate after the first legitimate RTT
    sample, from Neal Cardwell.

    38) Wrong netlink attribute passed to xfrm_replay_verify_len(), from
    Steffen Klassert.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (152 commits)
    ax88179_178a: Add VID:DID for Samsung USB Ethernet Adapter
    ax88179_178a: Correct the RX error definition in RX header
    Revert "bridge: only expire the mdb entry when query is received"
    tcp: initialize passive-side sk_pacing_rate after 3WHS
    davinci_emac.c: Fix IFF_ALLMULTI setup
    mac802154: correct a typo in ieee802154_alloc_device() prototype
    ipv6: probe routes asynchronous in rt6_probe
    netfilter: nf_conntrack: fix rt6i_gateway checks for H.323 helper
    ipv6: fill rt6i_gateway with nexthop address
    ipv6: always prefer rt6i_gateway if present
    bnx2x: Set NETIF_F_HIGHDMA unconditionally
    bnx2x: Don't pretend during register dump
    bnx2x: Lock DMAE when used by statistic flow
    bnx2x: Prevent null pointer dereference on error flow
    bnx2x: Fix config when SR-IOV and iSCSI are enabled
    bnx2x: Fix Coalescing configuration
    bnx2x: Unlock VF-PF channel on MAC/VLAN config error
    bnx2x: Prevent an illegal pointer dereference during panic
    bnx2x: Fix Maximum CoS estimation for VFs
    drivers: net: cpsw: fix kernel warn during iperf test with interrupt pacing
    ...

    Linus Torvalds
     

22 Oct, 2013

7 commits

  • Pull sound fixes from Takashi Iwai:
    "The pending last-minute ASoC fixes, all of which are driver-local
    (tlv320aic3x, rcar, pcm1681, pcm1792a, omap, fsl) and should be pretty
    safe to apply"

    * tag 'sound-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: Add MAINTAINERS entry for dmaengine helpers
    ASoC: pcm1792a: Fix max_register setting
    ASoC: pcm1681: Fix max_register setting
    ASoC: pcm1681: Fix max_register setting
    ASoC: rcar: fixup generation checker
    ASoC: tlv320aic3x: Connect 'Left Line1R Mux' and 'Right Line1L Mux'
    ASoC: fsl: imx-ssi: fix probe on imx31
    ASoC: omap: Fix incorrect ARM dependency
    ASoC: fsl: Fix sound on mx31moboard
    ASoC: fsl_ssi: Fix irq_of_parse_and_map() return value check

    Linus Torvalds
     
  • Pull drm fixes from Dave Airlie:
    "Travelling slowed down getting these out.

    Two vmwgfx fixes, a radeon revert to avoid a regression, i915 fixes,
    and some ioctl sizing issues fixed with 32 on 64"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
    drm/radeon/audio: don't set speaker allocation on DCE4+
    drm/radeon: rework audio option
    drm/radeon/audio: don't set speaker allocation on DCE3.2
    drm/radeon: make missing smc ucode non-fatal (CI)
    drm/radeon: make missing smc ucode non-fatal (r7xx-SI)
    drm/radeon/uvd: revert lower msg&fb buffer requirements on UVD3
    drm/radeon: stop the leaks in cik_ib_test
    drm/radeon/atom: workaround vbios bug in transmitter table on rs780
    drm/i915: Disable GGTT PTEs on GEN6+ suspend
    drm/i915: Make PTE valid encoding optional
    drm: Pad drm_mode_get_connector to 64-bit boundary
    drm: Prevent overwriting from userspace underallocating core ioctl structs
    drm/vmwgfx: Don't kill clients on VT switch
    drm/vmwgfx: Don't put resources with invalid id's on lru list
    drm/i915: disable LVDS clock gating on CPT v2

    Linus Torvalds
     
  • …rm-intel into drm-fixes

    Just an lvds clock gating fix and a pte clearing hack for hsw to avoid
    memory corruption when hibernating - something doesn't seem to switch off
    properly, we're still investigating.

    * tag 'drm-intel-fixes-2013-10-21' of git://people.freedesktop.org/~danvet/drm-intel: (96 commits)
    drm/i915: Disable GGTT PTEs on GEN6+ suspend
    drm/i915: Make PTE valid encoding optional
    drm/i915: disable LVDS clock gating on CPT v2

    Dave Airlie
     
  • This has no other impact than a cosmetic one.

    Signed-off-by: Alexandre Belloni
    Signed-off-by: David S. Miller

    Alexandre Belloni
     
  • Make sure rt6i_gateway contains nexthop information in
    all routes returned from lookup or when routes are directly
    attached to skb for generated ICMP packets.

    The effect of this patch should be a faster version of
    rt6_nexthop() and the consideration of local addresses as
    nexthop.

    Signed-off-by: Julian Anastasov
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Julian Anastasov
     
  • In v3.9 6fd6ce2056de2709 ("ipv6: Do not depend on rt->n in
    ip6_finish_output2()." changed the behaviour of ip6_finish_output2()
    such that the recently introduced rt6_nexthop() is used
    instead of an assigned neighbor.

    As rt6_nexthop() prefers rt6i_gateway only for gatewayed
    routes this causes a problem for users like IPVS, xt_TEE and
    RAW(hdrincl) if they want to use different address for routing
    compared to the destination address.

    Another case is when redirect can create RTF_DYNAMIC
    route without RTF_GATEWAY flag, we ignore the rt6i_gateway
    in rt6_nexthop().

    Fix the above problems by considering the rt6i_gateway if
    present, so that traffic routed to address on local subnet is
    not wrongly diverted to the destination address.

    Thanks to Simon Horman and Phil Oester for spotting the
    problematic commit.

    Thanks to Hannes Frederic Sowa for his review and help in testing.

    Reported-by: Phil Oester
    Reported-by: Mark Brooks
    Signed-off-by: Julian Anastasov
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Julian Anastasov
     
  • The create_flow/destroy_flow uverbs and the associated extensions to
    the user-kernel verbs ABI are under review and are too experimental to
    freeze at this point.

    So userspace is not exposed to experimental features and an uinstable
    ABI, temporarily disable this for v3.12 (with a Kconfig option behind
    staging to reenable it if desired).

    The feature will be enabled after proper cleanup for v3.13.

    Signed-off-by: Yann Droneaud
    Link: http://marc.info/?i=cover.1381351016.git.ydroneaud@opteya.com
    Link: http://marc.info/?i=cover.1381177342.git.ydroneaud@opteya.com

    [ Add a Kconfig option to reenable these verbs. - Roland ]

    Signed-off-by: Roland Dreier

    Yann Droneaud
     

20 Oct, 2013

1 commit

  • When CONFIG_NETLABEL is disabled, the cipso_v4_validate() function could loop
    forever in the main loop if opt[opt_iter +1] == 0, this will causing a kernel
    crash in an SMP system, since the CPU executing this function will
    stall /not respond to IPIs.

    This problem can be reproduced by running the IP Stack Integrity Checker
    (http://isic.sourceforge.net) using the following command on a Linux machine
    connected to DUT:

    "icmpsic -s rand -d -r 123456"
    wait (1-2 min)

    Signed-off-by: Seif Mazareeb
    Acked-by: Paul Moore
    Signed-off-by: David S. Miller

    Seif Mazareeb
     

19 Oct, 2013

1 commit

  • Pull ACPI and power management fixes from Rafael Wysocki:

    - intel_pstate fix for misbehavior after system resume if sysfs
    attributes are set in a specific way before the corresponding suspend
    from Dirk Brandewie.

    - A recent intel_pstate fix has no effect if unsigned long is 32-bit,
    so fix it up to cover that case as well.

    - The s3c64xx cpufreq driver was not updated when the index field of
    struct cpufreq_frequency_table was replaced with driver_data, so
    update it now. From Charles Keepax.

    - The Kconfig help text for ACPI_BUTTON still refers to
    /proc/acpi/event that has been dropped recently, so modify it to
    remove that reference. From Krzysztof Mazur.

    - A Lan Tianyu's change adds a missing mutex unlock to an error code
    path in acpi_resume_power_resources().

    - Some code related to ACPI power resources, whose very purpose is
    questionable to put it lightly, turns out to cause problems to happen
    during testing on real systems, so remove it completely (we may
    revisit that in the future if there's a compelling enough reason).
    From Rafael J Wysocki and Aaron Lu.

    * tag 'pm+acpi-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / PM: Drop two functions that are not used any more
    ATA / ACPI: remove power dependent device handling
    cpufreq: s3c64xx: Rename index to driver_data
    ACPI / power: Drop automaitc resume of power resource dependent devices
    intel_pstate: Fix type mismatch warning
    cpufreq / intel_pstate: Fix max_perf_pct on resume
    ACPI: remove /proc/acpi/event from ACPI_BUTTON help
    ACPI / power: Release resource_lock after acpi_power_get_state() return error

    Linus Torvalds
     

18 Oct, 2013

6 commits

  • Mark Brown
     
  • Pavel Roskin reported that DRM_IOCTL_MODE_GETCONNECTOR was overwritting
    the 4 bytes beyond the end of its structure with a 32-bit userspace
    running on a 64-bit kernel. This is due to the padding gcc inserts as
    the drm_mode_get_connector struct includes a u64 and its size is not a
    natural multiple of u64s.

    64-bit kernel:

    sizeof(drm_mode_get_connector)=80, alignof=8
    sizeof(drm_mode_get_encoder)=20, alignof=4
    sizeof(drm_mode_modeinfo)=68, alignof=4

    32-bit userspace:

    sizeof(drm_mode_get_connector)=76, alignof=4
    sizeof(drm_mode_get_encoder)=20, alignof=4
    sizeof(drm_mode_modeinfo)=68, alignof=4

    Fortuituously we can insert explicit padding to the tail of our
    structures without breaking ABI.

    Reported-by: Pavel Roskin
    Signed-off-by: Chris Wilson
    Cc: Dave Airlie
    Cc: dri-devel@lists.freedesktop.org
    Cc: stable@vger.kernel.org
    Signed-off-by: Dave Airlie

    Chris Wilson
     
  • We cap bitrate at YAM_MAXBITRATE in yam_ioctl(), but it could also be
    negative. I don't know the impact of using a negative bitrate but let's
    prevent it.

    Signed-off-by: Dan Carpenter
    Signed-off-by: David S. Miller

    Dan Carpenter
     
  • dst->xfrm is conditionally defined. Provide accessor funtion that
    is always available.

    Signed-off-by: Vlad Yasevich
    Acked-by: Neil Horman
    Signed-off-by: David S. Miller

    Vlad Yasevich
     
  • Pull USB fixes from Greg KH:
    "Here are some USB fixes and new device ids for 3.12-rc6

    The largest change here is a bunch of new device ids for the option
    USB serial driver for new Huawei devices. Other than that, just some
    small bug fixes for issues that people have reported (run-time and
    build-time), nothing major"

    * tag 'usb-3.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
    usb: usb_phy_gen: refine conditional declaration of usb_nop_xceiv_register
    usb: misc: usb3503: Fix compile error due to incorrect regmap depedency
    usb/chipidea: fix oops on memory allocation failure
    usb-storage: add quirk for mandatory READ_CAPACITY_16
    usb: serial: option: blacklist Olivetti Olicard200
    USB: quirks: add touchscreen that is dazzeled by remote wakeup
    Revert "usb: musb: gadget: fix otg active status flag"
    USB: quirks.c: add one device that cannot deal with suspension
    USB: serial: option: add support for Inovia SEW858 device
    USB: serial: ti_usb_3410_5052: add Abbott strip port ID to combined table as well.
    USB: support new huawei devices in option.c
    usb: musb: start musb on the udc side, too
    xhci: Fix spurious wakeups after S5 on Haswell
    xhci: fix write to USB3_PSSEN and XUSB2PRM pci config registers
    xhci: quirk for extra long delay for S4
    xhci: Don't enable/disable RWE on bus suspend/resume.

    Linus Torvalds
     
  • Commit 3fa4d734 (usb: phy: rename nop_usb_xceiv => usb_phy_gen_xceiv)
    changed the conditional around the declaration of usb_nop_xceiv_register
    from
    #if defined(CONFIG_NOP_USB_XCEIV) ||
    (defined(CONFIG_NOP_USB_XCEIV_MODULE) && defined(MODULE))
    to
    #if IS_ENABLED(CONFIG_NOP_USB_XCEIV)

    While that looks the same, it is semantically different. The first expression
    is true if CONFIG_NOP_USB_XCEIV is built as module and if the including
    code is built as module. The second expression is true if code depending on
    CONFIG_NOP_USB_XCEIV if built as module or into the kernel.

    As a result, the arm:allmodconfig build fails with

    arch/arm/mach-omap2/built-in.o: In function `omap3_evm_init':
    arch/arm/mach-omap2/board-omap3evm.c:703: undefined reference to
    `usb_nop_xceiv_register'

    Fix the problem by reverting to the old conditional.

    Cc: Josh Boyer
    Signed-off-by: Guenter Roeck
    Signed-off-by: Greg Kroah-Hartman

    Guenter Roeck
     

17 Oct, 2013

3 commits

  • Two functions defined in device_pm.c, acpi_dev_pm_add_dependent()
    and acpi_dev_pm_remove_dependent(), have no callers and may be
    dropped, so drop them.

    Moreover, they are the only functions adding entries to and removing
    entries from the power_dependent list in struct acpi_device, so drop
    that list too.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     
  • Commit 3812c8c8f395 ("mm: memcg: do not trap chargers with full
    callstack on OOM") assumed that only a few places that can trigger a
    memcg OOM situation do not return VM_FAULT_OOM, like optional page cache
    readahead. But there are many more and it's impractical to annotate
    them all.

    First of all, we don't want to invoke the OOM killer when the failed
    allocation is gracefully handled, so defer the actual kill to the end of
    the fault handling as well. This simplifies the code quite a bit for
    added bonus.

    Second, since a failed allocation might not be the abrupt end of the
    fault, the memcg OOM handler needs to be re-entrant until the fault
    finishes for subsequent allocation attempts. If an allocation is
    attempted after the task already OOMed, allow it to bypass the limit so
    that it can quickly finish the fault and invoke the OOM killer.

    Reported-by: azurIt
    Signed-off-by: Johannes Weiner
    Cc: Michal Hocko
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Johannes Weiner
     
  • Some USB drive enclosures do not correctly report an
    overflow condition if they hold a drive with a capacity
    over 2TB and are confronted with a READ_CAPACITY_10.
    They answer with their capacity modulo 2TB.
    The generic layer cannot cope with that. It must be told
    to use READ_CAPACITY_16 from the beginning.

    Signed-off-by: Oliver Neukum
    Cc: stable
    Signed-off-by: Greg Kroah-Hartman

    Oliver Neukum
     

16 Oct, 2013

1 commit

  • Pull device tree fixes and reverts from Grant Likely:
    "One bug fix and three reverts. The reverts back out the slightly
    controversial feeding the entire device tree into the random pool and
    the reserved-memory binding which isn't fully baked yet. Expect the
    reserved-memory patches at least to resurface for v3.13.

    The bug fixes removes a scary but harmless warning on SPARC that was
    introduced in the v3.12 merge window. v3.13 will contain a proper fix
    that makes the new code work on SPARC.

    On the plus side, the diffstat looks *awesome*. I love removing lines
    of code"

    * tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux:
    Revert "drivers: of: add initialization code for dma reserved memory"
    Revert "ARM: init: add support for reserved memory defined by device tree"
    Revert "of: Feed entire flattened device tree into the random pool"
    of: fix unnecessary warning on missing /cpus node

    Linus Torvalds
     

15 Oct, 2013

2 commits

  • This reverts commit 9d8eab7af79cb4ce2de5de39f82c455b1f796963. There is
    still no consensus on the bindings for the reserved memory and various
    drawbacks of the proposed solution has been shown, so the best now is to
    revert it completely and start again from scratch later.

    Signed-off-by: Marek Szyprowski
    Signed-off-by: Grant Likely

    Marek Szyprowski
     
  • Pull infiniband updates from Roland Dreier:
    "Last batch of IB changes for 3.12: many mlx5 hardware driver fixes
    plus one trivial semicolon cleanup"

    * tag 'rdma-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
    IB: Remove unnecessary semicolons
    IB/mlx5: Ensure proper synchronization accessing memory
    IB/mlx5: Fix alignment of reg umr gather buffers
    IB/mlx5: Fix eq names to display nicely in /proc/interrupts
    mlx5: Fix error code translation from firmware to driver
    IB/mlx5: Fix opt param mask according to firmware spec
    mlx5: Fix opt param mask for sq err to rts transition
    IB/mlx5: Disable atomic operations
    mlx5: Fix layout of struct mlx5_init_seg
    mlx5: Keep polling to reclaim pages while any returned
    IB/mlx5: Avoid async events on invalid port number
    IB/mlx5: Decrease memory consumption of mr caches
    mlx5: Remove checksum on command interface commands
    IB/mlx5: Fix memory leak in mlx5_ib_create_srq
    IB/mlx5: Flush cache workqueue before destroying it
    IB/mlx5: Fix send work queue size calculation

    Linus Torvalds
     

14 Oct, 2013

2 commits

  • Pull ARM SoC fixes from Olof Johansson:
    "A small batch of fixes this week, mostly OMAP related. Nothing stands
    out as particularly controversial.

    Also a fix for a 3.12-rc1 timer regression for Exynos platforms,
    including the Chromebooks"

    * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
    ARM: exynos: dts: Update 5250 arch timer node with clock frequency
    ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
    ARM: mach-omap2: board-generic: fix undefined symbol
    ARM: dts: Fix pinctrl mask for omap3
    ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
    ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT

    Linus Torvalds
     
  • …kernel/git/tmlind/linux-omap into fixes

    From Tony Lindgren:

    Few fixes for omap3 related hangs and errors that people have
    noticed now that people are actually using the device tree
    based booting for omap3.

    Also one regression fix for timer compile for dra7xx when
    omap5 is not selected, and a LED regression fix for n900.

    * tag 'fixes-against-v3.12-rc3-take2' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
    ARM: OMAP2: RX-51: Add missing max_current to rx51_lp5523_led_config
    ARM: mach-omap2: board-generic: fix undefined symbol
    ARM: dts: Fix pinctrl mask for omap3
    ARM: OMAP3: Fix hardware detection for omap3630 when booted with device tree
    ARM: OMAP2: gpmc-onenand: fix sync mode setup with DT

    Signed-off-by: Olof Johansson <olof@lixom.net>

    Olof Johansson
     

13 Oct, 2013

1 commit


12 Oct, 2013

2 commits

  • Current rcar is using rsnd_is_gen1/gen2() to checking its
    IP generation, but it needs data mask.
    This patch fixes it up.

    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Mark Brown

    Kuninori Morimoto
     
  • Pull drm fixes from Dave Airlie:
    "All over the map..

    - nouveau:
    disable MSI, needs more work, will try again next merge window
    - radeon:
    audio + uvd regression fixes, dpm fixes, reset fixes
    - i915:
    the dpms fix might fix your haswell

    And one pain in the ass revert, so we have VGA arbitration that when
    implemented 4-5 years ago really hoped that GPUs could remove
    themselves from arbitration completely once they had a kernel driver.

    It seems Intel hw designers decided that was too nice a facility to
    allow us to have so they removed it when they went on-die (so since
    Ironlake at least). Now Alex Williamson added support for VGA
    arbitration for newer GPUs however this now exposes itself to
    userspace as requireing arbitration of GPU VGA regions and the X
    server gets involved and disables things that it can't handle when VGA
    access is possibly required around every operation.

    So in order to not break userspace we just reverted things back to the
    old known broken status so maybe we can try and design out way out.

    Ville also had a patch to use stop machine for the two times Intel
    needs to access VGA space, that might be acceptable with some rework,
    but for now myself and Daniel agreed to just go back"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (23 commits)
    Revert "i915: Update VGA arbiter support for newer devices"
    Revert "drm/i915: Delay disabling of VGA memory until vgacon->fbcon handoff is done"
    drm/radeon: re-enable sw ACR support on pre-DCE4
    drm/radeon/dpm: disable bapm on TN asics
    drm/radeon: improve soft reset on CIK
    drm/radeon: improve soft reset on SI
    drm/radeon/dpm: off by one in si_set_mc_special_registers()
    drm/radeon/dpm/btc: off by one in btc_set_mc_special_registers()
    drm/radeon: forever loop on error in radeon_do_test_moves()
    drm/radeon: fix hw contexts for SUMO2 asics
    drm/radeon: fix typo in CP DMA register headers
    drm/radeon/dpm: disable multiple UVD states
    drm/radeon: use hw generated CTS/N values for audio
    drm/radeon: fix N/CTS clock matching for audio
    drm/radeon: use 64-bit math to calculate CTS values for audio (v2)
    drm/edid: catch kmalloc failure in drm_edid_to_speaker_allocation
    Revert "drm/fb-helper: don't sleep for screen unblank when an oops is in progress"
    drm/gma500: fix things after get/put page helpers
    drm/nouveau/mc: disable msi support by default, it's busted in tons of places
    drm/i915: Only apply DPMS to the encoder if enabled
    ...

    Linus Torvalds
     

11 Oct, 2013

5 commits

  • Fengguang Wu, Oleg Nesterov and Peter Zijlstra tracked down
    a kernel crash to a GCC bug: GCC miscompiles certain 'asm goto'
    constructs, as outlined here:

    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670

    Implement a workaround suggested by Jakub Jelinek.

    Reported-and-tested-by: Fengguang Wu
    Reported-by: Oleg Nesterov
    Reported-by: Peter Zijlstra
    Suggested-by: Jakub Jelinek
    Reviewed-by: Richard Henderson
    Cc: Linus Torvalds
    Cc: Andrew Morton
    Cc:
    Signed-off-by: Ingo Molnar

    Ingo Molnar
     
  • This reverts commit 81b5c7bc8de3e6f63419139c2fc91bf81dea8a7d.

    Adding drm/i915 into the vga arbiter chain means that X (in a piece of
    well-meant paranoia) will do a get/put on the vga decoding around
    _every_ accel call down into the ddx. Which results in some nice
    performance disasters [1]. This really breaks userspace, by disabling
    DRI for everyone, and stops OpenGL from working, this isn't limited
    to just the i915 but both the integrated and discrete GPUs on
    multi-gpu systems, in other words this causes untold worlds of pain,

    Ville tried to come up with a Great Hack to fiddle the required VGA
    I/O ops behind everyone's back using stop_machine, but that didn't
    really work out [2]. Given that we're fairly late in the -rc stage for
    such games let's just revert this all.

    One thing we might want to keep is to delay the disabling of the vga
    decoding until the fbdev emulation and the fbcon screen is set up. If
    we kill vga mem decoding beforehand fbcon can end up with a white
    square in the top-left corner it tried to save from the vga memory for
    a seamless transition. And we have bug reports on older platforms
    which seem to match these symptoms.

    But again that's something to play around with in -next.

    References: [1] http://lists.x.org/archives/xorg-devel/2013-September/037763.html
    References: [2] http://www.spinics.net/lists/intel-gfx/msg34062.html
    Cc: Alex Williamson
    Cc: Ville Syrjälä
    Cc: Chris Wilson
    Signed-off-by: Daniel Vetter
    Signed-off-by: Dave Airlie

    Dave Airlie
     
  • Pull /dev/random changes from Ted Ts'o:
    "These patches are designed to enable improvements to /dev/random for
    non-x86 platforms, in particular MIPS and ARM"

    * tag 'random_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/random:
    random: allow architectures to optionally define random_get_entropy()
    random: run random_int_secret_init() run after all late_initcalls

    Linus Torvalds
     
  • Allow architectures which have a disabled get_cycles() function to
    provide a random_get_entropy() function which provides a fine-grained,
    rapidly changing counter that can be used by the /dev/random driver.

    For example, an architecture might have a rapidly changing register
    used to control random TLB cache eviction, or DRAM refresh that
    doesn't meet the requirements of get_cycles(), but which is good
    enough for the needs of the random driver.

    Signed-off-by: "Theodore Ts'o"
    Cc: stable@vger.kernel.org

    Theodore Ts'o
     
  • It's helpful for a driver to put the pci slot name in its interrupt
    names, so /proc/interrupts will show the pci slot of the device.

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

    Sagi Grimberg