1. 03 1月, 2014 7 次提交
    • Y
      ipv6 addrconf: fix preferred lifetime state-changing behavior while valid_lft is infinity · fad8da3e
      Yasushi Asano 提交于
      Fixed a problem with setting the lifetime of an IPv6
      address. When setting preferred_lft to a value not zero or
      infinity, while valid_lft is infinity(0xffffffff) preferred
      lifetime is set to forever and does not update. Therefore
      preferred lifetime never becomes deprecated. valid lifetime
      and preferred lifetime should be set independently, even if
      valid lifetime is infinity, preferred lifetime must expire
      correctly (meaning it must eventually become deprecated)
      Signed-off-by: NYasushi Asano <yasushi.asano@jp.fujitsu.com>
      Acked-by: NHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      fad8da3e
    • D
      net: llc: fix use after free in llc_ui_recvmsg · 4d231b76
      Daniel Borkmann 提交于
      While commit 30a584d9 fixes datagram interface in LLC, a use
      after free bug has been introduced for SOCK_STREAM sockets that do
      not make use of MSG_PEEK.
      
      The flow is as follow ...
      
        if (!(flags & MSG_PEEK)) {
          ...
          sk_eat_skb(sk, skb, false);
          ...
        }
        ...
        if (used + offset < skb->len)
          continue;
      
      ... where sk_eat_skb() calls __kfree_skb(). Therefore, cache
      original length and work on skb_len to check partial reads.
      
      Fixes: 30a584d9 ("[LLX]: SOCK_DGRAM interface fixes")
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4d231b76
    • J
      virtio-net: fix refill races during restore · 6cd4ce00
      Jason Wang 提交于
      During restoring, try_fill_recv() was called with neither napi lock nor napi
      disabled. This can lead two try_fill_recv() was called in the same time. Fix
      this by refilling before trying to enable napi.
      
      Fixes 0741bcb5
      (virtio: net: Add freeze, restore handlers to support S4).
      
      Cc: Amit Shah <amit.shah@redhat.com>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6cd4ce00
    • W
      ipv4: fix tunneled VM traffic over hw VXLAN/GRE GSO NIC · 7a7ffbab
      Wei-Chun Chao 提交于
      VM to VM GSO traffic is broken if it goes through VXLAN or GRE
      tunnel and the physical NIC on the host supports hardware VXLAN/GRE
      GSO offload (e.g. bnx2x and next-gen mlx4).
      
      Two issues -
      (VXLAN) VM traffic has SKB_GSO_DODGY and SKB_GSO_UDP_TUNNEL with
      SKB_GSO_TCP/UDP set depending on the inner protocol. GSO header
      integrity check fails in udp4_ufo_fragment if inner protocol is
      TCP. Also gso_segs is calculated incorrectly using skb->len that
      includes tunnel header. Fix: robust check should only be applied
      to the inner packet.
      
      (VXLAN & GRE) Once GSO header integrity check passes, NULL segs
      is returned and the original skb is sent to hardware. However the
      tunnel header is already pulled. Fix: tunnel header needs to be
      restored so that hardware can perform GSO properly on the original
      packet.
      Signed-off-by: NWei-Chun Chao <weichunc@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7a7ffbab
    • V
      sctp: Remove outqueue empty state · 619a60ee
      Vlad Yasevich 提交于
      The SCTP outqueue structure maintains a data chunks
      that are pending transmission, the list of chunks that
      are pending a retransmission and a length of data in
      flight.  It also tries to keep the emtpy state so that
      it can performe shutdown sequence or notify user.
      
      The problem is that the empy state is inconsistently
      tracked.  It is possible to completely drain the queue
      without sending anything when using PR-SCTP.  In this
      case, the empty state will not be correctly state as
      report by Jamal Hadi Salim <jhs@mojatatu.com>.  This
      can cause an association to be perminantly stuck in the
      SHUTDOWN_PENDING state.
      
      Additionally, SCTP is incredibly inefficient when setting
      the empty state.  Even though all the data is availaible
      in the outqueue structure, we ignore it and walk a list
      of trasnports.
      
      In the end, we can completely remove the extra empty
      state and figure out if the queue is empty by looking
      at 3 things:  length of pending data, length of in-flight
      data, and exisiting of retransmit data.  All of these
      are already in the strucutre.
      Reported-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NVlad Yasevich <vyasevich@gmail.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Tested-by: NJamal Hadi Salim <jhs@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      619a60ee
    • M
      qlcnic: Fix resource allocation for TX queues · f3e3ccf8
      Manish Chopra 提交于
      o TX queues allocation was getting distributed equally among all the
        functions of the port including VFs and PF. Which was leading to failure
        in PF's multiple TX queues creation.
      
      o Instead of dividing queues equally allocate one TX queue for each VF as VF
        doesn't support multiple TX queues.
      Signed-off-by: NManish Chopra <manish.chopra@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f3e3ccf8
    • M
      qlcnic: Fix loopback diagnostic test · d9c602f0
      Manish Chopra 提交于
      o Adapter requires that if the port is in loopback mode no traffic should
        be flowing through that port, so on arrival of Link up AEN, do not advertise
        Link up to the stack until port is out of loopback mode
      Signed-off-by: NManish Chopra <manish.chopra@qlogic.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d9c602f0
  2. 02 1月, 2014 7 次提交
  3. 01 1月, 2014 2 次提交
    • O
      usbnet: mcs7830: rework link state detection · 8d88bbff
      Octavian Purdila 提交于
      Even with the quirks in commit dabdaf0c (mcs7830: Fix link state
      detection) there are still spurious link-down events for some chips
      where the false link-down events count go over a few hundreds.
      
      This patch takes a more conservative approach and only looks at
      link-down events where the link-down state is not combined with other
      states (e.g. half/full speed, pending frames in SRAM or TX status
      information valid). In all other cases we assume the link is up.
      
      Tested on MCS7830CV-DA (USB ID 9710:7830).
      
      Cc: Ondrej Zary <linux@rainbow-software.org>
      Cc: Michael Leun <lkml20120218@newton.leun.net>
      Cc: Ming Lei <ming.lei@canonical.com>
      Signed-off-by: NOctavian Purdila <octavian.purdila@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      8d88bbff
    • D
      vlan: Fix header ops passthru when doing TX VLAN offload. · 2205369a
      David S. Miller 提交于
      When the vlan code detects that the real device can do TX VLAN offloads
      in hardware, it tries to arrange for the real device's header_ops to
      be invoked directly.
      
      But it does so illegally, by simply hooking the real device's
      header_ops up to the VLAN device.
      
      This doesn't work because we will end up invoking a set of header_ops
      routines which expect a device type which matches the real device, but
      will see a VLAN device instead.
      
      Fix this by providing a pass-thru set of header_ops which will arrange
      to pass the proper real device instead.
      
      To facilitate this add a dev_rebuild_header().  There are
      implementations which provide a ->cache and ->create but not a
      ->rebuild (f.e. PLIP).  So we need a helper function just like
      dev_hard_header() to avoid crashes.
      
      Use this helper in the one existing place where the
      header_ops->rebuild was being invoked, the neighbour code.
      
      With lots of help from Florian Westphal.
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      2205369a
  4. 31 12月, 2013 8 次提交
    • L
      Merge tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 71ce176e
      Linus Torvalds 提交于
      Pull devicetree fixes from Rob Herring:
       - Fix 2 regressions found on PPC
       - Allow NULL ptr in unflatten_and_copy_device_tree
       - Update my email address
      
      * tag 'dt-fixes-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        MAINTAINERS: Update Rob Herring's email address
        of/irq: Fix device_node refcount in of_irq_parse_raw()
        of/Kconfig: Spelling s/one/once/
        Revert "of/address: Handle #address-cells > 2 specially"
        of: Fix NULL dereference in unflatten_and_copy()
      71ce176e
    • L
      Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc · 6e4c6196
      Linus Torvalds 提交于
      Pull powerpc fixes from Ben Herrenschmidt:
       "A bit more endian problems found during testing of 3.13 and a few
        other simple fixes and regressions fixes"
      
      * 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
        powerpc: Fix alignment of secondary cpu spin vars
        powerpc: Align p_end
        powernv/eeh: Add buffer for P7IOC hub error data
        powernv/eeh: Fix possible buffer overrun in ioda_eeh_phb_diag()
        powerpc: Make 64-bit non-VMX __copy_tofrom_user bi-endian
        powerpc: Make unaligned accesses endian-safe for powerpc
        powerpc: Fix bad stack check in exception entry
        powerpc/512x: dts: disable MPC5125 usb module
        powerpc/512x: dts: remove misplaced IRQ spec from 'soc' node (5125)
      6e4c6196
    • R
      f0082e3c
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 67e0c1b0
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
       "Some holiday bug fixes for 3.13...  There is still one bug I'd like to
        get fixed before 3.13-final.
      
        The vlan code erroneously assignes the header ops of the underlying
        real device to the VLAN device above it when the real device can
        hardware offload VLAN handling.  That's completely bogus because
        header ops are tied to the device type, so they only expect to see a
        'dev' argument compatible with their ops.
      
        The fix is the have the VLAN code use a special set of header ops that
        does the pass-thru correctly, by calling the underlying real device's
        header ops but _also_ passing in the real device instead of the VLAN
        device.
      
        That fix is currently waiting some testing.
      
        Anyways, of note here:
      
         1) Fix bitmap edge case in radiotap, from Johannes Berg.
      
         2) Fix oops on driver unload in rtlwifi, from Larry Finger.
      
         3) Bonding doesn't do locking correctly during speed/duplex/link
            changes, from Ding Tianhong.
      
         4) Fix header parsing in GRE code, this bug has been around for a few
            releases.  From Timo Teräs.
      
         5) SIT tunnel driver MTU check needs to take GSO into account, from
            Eric Dumazet.
      
         6) Minor info leak in inet_diag, from Daniel Borkmann.
      
         7) Info leak in YAM hamradio driver, from Salva Peiró.
      
         8) Fix route expiration state handling in ipv6 routing code, from Li
            RongQing.
      
         9) DCCP probe module does not check request_module()'s return value,
            from Wang Weidong.
      
        10) cpsw driver passes NULL device names to request_irq(), from
            Mugunthan V N.
      
        11) Prevent a NULL splat in RDS binding code, from Sasha Levin.
      
        12) Fix 4G overflow test in tg3 driver, from Nithin Sujir.
      
        13) Cure use after free in arc_emac and fec driver's software
            timestamp handling, from Eric Dumazet.
      
        14) SIT driver can fail to release the route when
            iptunnel_handle_offloads() throws an error.  From Li RongQing.
      
        15) Several batman-adv fixes from Simon Wunderlich and Antonio
            Quartulli.
      
        16) Fix deadlock during TIPC socket release, from Ying Xue.
      
        17) Fix regression in ROSE protocol recvmsg() msg_name handling, from
            Florian Westphal.
      
        18) stmmac PTP support releases wrong spinlock, from Vince Bridgers"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (73 commits)
        stmmac: Fix incorrect spinlock release and PTP cap detection.
        phy: IRQ cannot be shared
        net: rose: restore old recvmsg behavior
        xen-netback: fix guest-receive-side array sizes
        fec: Do not assume that PHY reset is active low
        tipc: fix deadlock during socket release
        netfilter: nf_tables: fix wrong datatype in nft_validate_data_load()
        batman-adv: fix vlan header access
        batman-adv: clean nf state when removing protocol header
        batman-adv: fix alignment for batadv_tvlv_tt_change
        batman-adv: fix size of batadv_bla_claim_dst
        batman-adv: fix size of batadv_icmp_header
        batman-adv: fix header alignment by unrolling batadv_header
        batman-adv: fix alignment for batadv_coded_packet
        netfilter: nf_tables: fix oops when updating table with user chains
        netfilter: nf_tables: fix dumping with large number of sets
        ipv6: release dst properly in ipip6_tunnel_xmit
        netxen: Correct off-by-one errors in bounds checks
        net: Add some clarification to skb_tx_timestamp() comment.
        arc_emac: fix potential use after free
        ...
      67e0c1b0
    • R
      MAINTAINERS: Update Rob Herring's email address · 5d3ad8a6
      Rob Herring 提交于
      My Calxeda email address is going away.
      Signed-off-by: NRob Herring <rob.herring@calxeda.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      5d3ad8a6
    • C
      of/irq: Fix device_node refcount in of_irq_parse_raw() · 2f53a713
      Cédric Le Goater 提交于
      Commit 23616132, "of/irq: Refactor interrupt-map parsing" changed
      the refcount on the device_node causing an error in of_node_put():
      
      ERROR: Bad of_node_put() on /pci@800000020000000
      CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.13.0-rc3-dirty #2
      Call Trace:
      [c00000003e403500] [c0000000000144fc] .show_stack+0x7c/0x1f0 (unreliable)
      [c00000003e4035d0] [c00000000070f250] .dump_stack+0x88/0xb4
      [c00000003e403650] [c0000000005e8768] .of_node_release+0xd8/0xf0
      [c00000003e4036e0] [c0000000005eeafc] .of_irq_parse_one+0x10c/0x280
      [c00000003e4037a0] [c0000000005efd4c] .of_irq_parse_pci+0x3c/0x1d0
      [c00000003e403840] [c000000000038240] .pcibios_setup_device+0xa0/0x2e0
      [c00000003e403910] [c0000000000398f0] .pcibios_setup_bus_devices+0x60/0xd0
      [c00000003e403990] [c00000000003b3a4] .__of_scan_bus+0x1a4/0x2b0
      [c00000003e403a80] [c00000000003a62c] .pcibios_scan_phb+0x30c/0x410
      [c00000003e403b60] [c0000000009fe430] .pcibios_init+0x7c/0xd4
      
      This patch adjusts the refcount in the walk of the interrupt tree.
      When a match is found, there is no need to increase the refcount
      on 'out_irq->np' as 'newpar' is already holding a ref. The refcount
      balance between 'ipar' and 'newpar' is maintained in the skiplevel:
      goto label.
      
      This patch also removes the usage of the device_node variable 'old'
      which seems useless after the latest changes.
      Signed-off-by: NCédric Le Goater <clg@fr.ibm.com>
      Signed-off-by: NRob Herring <robh@kernel.org>
      2f53a713
    • G
      5d927086
    • R
      Revert "of/address: Handle #address-cells > 2 specially" · 13fcca8f
      Rob Herring 提交于
      This reverts commit e38c0a1f.
      
      Nikita Yushchenko reports:
      While trying to make freescale p2020ds and  mpc8572ds boards working
      with mainline kernel, I faced that commit e38c0a1f (Handle
      
      Both these boards have uli1575 chip.
      Corresponding part in device tree is something like
      
                      uli1575@0 {
                              reg = <0x0 0x0 0x0 0x0 0x0>;
                              #size-cells = <2>;
                              #address-cells = <3>;
                              ranges = <0x2000000 0x0 0x80000000
                                        0x2000000 0x0 0x80000000
                                        0x0 0x20000000
      
                                        0x1000000 0x0 0x0
                                        0x1000000 0x0 0x0
                                        0x0 0x10000>;
                              isa@1e {
      ...
      
      I.e. it has #address-cells = <3>
      
      With commit e38c0a1f reverted, devices under uli1575 are registered
      correctly, e.g. for rtc
      
      OF: ** translation for device /pcie@ffe09000/pcie@0/uli1575@0/isa@1e/rtc@70 **
      OF: bus is isa (na=2, ns=1) on /pcie@ffe09000/pcie@0/uli1575@0/isa@1e
      OF: translating address: 00000001 00000070
      OF: parent bus is default (na=3, ns=2) on /pcie@ffe09000/pcie@0/uli1575@0
      OF: walking ranges...
      OF: ISA map, cp=0, s=1000, da=70
      OF: parent translation for: 01000000 00000000 00000000
      OF: with offset: 70
      OF: one level translation: 00000000 00000000 00000070
      OF: parent bus is pci (na=3, ns=2) on /pcie@ffe09000/pcie@0
      OF: walking ranges...
      OF: default map, cp=a0000000, s=20000000, da=70
      OF: default map, cp=0, s=10000, da=70
      OF: parent translation for: 01000000 00000000 00000000
      OF: with offset: 70
      OF: one level translation: 01000000 00000000 00000070
      OF: parent bus is pci (na=3, ns=2) on /pcie@ffe09000
      OF: walking ranges...
      OF: PCI map, cp=0, s=10000, da=70
      OF: parent translation for: 01000000 00000000 00000000
      OF: with offset: 70
      OF: one level translation: 01000000 00000000 00000070
      OF: parent bus is default (na=2, ns=2) on /
      OF: walking ranges...
      OF: PCI map, cp=0, s=10000, da=70
      OF: parent translation for: 00000000 ffc10000
      OF: with offset: 70
      OF: one level translation: 00000000 ffc10070
      OF: reached root node
      
      With commit e38c0a1f in place, address translation fails:
      
      OF: ** translation for device /pcie@ffe09000/pcie@0/uli1575@0/isa@1e/rtc@70 **
      OF: bus is isa (na=2, ns=1) on /pcie@ffe09000/pcie@0/uli1575@0/isa@1e
      OF: translating address: 00000001 00000070
      OF: parent bus is default (na=3, ns=2) on /pcie@ffe09000/pcie@0/uli1575@0
      OF: walking ranges...
      OF: ISA map, cp=0, s=1000, da=70
      OF: parent translation for: 01000000 00000000 00000000
      OF: with offset: 70
      OF: one level translation: 00000000 00000000 00000070
      OF: parent bus is pci (na=3, ns=2) on /pcie@ffe09000/pcie@0
      OF: walking ranges...
      OF: default map, cp=a0000000, s=20000000, da=70
      OF: default map, cp=0, s=10000, da=70
      OF: not found !
      
      Thierry Reding confirmed this commit was not needed after all:
      "We ended up merging a different address representation for Tegra PCIe
      and I've confirmed that reverting this commit doesn't cause any obvious
      regressions. I think all other drivers in drivers/pci/host ended up
      copying what we did on Tegra, so I wouldn't expect any other breakage
      either."
      
      There doesn't appear to be a simple way to support both behaviours, so
      reverting this as nothing should be depending on the new behaviour.
      
      Cc: stable@vger.kernel.org # v3.7+
      Signed-off-by: NRob Herring <robh@kernel.org>
      13fcca8f
  5. 30 12月, 2013 16 次提交