1. 16 9月, 2013 15 次提交
  2. 14 9月, 2013 12 次提交
  3. 13 9月, 2013 13 次提交
    • J
      ixgbe: fully disable hardware RSC logic when disabling RSC · 6dcc28b9
      Jacob Keller 提交于
      This patch modifies the configure_rx path in order to properly disable RSC
      hardware logic when the user disables it. Previously we only disabled RSC in the
      queue settings, but this does not fully disable hardware RSC logic which can
      lead to some unexpected performance issues.
      Signed-off-by: NJacob Keller <jacob.e.keller@intel.com>
      Tested-by: NPhil Schmitt <phillip.j.schmitt@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      6dcc28b9
    • A
      net/irda/mcs7780: fix memory leaks in mcs_net_open() · 89473129
      Alexey Khoroshilov 提交于
      If rx_urb allocation fails in mcs_setup_urbs(), tx_urb leaks.
      If mcs_receive_start() fails in mcs_net_open(), the both urbs are not deallocated.
      
      The patch fixes the issues and by the way fixes label indentation.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      89473129
    • E
      net/mlx4_en: Check device state when setting coalescing · 38463e2c
      Eugenia Emantayev 提交于
      When the device is down, CQs are freed. We must check the device state
      to avoid issuing firmware commands on non existing CQs.
      
      CC: Or Gerlitz <ogerlitz@mellanox.com>
      Signed-off-by: NEugenia Emantayev <eugenia@mellanox.com>
      Signed-off-by: NAmir Vadai <amirv@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      38463e2c
    • H
      bridge: Clamp forward_delay when enabling STP · be4f154d
      Herbert Xu 提交于
      At some point limits were added to forward_delay.  However, the
      limits are only enforced when STP is enabled.  This created a
      scenario where you could have a value outside the allowed range
      while STP is disabled, which then stuck around even after STP
      is enabled.
      
      This patch fixes this by clamping the value when we enable STP.
      
      I had to move the locking around a bit to ensure that there is
      no window where someone could insert a value outside the range
      while we're in the middle of enabling STP.
      Signed-off-by: NHerbert Xu <herbert@gondor.apana.org.au>
      
      Cheers,
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      be4f154d
    • C
      resubmit bridge: fix message_age_timer calculation · 9a062013
      Chris Healy 提交于
      This changes the message_age_timer calculation to use the BPDU's max age as
      opposed to the local bridge's max age.  This is in accordance with section
      8.6.2.3.2 Step 2 of the 802.1D-1998 sprecification.
      
      With the current implementation, when running with very large bridge
      diameters, convergance will not always occur even if a root bridge is
      configured to have a longer max age.
      
      Tested successfully on bridge diameters of ~200.
      Signed-off-by: NChris Healy <cphealy@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9a062013
    • M
      net: tulip: remove deprecated IRQF_DISABLED · f25672f1
      Michael Opdenacker 提交于
      This patch proposes to remove the IRQF_DISABLED flag from
      drivers/net/ethernet/dec/tulip/de4x5.c
      
      It's a NOOP since 2.6.35 and it will be removed one day.
      Signed-off-by: NMichael Opdenacker <michael.opdenacker@free-electrons.com>
      Acked-by: NGrant Grundler <grundler@parisc-linux.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f25672f1
    • M
      ethernet: amd: remove deprecated IRQF_DISABLED · 7bebd005
      Michael Opdenacker 提交于
      This patch proposes to remove the IRQF_DISABLED flag from
      drivers/net/ethernet/amd/sun3lance.c
      
      It's a NOOP since 2.6.35 and it will be removed one day.
      Signed-off-by: NMichael Opdenacker <michael.opdenacker@free-electrons.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7bebd005
    • M
      ehea: remove deprecated IRQF_DISABLED · 46c915f8
      Michael Opdenacker 提交于
      This patch proposes to remove the IRQF_DISABLED flag from
      drivers/net/ethernet/ibm/ehea/ehea_main.c
      
      It's a NOOP since 2.6.35 and it will be removed one day.
      Signed-off-by: NMichael Opdenacker <michael.opdenacker@free-electrons.com>
      Acked-by: NThadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      46c915f8
    • M
      bfin_mac: remove deprecated IRQF_DISABLED · 63aca0f7
      Michael Opdenacker 提交于
      This patch proposes to remove the IRQF_DISABLED flag from
      drivers/net/ethernet/adi/bfin_mac.c.
      
      It's a NOOP since 2.6.35 and it will be removed one day.
      Signed-off-by: NMichael Opdenacker <michael.opdenacker@free-electrons.com>
      Reviewed-by: NJingoo Han <jg1.han@samsung.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      63aca0f7
    • D
      xen-netback: count number required slots for an skb more carefully · 6e43fc04
      David Vrabel 提交于
      When a VM is providing an iSCSI target and the LUN is used by the
      backend domain, the generated skbs for direct I/O writes to the disk
      have large, multi-page skb->data but no frags.
      
      With some lengths and starting offsets, xen_netbk_count_skb_slots()
      would be one short because the simple calculation of
      DIV_ROUND_UP(skb_headlen(), PAGE_SIZE) was not accounting for the
      decisions made by start_new_rx_buffer() which does not guarantee
      responses are fully packed.
      
      For example, a skb with length < 2 pages but which spans 3 pages would
      be counted as requiring 2 slots but would actually use 3 slots.
      
      skb->data:
      
          |        1111|222222222222|3333        |
      
      Fully packed, this would need 2 slots:
      
          |111122222222|22223333    |
      
      But because the 2nd page wholy fits into a slot it is not split across
      slots and goes into a slot of its own:
      
          |1111        |222222222222|3333        |
      
      Miscounting the number of slots means netback may push more responses
      than the number of available requests.  This will cause the frontend
      to get very confused and report "Too many frags/slots".  The frontend
      never recovers and will eventually BUG.
      
      Fix this by counting the number of required slots more carefully.  In
      xen_netbk_count_skb_slots(), more closely follow the algorithm used by
      xen_netbk_gop_skb() by introducing xen_netbk_count_frag_slots() which
      is the dry-run equivalent of netbk_gop_frag_copy().
      Signed-off-by: NDavid Vrabel <david.vrabel@citrix.com>
      Acked-by: NIan Campbell <ian.campbell@citrix.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6e43fc04
    • N
      tg3: Expand led off fix to include 5720 · 300cf9b9
      Nithin Sujir 提交于
      Commit 989038e2 ("tg3: Don't turn off
      led on 5719 serdes port 0") added code to skip turning led off on port
      0 of the 5719 since it powered down other ports. This workaround needs
      to be enabled on the 5720 as well.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NNithin Nayak Sujir <nsujir@broadcom.com>
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      300cf9b9
    • D
      net: sctp: fix ipv6 ipsec encryption bug in sctp_v6_xmit · 95ee6208
      Daniel Borkmann 提交于
      Alan Chester reported an issue with IPv6 on SCTP that IPsec traffic is not
      being encrypted, whereas on IPv4 it is. Setting up an AH + ESP transport
      does not seem to have the desired effect:
      
      SCTP + IPv4:
      
        22:14:20.809645 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto AH (51), length 116)
          192.168.0.2 > 192.168.0.5: AH(spi=0x00000042,sumlen=16,seq=0x1): ESP(spi=0x00000044,seq=0x1), length 72
        22:14:20.813270 IP (tos 0x2,ECT(0), ttl 64, id 0, offset 0, flags [DF], proto AH (51), length 340)
          192.168.0.5 > 192.168.0.2: AH(spi=0x00000043,sumlen=16,seq=0x1):
      
      SCTP + IPv6:
      
        22:31:19.215029 IP6 (class 0x02, hlim 64, next-header SCTP (132) payload length: 364)
          fe80::222:15ff:fe87:7fc.3333 > fe80::92e6:baff:fe0d:5a54.36767: sctp
          1) [INIT ACK] [init tag: 747759530] [rwnd: 62464] [OS: 10] [MIS: 10]
      
      Moreover, Alan says:
      
        This problem was seen with both Racoon and Racoon2. Other people have seen
        this with OpenSwan. When IPsec is configured to encrypt all upper layer
        protocols the SCTP connection does not initialize. After using Wireshark to
        follow packets, this is because the SCTP packet leaves Box A unencrypted and
        Box B believes all upper layer protocols are to be encrypted so it drops
        this packet, causing the SCTP connection to fail to initialize. When IPsec
        is configured to encrypt just SCTP, the SCTP packets are observed unencrypted.
      
      In fact, using `socat sctp6-listen:3333 -` on one end and transferring "plaintext"
      string on the other end, results in cleartext on the wire where SCTP eventually
      does not report any errors, thus in the latter case that Alan reports, the
      non-paranoid user might think he's communicating over an encrypted transport on
      SCTP although he's not (tcpdump ... -X):
      
        ...
        0x0030: 5d70 8e1a 0003 001a 177d eb6c 0000 0000  ]p.......}.l....
        0x0040: 0000 0000 706c 6169 6e74 6578 740a 0000  ....plaintext...
      
      Only in /proc/net/xfrm_stat we can see XfrmInTmplMismatch increasing on the
      receiver side. Initial follow-up analysis from Alan's bug report was done by
      Alexey Dobriyan. Also thanks to Vlad Yasevich for feedback on this.
      
      SCTP has its own implementation of sctp_v6_xmit() not calling inet6_csk_xmit().
      This has the implication that it probably never really got updated along with
      changes in inet6_csk_xmit() and therefore does not seem to invoke xfrm handlers.
      
      SCTP's IPv4 xmit however, properly calls ip_queue_xmit() to do the work. Since
      a call to inet6_csk_xmit() would solve this problem, but result in unecessary
      route lookups, let us just use the cached flowi6 instead that we got through
      sctp_v6_get_dst(). Since all SCTP packets are being sent through sctp_packet_transmit(),
      we do the route lookup / flow caching in sctp_transport_route(), hold it in
      tp->dst and skb_dst_set() right after that. If we would alter fl6->daddr in
      sctp_v6_xmit() to np->opt->srcrt, we possibly could run into the same effect
      of not having xfrm layer pick it up, hence, use fl6_update_dst() in sctp_v6_get_dst()
      instead to get the correct source routed dst entry, which we assign to the skb.
      
      Also source address routing example from 62503411 ("sctp: fix sctp to work with
      ipv6 source address routing") still works with this patch! Nevertheless, in RFC5095
      it is actually 'recommended' to not use that anyway due to traffic amplification [1].
      So it seems we're not supposed to do that anyway in sctp_v6_xmit(). Moreover, if
      we overwrite the flow destination here, the lower IPv6 layer will be unable to
      put the correct destination address into IP header, as routing header is added in
      ipv6_push_nfrag_opts() but then probably with wrong final destination. Things aside,
      result of this patch is that we do not have any XfrmInTmplMismatch increase plus on
      the wire with this patch it now looks like:
      
      SCTP + IPv6:
      
        08:17:47.074080 IP6 2620:52:0:102f:7a2b:cbff:fe27:1b0a > 2620:52:0:102f:213:72ff:fe32:7eba:
          AH(spi=0x00005fb4,seq=0x1): ESP(spi=0x00005fb5,seq=0x1), length 72
        08:17:47.074264 IP6 2620:52:0:102f:213:72ff:fe32:7eba > 2620:52:0:102f:7a2b:cbff:fe27:1b0a:
          AH(spi=0x00003d54,seq=0x1): ESP(spi=0x00003d55,seq=0x1), length 296
      
      This fixes Kernel Bugzilla 24412. This security issue seems to be present since
      2.6.18 kernels. Lets just hope some big passive adversary in the wild didn't have
      its fun with that. lksctp-tools IPv6 regression test suite passes as well with
      this patch.
      
       [1] http://www.secdev.org/conf/IPv6_RH_security-csw07.pdfReported-by: NAlan Chester <alan.chester@tekelec.com>
      Reported-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NDaniel Borkmann <dborkman@redhat.com>
      Cc: Steffen Klassert <steffen.klassert@secunet.com>
      Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
      Acked-by: NVlad Yasevich <vyasevich@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      95ee6208
    • J
      tuntap: correctly handle error in tun_set_iff() · 662ca437
      Jason Wang 提交于
      Commit c8d68e6b
      (tuntap: multiqueue support) only call free_netdev() on error in
      tun_set_iff(). This causes several issues:
      
      - memory of tun security were leaked
      - use after free since the flow gc timer was not deleted and the tfile
        were not detached
      
      This patch solves the above issues.
      Reported-by: NWannes Rombouts <wannes.rombouts@epitech.eu>
      Cc: Michael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NJason Wang <jasowang@redhat.com>
      Acked-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      662ca437