12 Oct, 2013

3 commits

  • For some devices it is possible to configure a hysteresis for threshold (or
    similar) events. This patch adds a new hysteresis event info type which allows
    for easy creation and read/write handling of the sysfs attribute.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • The event configuration interface of the IIO framework has not been getting the
    same attention as other parts. As a result it has not seen the same improvements
    as e.g. the channel interface has seen with the introduction of the channel spec
    struct. Currently all the event config callbacks take a u64 (the so called event
    code) to pass all the different information about for which event the callback
    is invoked. The callback function then has to extract the information it is
    interested in using some macros with rather long names. Most information encoded
    in the event code comes straight from the iio_chan_spec struct the event was
    registered for. Since we always have a handle to the channel spec when we call
    the event callbacks the first step is to add the channel spec as a parameter to
    the event callbacks. The two remaining things encoded in the event code are the
    type and direction of the event. Instead of passing them in one parameter, add
    one parameter for each of them and remove the eventcode from the event
    callbacks. The patch also adds a new iio_event_info parameter to the
    {read,write}_event_value callbacks. This makes it possible, similar to the
    iio_chan_info_enum for channels, to specify additional properties other than
    just the value for an event. Furthermore the new interface will allow to
    register shared events. This is e.g. useful if a device allows configuring a
    threshold event, but the threshold setting is the same for all channels.

    To implement this the patch adds a new iio_event_spec struct which is similar to
    the iio_chan_spec struct. It as two field to specify the type and the direction
    of the event. Furthermore it has a mask field for each one of the different
    iio_shared_by types. These mask fields holds which kind of attributes should be
    registered for the event. Creation of the attributes follows the same rules as
    the for the channel attributes. E.g. for the separate_mask there will be a
    attribute for each channel with this event, for the shared_by_type there will
    only be one attribute per channel type. The iio_chan_spec struct gets two new
    fields, 'event_spec' and 'num_event_specs', which is used to specify which the
    events for this channel. These two fields are going to replace the channel's
    event_mask field.

    For now both the old and the new event config interface coexist, but over the
    few patches all drivers will be converted from the old to the new interface.
    Once that is done all code for supporting the old interface will be removed.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     
  • Since the buffer is accessed by userspace we can not just free the buffers
    memory once we are done with it in kernel space. There might still be open file
    descriptors and userspace still might be accessing the buffer. This patch adds
    support for reference counting to the IIO buffers. When a buffer is created and
    initialized its initial reference count is set to 1. Instead of freeing the
    memory of the buffer the buffer's _free() function will drop that reference
    again. But only after the last reference to the buffer has been dropped the
    buffer the buffer's memory will be freed. The IIO device will take a reference
    to its primary buffer. The patch adds a small helper function for this called
    iio_device_attach_buffer() which will get a reference to the buffer and assign
    the buffer to the IIO device. This function must be used instead of assigning
    the buffer to the device by hand. The reference is only dropped once the IIO
    device is freed and we can be sure that there are no more open file handles. A
    reference to a buffer will also be taken whenever the buffer is active to avoid
    the buffer being freed while data is still being send to it.

    Signed-off-by: Lars-Peter Clausen
    Signed-off-by: Jonathan Cameron

    Lars-Peter Clausen
     

07 Oct, 2013

1 commit


05 Oct, 2013

1 commit

  • Pull iommu fixes from Joerg Roedel:
    "A couple of fixes from the IOMMU side:

    - some small fixes for the new ARM-SMMU driver
    - a register offset correction for VT-d
    - add MAINTAINERS entry for drivers/iommu

    Overall no really big or intrusive changes"

    * tag 'iommu-fixes-v3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
    x86/iommu: correct ICS register offset
    MAINTAINERS: add overall IOMMU section
    iommu/arm-smmu: don't enable SMMU device until probing has completed
    iommu/arm-smmu: fix iommu_present() test in init
    iommu/arm-smmu: fix a signedness bug

    Linus Torvalds
     

03 Oct, 2013

1 commit

  • The include/asm-generic/hugetlb.h stubs that just vector huge_pte_*()
    calls to the pte_*() implementations won't work in certain situations.

    x86 and sparc, for example, return "unsigned long" from the bit
    checks, and just go "return pte_val(pte) & PTE_BIT_FOO;"

    But since huge_pte_*() returns 'int', if any high bits on 64-bit are
    relevant, they get chopped off.

    The net effect is that we can loop forever trying to COW a huge page,
    because the huge_pte_write() check signals false all the time.

    Reported-by: Gurudas Pai
    Tested-by: Gurudas Pai
    Signed-off-by: David S. Miller
    Acked-by: David Rientjes

    David Miller
     

