1. 13 May, 2016 4 commits
  2. 12 May, 2016 13 commits
  3. 11 May, 2016 16 commits
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 685764b1
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is a couple of small fixes: one is a potential uninitialised
        error variable in the alua code, potentially causing spurious failures
        and the other is a problem caused by the conversion of SCSI to
        hostwide tags which resulted in the qla1280 driver always failing in
        host initialisation"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        qla1280: Don't allocate 512kb of host tags
        scsi_dh_alua: uninitialized variable in alua_rtpg()
      685764b1
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 4d8bbbff
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Hopefully the last round of fixes this release, fingers crossed :)
      
         1) Initialize static nf_conntrack_locks_all_lock properly, from
            Florian Westphal.
      
         2) Need to cancel pending work when destroying IDLETIMER entries,
            from Liping Zhang.
      
         3) Fix TX param usage when sending TSO over iwlwifi devices, from
            Emmanuel Grumbach.
      
         4) NFACCT quota params not validated properly, from Phil Turnbull.
      
         5) Resolve more glibc vs.  kernel header conflicts, from Mikko
            Tapeli.
      
         6) Missing IRQ free in ravb_close(), from Geert Uytterhoeven.
      
         7) Fix infoleak in x25, from Kangjie Lu.
      
         8) Similarly in thunderx driver, from Heinrich Schuchardt.
      
         9) tc_ife.h uapi header not exported properly, from Jamal Hadi Salim.
      
        10) Don't reenable PHY interreupts if device is in polling mode, from
            Shaohui Xie.
      
        11) Packet scheduler actions late binding was not being handled
            properly at all, from Jamal Hadi Salim.
      
        12) Fix binding of conntrack entries to helpers in openvswitch, from
            Joe Stringer"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (21 commits)
        gre: do not keep the GRE header around in collect medata mode
        openvswitch: Fix cached ct with helper.
        net sched: ife action fix late binding
        net sched: skbedit action fix late binding
        net sched: simple action fix late binding
        net sched: mirred action fix late binding
        net sched: ipt action fix late binding
        net sched: vlan action fix late binding
        net: phylib: fix interrupts re-enablement in phy_start
        tcp: refresh skb timestamp at retransmit time
        net: nps_enet: bug fix - handle lost tx interrupts
        net: nps_enet: Tx handler synchronization
        export tc ife uapi header
        net: thunderx: avoid exposing kernel stack
        net: fix a kernel infoleak in x25 module
        ravb: Add missing free_irq() call to ravb_close()
        uapi glibc compat: fix compile errors when glibc net/if.h included before linux/if.h
        netfilter: nfnetlink_acct: validate NFACCT_QUOTA parameter
        iwlwifi: mvm: don't override the rate with the AMSDU len
        netfilter: IDLETIMER: fix race condition when destroy the target
        ...
      4d8bbbff
    • Jiri Benc's avatar
      gre: do not keep the GRE header around in collect medata mode · e271c7b4
      Jiri Benc authored
      For ipgre interface in collect metadata mode, it doesn't make sense for the
      interface to be of ARPHRD_IPGRE type. The outer header of received packets
      is not needed, as all the information from it is present in metadata_dst. We
      already don't set ipgre_header_ops for collect metadata interfaces, which is
      the only consumer of mac_header pointing to the outer IP header.
      
      Just set the interface type to ARPHRD_NONE in collect metadata mode for
      ipgre (not gretap, that still correctly stays ARPHRD_ETHER) and reset
      mac_header.
      
      Fixes: a64b04d8 ("gre: do not assign header_ops in collect metadata mode")
      Fixes: 2e15ea39 ("ip_gre: Add support to collect tunnel metadata.")
      Signed-off-by: default avatarJiri Benc <jbenc@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e271c7b4
    • Joe Stringer's avatar
      openvswitch: Fix cached ct with helper. · 16ec3d4f
      Joe Stringer authored
      When using conntrack helpers from OVS, a common configuration is to
      perform a lookup without specifying a helper, then go through a
      firewalling policy, only to decide to attach a helper afterwards.
      
      In this case, the initial lookup will cause a ct entry to be attached to
      the skb, then the later commit with helper should attach the helper and
      confirm the connection. However, the helper attachment has been missing.
      If the user has enabled automatic helper attachment, then this issue
      will be masked as it will be applied in init_conntrack(). It is also
      masked if the action is executed from ovs_packet_cmd_execute() as that
      will construct a fresh skb.
      
      This patch fixes the issue by making an explicit call to try to assign
      the helper if there is a discrepancy between the action's helper and the
      current skb->nfct.
      
      Fixes: cae3a262 ("openvswitch: Allow attaching helpers to ct action")
      Signed-off-by: default avatarJoe Stringer <joe@ovn.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      16ec3d4f
    • Mathias Krause's avatar
      x86/extable: ensure entries are swapped completely when sorting · 50c73890
      Mathias Krause authored
      The x86 exception table sorting was changed in commit 29934b0f
      ("x86/extable: use generic search and sort routines") to use the arch
      independent code in lib/extable.c.  However, the patch was mangled
      somehow on its way into the kernel from the last version posted at [1].
      The committed version kind of attempted to incorporate the changes of
      commit 548acf19 ("x86/mm: Expand the exception table logic to allow
      new handling options") as in _completely_ _ignoring_ the x86 specific
      'handler' member of struct exception_table_entry.  This effectively
      broke the sorting as entries will only partly be swapped now.
      
      Fortunately, the x86 Kconfig selects BUILDTIME_EXTABLE_SORT, so the
      exception table doesn't need to be sorted at runtime. However, in case
      that ever changes, we better not break the exception table sorting just
      because of that.
      
      [ Ard Biesheuvel points out that BUILDTIME_EXTABLE_SORT applies to the
        core image only, but we still rely on the sorting routines for modules
        in that case - Linus ]
      
      Fix this by providing a swap_ex_entry_fixup() macro that takes care of
      the 'handler' member.
      
      [1] https://lkml.org/lkml/2016/1/27/232Signed-off-by: default avatarMathias Krause <minipli@googlemail.com>
      Fixes: 29934b0f ("x86/extable: use generic search and sort routines")
      Reviewed-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: H. Peter Anvin <hpa@linux.intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Tony Luck <tony.luck@intel.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      50c73890
    • Linus Torvalds's avatar
      Merge tag 'spi-fix-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi · e0d09e32
      Linus Torvalds authored
      Pull spi fixes from Mark Brown:
       "A bunch of small driver specific fixes that have come up, none of them
        remarkable in themselves.  One fixes a regression introduced in the
        merge window and another two are targetted at stable"
      
      * tag 'spi-fix-v4.6-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
        spi: pxa2xx: Do not detect number of enabled chip selects on Intel SPT
        spi: spi-ti-qspi: Handle truncated frames properly
        spi: spi-ti-qspi: Fix FLEN and WLEN settings if bits_per_word is overridden
        spi: omap2-mcspi: Undo broken fix for dma transfer of vmalloced buffer
        spi: spi-fsl-dspi: Fix cs_change handling in message transfer
      e0d09e32
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · d32917ee
      Linus Torvalds authored
      Pull KVM fixes from Paolo Bonzini:
       "Two small x86 patches, improving "make kvmconfig" and fixing an
        objtool warning for CONFIG_PROFILE_ALL_BRANCHES"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        kvmconfig: add more virtio drivers
        x86/kvm: Add stack frame dependency to fastop() inline asm
      d32917ee
    • Takashi Iwai's avatar
      ALSA: usb-audio: Yet another Phoneix Audio device quirk · 84add303
      Takashi Iwai authored
      Phoenix Audio has yet another device with another id (even a different
      vendor id, 0556:0014) that requires the same quirk for the sample
      rate.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=110221
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      84add303
    • Takashi Iwai's avatar
      ALSA: hda - Fix regression on ATI HDMI audio · 39669225
      Takashi Iwai authored
      The HDMI/DP audio output on ATI/AMD chips got broken due to the recent
      restructuring of chmap.  Fortunately, Daniel Exner could bisect, and
      pointed the culprit commit [739ffee9: ALSA: hda - Add hdmi chmap
      verb programming ops to chmap object].
      
      This commit moved some ops from hdmi_ops to chmap_ops, and reassigned
      the ops in the embedded chmap object in hdmi_spec instead.
      Unfortunately, the reassignment of these ops in patch_atihdmi() were
      moved into an if block that is performed only for old chips.  Thus, on
      newer chips, the generic ops is still used, which doesn't work for
      such ATI/AMD chips.
      
      This patch addresses the regression, simply by moving the assignment
      of chmap ops to the right place.
      
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=114981
      Fixes: 739ffee9 ('ALSA: hda - Add hdmi chmap verb programming ops to chmap object')
      Reported-and-tested-by: default avatarDaniel Exner <dex@dragonslave.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      39669225
    • David S. Miller's avatar
      Merge branch 'net-sched-fixes' · 6e14313f
      David S. Miller authored
      Jamal Hadi Salim says:
      
      ====================
      Some actions were broken in allowing for late binding of actions.
      Late binding workflow is as follows:
      a) create an action and provide all necessary parameters for it
      Optionally provide an index or let the kernel give you one.
      Example:
      sudo tc actions add action police rate 1kbit burst 90k drop index 1
      
      b) later on bind to the pre-created action from a filter definition
      by merely specifying the index.
      Example:
      sudo tc filter add dev lo parent ffff: protocol ip prio 8 \
      u32 match ip src 127.0.0.8/32 flowid 1:8 action police index 1
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6e14313f
    • Jamal Hadi Salim's avatar
      net sched: ife action fix late binding · 4e8c8615
      Jamal Hadi Salim authored
      The process below was broken and is fixed with this patch.
      
      //add an ife action and give it an instance id of 1
      sudo tc actions add action ife encode \
      type 0xDEAD allow mark dst 02:15:15:15:15:15 index 1
      
      //create a filter which binds to ife action id 1
      sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\
      match ip dst 17.0.0.1/32 flowid 1:11 action ife index 1
      
      Message before fix was:
      RTNETLINK answers: Invalid argument
      We have an error talking to the kernel
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4e8c8615
    • Jamal Hadi Salim's avatar
      net sched: skbedit action fix late binding · 5e1567ae
      Jamal Hadi Salim authored
      The process below was broken and is fixed with this patch.
      
      //add a skbedit action and give it an instance id of 1
      sudo tc actions add action skbedit mark 10 index 1
      //create a filter which binds to skbedit action id 1
      sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\
      match ip dst 17.0.0.1/32 flowid 1:10 action skbedit index 1
      
      Message before fix was:
      RTNETLINK answers: Invalid argument
      We have an error talking to the kernel
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5e1567ae
    • Jamal Hadi Salim's avatar
      net sched: simple action fix late binding · 0e5538ab
      Jamal Hadi Salim authored
      The process below was broken and is fixed with this patch.
      
      //add a simple action and give it an instance id of 1
      sudo tc actions add action simple sdata "foobar" index 1
      //create a filter which binds to simple action id 1
      sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\
      match ip dst 17.0.0.1/32 flowid 1:10 action simple index 1
      
      Message before fix was:
      RTNETLINK answers: Invalid argument
      We have an error talking to the kernel
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0e5538ab
    • Jamal Hadi Salim's avatar
      net sched: mirred action fix late binding · 87dfbdc6
      Jamal Hadi Salim authored
      The process below was broken and is fixed with this patch.
      
      //add an mirred action and give it an instance id of 1
      sudo tc actions add action mirred egress mirror dev $MDEV  index 1
      //create a filter which binds to mirred action id 1
      sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\
      match ip dst 17.0.0.1/32 flowid 1:10 action mirred index 1
      
      Message before bug fix was:
      RTNETLINK answers: Invalid argument
      We have an error talking to the kernel
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87dfbdc6
    • Jamal Hadi Salim's avatar
      net sched: ipt action fix late binding · a57f19d3
      Jamal Hadi Salim authored
      This was broken and is fixed with this patch.
      
      //add an ipt action and give it an instance id of 1
      sudo tc actions add action ipt -j mark --set-mark 2 index 1
      //create a filter which binds to ipt action id 1
      sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32\
      match ip dst 17.0.0.1/32 flowid 1:10 action ipt index 1
      
      Message before bug fix was:
      RTNETLINK answers: Invalid argument
      We have an error talking to the kernel
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a57f19d3
    • Jamal Hadi Salim's avatar
      net sched: vlan action fix late binding · 5026c9b1
      Jamal Hadi Salim authored
      Late vlan action binding was broken and is fixed with this patch.
      
      //add a vlan action to pop and give it an instance id of 1
      sudo tc actions add action vlan pop index 1
      //create filter which binds to vlan action id 1
      sudo tc filter add dev $DEV parent ffff: protocol ip prio 1 u32 \
      match ip dst 17.0.0.1/32 flowid 1:1 action vlan index 1
      
      current message(before bug fix) was:
      RTNETLINK answers: Invalid argument
      We have an error talking to the kernel
      Signed-off-by: default avatarJamal Hadi Salim <jhs@mojatatu.com>
      Reviewed-by: default avatarCong Wang <xiyou.wangcong@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5026c9b1
  4. 10 May, 2016 7 commits
    • Shaohui Xie's avatar
      net: phylib: fix interrupts re-enablement in phy_start · 84a527a4
      Shaohui Xie authored
      If phy was suspended and is starting, current driver always enable
      phy's interrupts, if phy works in polling, phy can raise unexpected
      interrupt which will not be handled, the interrupt will block system
      enter suspend again. So interrupts should only be re-enabled if phy
      works in interrupt.
      Signed-off-by: default avatarShaohui Xie <Shaohui.Xie@nxp.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      84a527a4
    • Eric Dumazet's avatar
      tcp: refresh skb timestamp at retransmit time · 10a81980
      Eric Dumazet authored
      In the very unlikely case __tcp_retransmit_skb() can not use the cloning
      done in tcp_transmit_skb(), we need to refresh skb_mstamp before doing
      the copy and transmit, otherwise TCP TS val will be an exact copy of
      original transmit.
      
      Fixes: 7faee5c0 ("tcp: remove TCP_SKB_CB(skb)->when")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Cc: Yuchung Cheng <ycheng@google.com>
      Acked-by: default avatarYuchung Cheng <ycheng@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      10a81980
    • David S. Miller's avatar
      Merge branch 'nps_enet-fixes' · 3b0d190a
      David S. Miller authored
      Elad Kanfi says:
      
      ====================
      nps_enet: Net driver bugs fix
      
      v3:
      tx_packet_sent flag is not necessary, use socket buffer pointer
      instead.
      Use wmb() instead of smp_wmb().
      
      v2:
      Remove code style commit for now.
      Code style commit will be added after the bugs fix will be approved.
      
      Summary:
       1. Bug description: TX done interrupts that arrives while interrupts
          are masked, during NAPI poll, will not trigger an interrupt handling.
          Since TX interrupt is of level edge we will lose the TX done interrupt.
          As a result all pending tx frames will get no service.
      
          Solution: Check if there is a pending tx request after unmasking the
          interrupt and if answer is yes then re-add ourselves to
          the NAPI poll list.
      
       2. Bug description: CPU-A before sending a frame will set a variable
          to true. CPU-B that executes the tx done interrupt service routine
          might read a non valid value of that variable.
      
          Solution: Use the socket buffer pointer instead of the variable,
          and add a write memory barrier at the tx sending function after
          the pointer is set.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b0d190a
    • Elad Kanfi's avatar
      net: nps_enet: bug fix - handle lost tx interrupts · 05c00d82
      Elad Kanfi authored
      The tx interrupt is of edge type, and in case such interrupt is triggered
      while it is masked it will not be handled even after tx interrupts are
      re-enabled in the end of NAPI poll.
      This will cause tx network to stop in the following scenario:
       * Rx is being handled, hence interrupts are masked.
       * Tx interrupt is triggered after checking if there is some tx to handle
         and before re-enabling the interrupts.
      In this situation only rx transaction will release tx requests.
      
      In order to handle the tx that was missed( if there was one ),
      a NAPI reschdule was added after enabling the interrupts.
      Signed-off-by: default avatarElad Kanfi <eladkan@mellanox.com>
      Acked-by: default avatarNoam Camus <noamca@mellanox.com>
      Acked-by: default avatarGilad Ben-Yossef <giladby@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      05c00d82
    • Elad Kanfi's avatar
      net: nps_enet: Tx handler synchronization · e5df49d5
      Elad Kanfi authored
      Below is a description of a possible problematic
      sequence. CPU-A is sending a frame and CPU-B handles
      the interrupt that indicates the frame was sent. CPU-B
      reads an invalid value of tx_packet_sent.
      
      	CPU-A				CPU-B
      	-----				-----
      	nps_enet_send_frame
      	.
      	.
      	tx_skb = skb
      	tx_packet_sent = true
      	order HW to start tx
      	.
      	.
      	HW complete tx
      			    ------> 	get tx complete interrupt
      					.
      					.
      					if(tx_packet_sent == true)
      						handle tx_skb
      
      	end memory transaction
      	(tx_packet_sent actually
      	 written)
      
      Furthermore there is a dependency between tx_skb and tx_packet_sent.
      There is no assurance that tx_skb contains a valid pointer at CPU B
      when it sees tx_packet_sent == true.
      
      Solution:
      
      Initialize tx_skb to NULL and use it to indicate that packet was sent,
      in this way tx_packet_sent can be removed.
      Add a write memory barrier after setting tx_skb in order to make sure
      that it is valid before HW is informed and IRQ is fired.
      
      Fixed sequence will be:
      
             CPU-A                           CPU-B
             -----                           -----
      
      	tx_skb = skb
      	wmb()
      	.
      	.
      	order HW to start tx
      	.
      	.
      	HW complete tx
      			------>		get tx complete interrupt
      					.
      					.
      					if(tx_skb != NULL)
      						handle tx_skb
      
      					tx_skb = NULL
      Signed-off-by: default avatarElad Kanfi <eladkan@mellanox.com>
      Acked-by: default avatarNoam Camus <noamca@mellanox.com>
      Acked-by: default avatarGilad Ben-Yossef <giladby@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e5df49d5
    • Linus Torvalds's avatar
      Merge tag 'pci-v4.6-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci · c5114626
      Linus Torvalds authored
      Pull PCI fixes from Bjorn Helgaas:
       "Since v4.5, we've WARNed during resume if a PCI device, including a
        Thunderbolt device, was added while we were suspended.  A change we
        merged for v4.6-rc1 turned that warning into a system hang.  These
        enumeration patches from Lukas Wunner fix this issue:
      
         - Fix BUG on device attach failure
         - Do not treat EPROBE_DEFER as device attach failure"
      
      * tag 'pci-v4.6-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
        PCI: Do not treat EPROBE_DEFER as device attach failure
        PCI: Fix BUG on device attach failure
      c5114626
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 7ec02e3b
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Two topology corner case fixes, and a MAINTAINERS file update for
        mmiotrace maintenance"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/topology: Set x86_max_cores to 1 for CONFIG_SMP=n
        MAINTAINERS: Add mmiotrace entry
        x86/topology: Handle CPUID bogosity gracefully
      7ec02e3b