02 Oct, 2013

2 commits

  • Pull networking changes from David Miller:

    1) Multiply in netfilter IPVS can overflow when calculating destination
    weight. From Simon Kirby.

    2) Use after free fixes in IPVS from Julian Anastasov.

    3) SFC driver bug fixes from Daniel Pieczko.

    4) Memory leak in pcan_usb_core failure paths, from Alexey Khoroshilov.

    5) Locking and encapsulation fixes to serial line CAN driver, from
    Andrew Naujoks.

    6) Duplex and VF handling fixes to bnx2x driver from Yaniv Rosner,
    Eilon Greenstein, and Ariel Elior.

    7) In lapb, if no other packets are outstanding, T1 timeouts actually
    stall things and no packet gets sent. Fix from Josselin Costanzi.

    8) ICMP redirects should not make it to the socket error queues, from
    Duan Jiong.

    9) Fix bugs in skge DMA mapping error handling, from Nikulas Patocka.

    10) Fix setting of VLAN priority field on via-rhine driver, from Roget
    Luethi.

    11) Fix TX stalls and VLAN promisc programming in be2net driver from
    Ajit Khaparde.

    12) Packet padding doesn't get handled correctly in new usbnet SG
    support code, from Ming Lei.

    13) Fix races in netdevice teardown wrt. network namespace closing.
    From Eric W. Biederman.

    14) Fix potential missed initialization of net_secret if not TCP
    connections are openned. From Eric Dumazet.

    15) Cinterion PLXX product ID in qmi_wwan driver is wrong, from
    Aleksander Morgado.

    16) skb_cow_head() can change skb->data and thus packet header pointers,
    don't use stale ip_hdr reference in ip_tunnel code.

    17) Backend state transition handling fixes in xen-netback, from Paul
    Durrant.

    18) Packet offset for AH protocol is handled wrong in flow dissector,
    from Eric Dumazet.

    19) Taking down an fq packet scheduler instance can leave stale packets
    in the queues, fix from Eric Dumazet.

    20) Fix performance regressions introduced by TCP Small Queues. From
    Eric Dumazet.

    21) IPV6 GRE tunneling code calculates max_headroom incorrectly, from
    Hannes Frederic Sowa.

    22) Multicast timer handlers in ipv4 and ipv6 can be the last and final
    reference to the ipv4/ipv6 specific network device state, so use the
    reference put that will check and release the object if the
    reference hits zero. From Salam Noureddine.

    23) Fix memory corruption in ip_tunnel driver, and use skb_push()
    instead of __skb_push() so that similar bugs are less hard to find.
    From Steffen Klassert.

    24) Add forgotten hookup of rtnl_ops in SIT and ip6tnl drivers, from
    Nicolas Dichtel.

    25) fq scheduler doesn't accurately rate limit in certain circumstances,
    from Eric Dumazet.

    * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (103 commits)
    pkt_sched: fq: rate limiting improvements
    ip6tnl: allow to use rtnl ops on fb tunnel
    sit: allow to use rtnl ops on fb tunnel
    ip_tunnel: Remove double unregister of the fallback device
    ip_tunnel_core: Change __skb_push back to skb_push
    ip_tunnel: Add fallback tunnels to the hash lists
    ip_tunnel: Fix a memory corruption in ip_tunnel_xmit
    qlcnic: Fix SR-IOV configuration
    ll_temac: Reset dma descriptors indexes on ndo_open
    skbuff: size of hole is wrong in a comment
    ipv6 mcast: use in6_dev_put in timer handlers instead of __in6_dev_put
    ipv4 igmp: use in_dev_put in timer handlers instead of __in_dev_put
    ethernet: moxa: fix incorrect placement of __initdata tag
    ipv6: gre: correct calculation of max_headroom
    powerpc/83xx: gianfar_ptp: select 1588 clock source through dts file
    Revert "powerpc/83xx: gianfar_ptp: select 1588 clock source through dts file"
    bonding: Fix broken promiscuity reference counting issue
    tcp: TSQ can use a dynamic limit
    dm9601: fix IFF_ALLMULTI handling
    pkt_sched: fq: qdisc dismantle fixes
    ...

    Linus Torvalds
     
  • Pablo Neira Ayuso says:

    ====================
    The following patchset contains Netfilter/IPVS fixes for your net
    tree, they are:

    * Fix BUG_ON splat due to malformed TCP packets seen by synproxy, from
    Patrick McHardy.

    * Fix possible weight overflow in lblc and lblcr schedulers due to
    32-bits arithmetics, from Simon Kirby.

    * Fix possible memory access race in the lblc and lblcr schedulers,
    introduced when it was converted to use RCU, two patches from
    Julian Anastasov.

    * Fix hard dependency on CPU 0 when reading per-cpu stats in the
    rate estimator, from Julian Anastasov.

    * Fix race that may lead to object use after release, when invoking
    ipvsadm -C && ipvsadm -R, introduced when adding RCU, from Julian
    Anastasov.
    ====================

    Signed-off-by: David S. Miller

    David S. Miller
     

01 Oct, 2013

7 commits

  • Don't call hid_open_device till there is actually an user. This saves
    power by not opening underlying transport for HID. Also close device
    if there are no active mfd client using HID sensor hub.

    Signed-off-by: Srinivas Pandruvada
    Signed-off-by: Jiri Kosina
    Signed-off-by: Jonathan Cameron

    Srinivas Pandruvada
     
  • Since commit c93bdd0e03e8 ("netvm: allow skb allocation to use PFMEMALLOC
    reserves"), hole size is one bit less than what is written in the comment.

    Signed-off-by: Nicolas Dichtel
    Signed-off-by: David S. Miller

    Nicolas Dichtel
     
  • Pull NFS client bugfixes from Trond Myklebust:
    - Stable fix for Oopses in the pNFS files layout driver
    - Fix a regression when doing a non-exclusive file create on NFSv4.x
    - NFSv4.1 security negotiation fixes when looking up the root
    filesystem
    - Fix a memory ordering issue in the pNFS files layout driver

    * tag 'nfs-for-3.12-4' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
    NFS: Give "flavor" an initial value to fix a compile warning
    NFSv4.1: try SECINFO_NO_NAME flavs until one works
    NFSv4.1: Ensure memory ordering between nfs4_ds_connect and nfs4_fl_prepare_ds
    NFSv4.1: nfs4_fl_prepare_ds - fix bugs when the connect attempt fails
    NFSv4: Honour the 'opened' parameter in the atomic_open() filesystem method

    Linus Torvalds
     
  • Merge misc fixes from Andrew Morton.

    * emailed patches from Andrew Morton : (22 commits)
    pidns: fix free_pid() to handle the first fork failure
    ipc,msg: prevent race with rmid in msgsnd,msgrcv
    ipc/sem.c: update sem_otime for all operations
    mm/hwpoison: fix the lack of one reference count against poisoned page
    mm/hwpoison: fix false report on 2nd attempt at page recovery
    mm/hwpoison: fix test for a transparent huge page
    mm/hwpoison: fix traversal of hugetlbfs pages to avoid printk flood
    block: change config option name for cmdline partition parsing
    mm/mlock.c: prevent walking off the end of a pagetable in no-pmd configuration
    mm: avoid reinserting isolated balloon pages into LRU lists
    arch/parisc/mm/fault.c: fix uninitialized variable usage
    include/asm-generic/vtime.h: avoid zero-length file
    nilfs2: fix issue with race condition of competition between segments for dirty blocks
    Documentation/kernel-parameters.txt: replace kernelcore with Movable
    mm/bounce.c: fix a regression where MS_SNAP_STABLE (stable pages snapshotting) was ignored
    kernel/kmod.c: check for NULL in call_usermodehelper_exec()
    ipc/sem.c: synchronize the proc interface
    ipc/sem.c: optimize sem_lock()
    ipc/sem.c: fix race in sem_lock()
    mm/compaction.c: periodically schedule when freeing pages
    ...

    Linus Torvalds
     
  • Isolated balloon pages can wrongly end up in LRU lists when
    migrate_pages() finishes its round without draining all the isolated
    page list.

    The same issue can happen when reclaim_clean_pages_from_list() tries to
    reclaim pages from an isolated page list, before migration, in the CMA
    path. Such balloon page leak opens a race window against LRU lists
    shrinkers that leads us to the following kernel panic:

    BUG: unable to handle kernel NULL pointer dereference at 0000000000000028
    IP: [] shrink_page_list+0x24e/0x897
    PGD 3cda2067 PUD 3d713067 PMD 0
    Oops: 0000 [#1] SMP
    CPU: 0 PID: 340 Comm: kswapd0 Not tainted 3.12.0-rc1-22626-g4367597 #87
    Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
    RIP: shrink_page_list+0x24e/0x897
    RSP: 0000:ffff88003da499b8 EFLAGS: 00010286
    RAX: 0000000000000000 RBX: ffff88003e82bd60 RCX: 00000000000657d5
    RDX: 0000000000000000 RSI: 000000000000031f RDI: ffff88003e82bd40
    RBP: ffff88003da49ab0 R08: 0000000000000001 R09: 0000000081121a45
    R10: ffffffff81121a45 R11: ffff88003c4a9a28 R12: ffff88003e82bd40
    R13: ffff88003da0e800 R14: 0000000000000001 R15: ffff88003da49d58
    FS: 0000000000000000(0000) GS:ffff88003fc00000(0000) knlGS:0000000000000000
    CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: 00000000067d9000 CR3: 000000003ace5000 CR4: 00000000000407b0
    Call Trace:
    shrink_inactive_list+0x240/0x3de
    shrink_lruvec+0x3e0/0x566
    __shrink_zone+0x94/0x178
    shrink_zone+0x3a/0x82
    balance_pgdat+0x32a/0x4c2
    kswapd+0x2f0/0x372
    kthread+0xa2/0xaa
    ret_from_fork+0x7c/0xb0
    Code: 80 7d 8f 01 48 83 95 68 ff ff ff 00 4c 89 e7 e8 5a 7b 00 00 48 85 c0 49 89 c5 75 08 80 7d 8f 00 74 3e eb 31 48 8b 80 18 01 00 00 8b 74 0d 48 8b 78 30 be 02 00 00 00 ff d2 eb
    RIP [] shrink_page_list+0x24e/0x897
    RSP
    CR2: 0000000000000028
    ---[ end trace 703d2451af6ffbfd ]---
    Kernel panic - not syncing: Fatal exception

    This patch fixes the issue, by assuring the proper tests are made at
    putback_movable_pages() & reclaim_clean_pages_from_list() to avoid
    isolated balloon pages being wrongly reinserted in LRU lists.

    [akpm@linux-foundation.org: clarify awkward comment text]
    Signed-off-by: Rafael Aquini
    Reported-by: Luiz Capitulino
    Tested-by: Luiz Capitulino
    Cc: Mel Gorman
    Cc: Rik van Riel
    Cc: Hugh Dickins
    Cc: Johannes Weiner
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Rafael Aquini
     
  • patch(1) can't handle zero-length files - it appears to simply not create
    the file, so my powerpc build fails.

    Put something in here to make life easier.

    Cc: Hugh Dickins
    Cc: Frederic Weisbecker
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     
  • Use of RCU api makes vxlan code easier to understand. It also
    fixes bug due to missing ACCESS_ONCE() on sk_user_data dereference.
    In rare case without ACCESS_ONCE() compiler might omit vs on
    sk_user_data dereference.
    Compiler can use vs as alias for sk->sk_user_data, resulting in
    multiple sk_user_data dereference in rcu read context which
    could change.

    CC: Jesse Gross
    Signed-off-by: Pravin B Shelar
    Signed-off-by: David S. Miller

    Pravin B Shelar
     

30 Sep, 2013

6 commits

  • Mark Brown
     
  • TCP packets hitting the SYN proxy through the SYNPROXY target are not
    validated by TCP conntrack. When th->doff is below 5, an underflow happens
    when calculating the options length, causing skb_header_pointer() to
    return NULL and triggering the BUG_ON().

    Handle this case gracefully by checking for NULL instead of using BUG_ON().

    Reported-by: Martin Topholm
    Tested-by: Martin Topholm
    Signed-off-by: Patrick McHardy
    Signed-off-by: Pablo Neira Ayuso

    Patrick McHardy
     
  • We want the staging fixes in here as well.

    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Pull char/misc driver fixes from Greg KH:
    "Here are some HyperV and MEI driver fixes for 3.12-rc3. They resolve
    some issues that people have been reporting for them"

    * tag 'char-misc-3.12-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
    Drivers: hv: vmbus: Terminate vmbus version negotiation on timeout
    Drivers: hv: util: Correctly support ws2008R2 and earlier
    mei: cancel stall timers in mei_reset
    mei: bus: stop wait for read during cl state transition
    mei: make me client counters less error prone

    Linus Torvalds
     
  • …/iio into staging-next

    Jonathan writes:

    Second set of new functionality for IIO in the 3.13 cycle - with bug fixes for first set.

    This is a small, mainly to get a couple of compile bug related fixes into
    the tree ASAP.

    New device support:
    1) Add ad5446 dac support to the ad5641 driver.

    New functionality and cleanups:
    1) Optional power supply regulators for the st pressure sensors drivers using
    the new optional regulator interface.
    2) Bit of tidying up of naming in the sysfs trigger.

    Bug fixes from the previous series:
    1) Missing select IIO_BUFFER for ti_am335x_adc
    2) Drop a bonus bracket in iio-trig-bfin-timmer

    Greg Kroah-Hartman
     
  • Pull drm fixes from Dave Airlie:
    "Nothing too major, radeon still has some dpm changes for off by
    default.

    Radeon, intel, msm:
    - radeon: a few more dpm fixes (still off by default), uvd fixes
    - i915: runtime warn backtrace and regression fix
    - msm: iommu changes fallout"

    * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (27 commits)
    drm/msm: use drm_gem_dumb_destroy helper
    drm/msm: deal with mach/iommu.h removal
    drm/msm: Remove iommu include from mdp4_kms.c
    drm/msm: Odd PTR_ERR usage
    drm/i915: Fix up usage of SHRINK_STOP
    drm/radeon: fix hdmi audio on DCE3.0/3.1 asics
    drm/i915: preserve pipe A quirk in i9xx_set_pipeconf
    drm/i915/tv: clear adjusted_mode.flags
    drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
    drm/radeon/cik: fix overflow in vram fetch
    drm/radeon: add missing hdmi callbacks for rv6xx
    drm/i915: Use a temporary va_list for two-pass string handling
    drm/radeon/uvd: lower msg&fb buffer requirements on UVD3
    drm/radeon: disable tests/benchmarks if accel is disabled
    drm/radeon: don't set default clocks for SI when DPM is disabled
    drm/radeon/dpm/ci: filter clocks based on voltage/clk dep tables
    drm/radeon/dpm/si: filter clocks based on voltage/clk dep tables
    drm/radeon/dpm/ni: filter clocks based on voltage/clk dep tables
    drm/radeon/dpm/btc: filter clocks based on voltage/clk dep tables
    drm/radeon/dpm: fetch the max clk from voltage dep tables helper
    ...

    Linus Torvalds
     

29 Sep, 2013

6 commits

  • A host might need net_secret[] and never open a single socket.

    Problem added in commit aebda156a570782
    ("net: defer net_secret[] initialization")

    Based on prior patch from Hannes Frederic Sowa.

    Reported-by: Hannes Frederic Sowa
    Signed-off-by: Eric Dumazet
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Eric Dumazet
     
  • There is currently serialization network namespaces exiting and
    network devices exiting as the final part of netdev_run_todo does not
    happen under the rtnl_lock. This is compounded by the fact that the
    only list of devices unregistering in netdev_run_todo is local to the
    netdev_run_todo.

    This lack of serialization in extreme cases results in network devices
    unregistering in netdev_run_todo after the loopback device of their
    network namespace has been freed (making dst_ifdown unsafe), and after
    the their network namespace has exited (making the NETDEV_UNREGISTER,
    and NETDEV_UNREGISTER_FINAL callbacks unsafe).

    Add the missing serialization by a per network namespace count of how
    many network devices are unregistering and having a wait queue that is
    woken up whenever the count is decreased. The count and wait queue
    allow default_device_exit_batch to wait until all of the unregistration
    activity for a network namespace has finished before proceeding to
    unregister the loopback device and then allowing the network namespace
    to exit.

    Only a single global wait queue is used because there is a single global
    lock, and there is a single waiter, per network namespace wait queues
    would be a waste of resources.

    The per network namespace count of unregistering devices gives a
    progress guarantee because the number of network devices unregistering
    in an exiting network namespace must ultimately drop to zero (assuming
    network device unregistration completes).

    The basic logic remains the same as in v1. This patch is now half
    comment and half rtnl_lock_unregistering an expanded version of
    wait_event performs no extra work in the common case where no network
    devices are unregistering when we get to default_device_exit_batch.

    Reported-by: Francesco Ruggeri
    Signed-off-by: "Eric W. Biederman"
    Signed-off-by: David S. Miller

    Eric W. Biederman
     
  • When a router is doing DNAT for 6to4/6rd packets the latest
    anti-spoofing commit 218774dc ("ipv6: add anti-spoofing checks for
    6to4 and 6rd") will drop them because the IPv6 address embedded does
    not match the IPv4 destination. This patch will allow them to pass by
    testing if we have an address that matches on 6to4/6rd interface. I
    have been hit by this problem using Fedora and IPV6TO4_IPV4ADDR.
    Also, log the dropped packets (with rate limit).

    Signed-off-by: Catalin(ux) M. BOIE
    Acked-by: Hannes Frederic Sowa
    Signed-off-by: David S. Miller

    Catalin\(ux\) M. BOIE
     
  • Commit 638c5115a7949(USBNET: support DMA SG) introduces DMA SG
    if the usb host controller is capable of building packet from
    discontinuous buffers, but missed handling padding packet when
    building DMA SG.

    This patch attachs the pre-allocated padding packet at the
    end of the sg list, so padding packet can be sent to device
    if drivers require that.

    Reported-by: David Laight
    Acked-by: Oliver Neukum
    Signed-off-by: Ming Lei
    Signed-off-by: David S. Miller

    Ming Lei
     
  • Pull s390 lockref enablement from Heiko Carstens:
    "Enabling the new lockless lockref variant on s390 would have been
    trivial until Tony Luck added a cpu_relax() call into the
    CMPXCHG_LOOP(), with commit d472d9d98b46 ("lockref: Relax in cmpxchg
    loop")

    As already mentioned cpu_relax() is very expensive on s390 since it
    yields() the current virtual cpu. So we are talking of several
    thousand cycles. Considering this enabling the lockless lockref
    variant would contradict the intention of the new semantics. And also
    some quick measurements show performance regressions of 50% and more.

    Simply removing the cpu_relax() call again seems also not very
    desireable since Waiman Long reported that for some workloads the call
    improved performance by 5%."

    * 'lockref' of git://git.kernel.org/pub/scm/linux/kernel/git/s390/linux:
    s390: enable ARCH_USE_CMPXCHG_LOCKREF
    lockref: use arch_mutex_cpu_relax() in CMPXCHG_LOOP()
    mutex: replace CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX with simple ifdef

    Linus Torvalds
     
  • Pull DeviceTree fixes from Rob Herring:
    "Clean-up to fix some warnings for !OF builds and spelling fixes in
    docs:

    - Clean-up openrisc prom.h
    - Fix warnings caused by of_irq.h ifdefs
    - Spelling fix for Synopsys"

    * tag 'devicetree-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
    dts: Fix misspelling of Synopsys
    of: clean-up ifdefs in of_irq.h
    openrisc: clean-up prom.h

    Linus Torvalds
     

28 Sep, 2013

3 commits

  • Linus suggested to replace

    #ifndef CONFIG_HAVE_ARCH_MUTEX_CPU_RELAX
    #define arch_mutex_cpu_relax() cpu_relax()
    #endif

    with just a simple

    #ifndef arch_mutex_cpu_relax
    # define arch_mutex_cpu_relax() cpu_relax()
    #endif

    to get rid of CONFIG_HAVE_CPU_RELAX_SIMPLE. So architectures can
    simply define arch_mutex_cpu_relax if they want an architecture
    specific function instead of having to add a select statement in
    their Kconfig in addition.

    Suggested-by: Linus Torvalds
    Signed-off-by: Heiko Carstens

    Heiko Carstens
     
  • More radeon fixes for 3.12. Kind of all over the place: UVD, DPM,
    tiling, etc.

    * 'drm-fixes-3.12' of git://people.freedesktop.org/~agd5f/linux:
    drm/radeon: fix hdmi audio on DCE3.0/3.1 asics
    drm/radeon/cik: fix overflow in vram fetch
    drm/radeon: add missing hdmi callbacks for rv6xx
    drm/radeon/uvd: lower msg&fb buffer requirements on UVD3
    drm/radeon: disable tests/benchmarks if accel is disabled
    drm/radeon: don't set default clocks for SI when DPM is disabled
    drm/radeon/dpm/ci: filter clocks based on voltage/clk dep tables
    drm/radeon/dpm/si: filter clocks based on voltage/clk dep tables
    drm/radeon/dpm/ni: filter clocks based on voltage/clk dep tables
    drm/radeon/dpm/btc: filter clocks based on voltage/clk dep tables
    drm/radeon/dpm: fetch the max clk from voltage dep tables helper
    drm/radeon: fix missed variable sized access
    drm/radeon: Make r100_cp_ring_info() and radeon_ring_gfx() safe (v2)
    drm/radeon/cik: Add tiling mode index for 1D tiled depth/stencil surfaces
    drm/radeon/cik: Fix encoding of number of banks in tiling configuration info
    drm/radeon/cik: Fix printing of client name on VM protection fault
    drm/radeon: additional gcc fixes for radeon_atombios.c
    drm/radeon: avoid UVD corruption on AGP cards using GPU gart

    Dave Airlie
     
  • …wireless into for-davem

    Also fixed-up a badly indented closing brace...

    Signed-off-by: John W. Linville <linville@tuxdriver.com>

    John W. Linville
     

27 Sep, 2013

3 commits

  • The current code does not correctly negotiate the version numbers for the util
    driver when hosted on earlier hosts. The version numbers presented by this
    driver were not compatible with the version numbers supported by Windows Server
    2008. Fix this problem.

    I would like to thank Olaf Hering (ohering@suse.com) for identifying the problem.

    Reported-by: Olaf Hering
    Signed-off-by: K. Y. Srinivasan
    Signed-off-by: Greg Kroah-Hartman

    K. Y. Srinivasan
     
  • This patch removes the bcma_core_pci_power_save() call from
    the bcma_core_pci_{up,down}() functions as it tries to schedule
    thus requiring to call them from non-atomic context. The function
    bcma_core_pci_power_save() is now exported so the calling module
    can explicitly use it in non-atomic context. This fixes the
    'scheduling while atomic' issue reported by Tod Jackson and
    Joe Perches.

    [ 13.210710] BUG: scheduling while atomic: dhcpcd/1800/0x00000202
    [ 13.210718] Modules linked in: brcmsmac nouveau coretemp kvm_intel kvm cordic brcmutil bcma dell_wmi atl1c ttm mxm_wmi wmi
    [ 13.210756] CPU: 2 PID: 1800 Comm: dhcpcd Not tainted 3.11.0-wl #1
    [ 13.210762] Hardware name: Alienware M11x R2/M11x R2, BIOS A04 11/23/2010
    [ 13.210767] ffff880177c92c40 ffff880170fd1948 ffffffff8169af5b 0000000000000007
    [ 13.210777] ffff880170fd1ab0 ffff880170fd1958 ffffffff81697ee2 ffff880170fd19d8
    [ 13.210785] ffffffff816a19f5 00000000000f4240 000000000000d080 ffff880170fd1fd8
    [ 13.210794] Call Trace:
    [ 13.210813] [] dump_stack+0x4f/0x84
    [ 13.210826] [] __schedule_bug+0x43/0x51
    [ 13.210837] [] __schedule+0x6e5/0x810
    [ 13.210845] [] schedule+0x24/0x70
    [ 13.210855] [] schedule_hrtimeout_range_clock+0x10c/0x150
    [ 13.210867] [] ? update_rmtp+0x60/0x60
    [ 13.210877] [] ? hrtimer_start_range_ns+0xf/0x20
    [ 13.210887] [] schedule_hrtimeout_range+0xe/0x10
    [ 13.210897] [] usleep_range+0x3b/0x40
    [ 13.210910] [] bcma_pcie_mdio_set_phy.isra.3+0x4f/0x80 [bcma]
    [ 13.210921] [] bcma_pcie_mdio_write.isra.4+0xbf/0xd0 [bcma]
    [ 13.210932] [] bcma_pcie_mdio_writeread.isra.6.constprop.13+0x18/0x30 [bcma]
    [ 13.210942] [] bcma_core_pci_power_save+0x3e/0x80 [bcma]
    [ 13.210953] [] bcma_core_pci_up+0x2d/0x60 [bcma]
    [ 13.210975] [] brcms_c_up+0xfc/0x430 [brcmsmac]
    [ 13.210989] [] brcms_up+0x1d/0x20 [brcmsmac]
    [ 13.211003] [] brcms_ops_start+0x298/0x340 [brcmsmac]
    [ 13.211020] [] ? cfg80211_netdev_notifier_call+0xd2/0x5f0
    [ 13.211030] [] ? packet_notifier+0xad/0x1d0
    [ 13.211064] [] ieee80211_do_open+0x325/0xf80
    [ 13.211076] [] ? __raw_notifier_call_chain+0x9/0x10
    [ 13.211086] [] ieee80211_open+0x71/0x80
    [ 13.211101] [] __dev_open+0x87/0xe0
    [ 13.211109] [] __dev_change_flags+0x9c/0x180
    [ 13.211117] [] dev_change_flags+0x23/0x70
    [ 13.211127] [] devinet_ioctl+0x5b8/0x6a0
    [ 13.211136] [] inet_ioctl+0x75/0x90
    [ 13.211147] [] sock_do_ioctl+0x2b/0x70
    [ 13.211155] [] sock_ioctl+0x71/0x2a0
    [ 13.211169] [] do_vfs_ioctl+0x87/0x520
    [ 13.211180] [] ? ____fput+0x9/0x10
    [ 13.211198] [] ? task_work_run+0x9c/0xd0
    [ 13.211202] [] SyS_ioctl+0x91/0xb0
    [ 13.211208] [] system_call_fastpath+0x16/0x1b
    [ 13.211217] NOHZ: local_softirq_pending 202

    The issue was introduced in v3.11 kernel by following commit:

    commit aa51e598d04c6acf5477934cd6383f5a17ce9029
    Author: Hauke Mehrtens
    Date: Sat Aug 24 00:32:31 2013 +0200

    brcmsmac: use bcma PCIe up and down functions

    replace the calls to bcma_core_pci_extend_L1timer() by calls to the
    newly introduced bcma_core_pci_ip() and bcma_core_pci_down()

    Signed-off-by: Hauke Mehrtens
    Cc: Arend van Spriel
    Signed-off-by: John W. Linville

    This fix has been discussed with Hauke Mehrtens [1] selection
    option 3) and is intended for v3.12.

    Ref:
    [1] http://mid.gmane.org/5239B12D.3040206@hauke-m.de

    Cc: # 3.11.x
    Cc: Tod Jackson
    Cc: Joe Perches
    Cc: Rafal Milecki
    Cc: Hauke Mehrtens
    Reviewed-by: Hante Meuleman
    Signed-off-by: Arend van Spriel
    Signed-off-by: John W. Linville

    Arend van Spriel
     
  • John W. Linville
     

26 Sep, 2013

3 commits

  • Determine if we've created a new file by examining the directory change
    attribute and/or the O_EXCL flag.

    This fixes a regression when doing a non-exclusive create of a new file.
    If the FILE_CREATED flag is not set, the atomic_open() command will
    perform full file access permissions checks instead of just checking
    for MAY_OPEN.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Pull device-mapper fixes from Mike Snitzer:
    "A few fixes for dm-snapshot, a 32 bit fix for dm-stats, a couple error
    handling fixes for dm-multipath. A fix for the thin provisioning
    target to not expose non-zero discard limits if discards are disabled.

    Lastly, add two DM module parameters which allow users to tune the
    emergency memory reserves that DM mainatins per device -- this helps
    fix a long-standing issue for dm-multipath. The conservative default
    reserve for request-based dm-multipath devices (256) has proven
    problematic for users with many multipathed SCSI devices but
    relatively little memory. To responsibly select a smaller value users
    should use the new nr_bios tracepoint info (via commit 75afb352
    "block: Add nr_bios to block_rq_remap tracepoint") to determine the
    peak number of bios their workloads create"

    * tag 'dm-3.12-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm:
    dm: add reserved_bio_based_ios module parameter
    dm: add reserved_rq_based_ios module parameter
    dm: lower bio-based mempool reservation
    dm thin: do not expose non-zero discard limits if discards disabled
    dm mpath: disable WRITE SAME if it fails
    dm-snapshot: fix performance degradation due to small hash size
    dm snapshot: workaround for a false positive lockdep warning
    dm stats: fix possible counter corruption on 32-bit systems
    dm mpath: do not fail path on -ENOSPC

    Linus Torvalds
     
  • Pull perf fixes from Ingo Molnar:
    "Assorted standalone fixes"

    * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
    perf/x86/intel: Add model number for Avoton Silvermont
    perf: Fix capabilities bitfield compatibility in 'struct perf_event_mmap_page'
    perf/x86/intel/uncore: Don't use smp_processor_id() in validate_group()
    perf: Update ABI comment
    tools lib lk: Uninclude linux/magic.h in debugfs.c
    perf tools: Fix old GCC build error in trace-event-parse.c:parse_proc_kallsyms()
    perf probe: Fix finder to find lines of given function
    perf session: Check for SIGINT in more loops
    perf tools: Fix compile with libelf without get_phdrnum
    perf tools: Fix buildid cache handling of kallsyms with kcore
    perf annotate: Fix objdump line parsing offset validation
    perf tools: Fill in new definitions for madvise()/mmap() flags
    perf tools: Sharpen the libaudit dependencies test

    Linus Torvalds
     

25 Sep, 2013

4 commits

  • This resolves the merge problem with two iio drivers that Stephen
    Rothwell pointed out.

    Reported-by: Stephen Rothwell
    Signed-off-by: Greg Kroah-Hartman

    Greg Kroah-Hartman
     
  • Much of of_irq.h is needlessly ifdef'ed. Clean this up and minimize the
    amount ifdef'ed code. This fixes some build warnings when CONFIG_OF
    is not enabled (seen on i386 and x86_64):

    include/linux/of_irq.h:82:7: warning: 'struct device_node' declared inside parameter list [enabled by default]
    include/linux/of_irq.h:82:7: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
    include/linux/of_irq.h:87:47: warning: 'struct device_node' declared inside parameter list [enabled by default]

    Compile tested on i386, sparc and arm.

    Reported-by: Randy Dunlap
    Cc: Grant Likely
    Signed-off-by: Rob Herring

    Rob Herring
     
  • Revert commit 3b38722efd9f ("memcg, vmscan: integrate soft reclaim
    tighter with zone shrinking code")

    I merged this prematurely - Michal and Johannes still disagree about the
    overall design direction and the future remains unclear.

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

    Andrew Morton
     
  • Revert commit a5b7c87f9207 ("vmscan, memcg: do softlimit reclaim also
    for targeted reclaim")

    I merged this prematurely - Michal and Johannes still disagree about the
    overall design direction and the future remains unclear.

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

    Andrew Morton