Skip to content
  1. Aug 03, 2014
  2. Aug 01, 2014
    • Duan Jiong's avatar
      4330487a
    • Dan Carpenter's avatar
      ISDN: pcbit: off by one bugs in pcbit_set_msn() · 7bcc6738
      Dan Carpenter authored
      
      
      1) We don't allocate enough space for the NUL terminator so we end up
         corrupting one character beyond the end of the buffer.
      
      2) The "len - 1" should just be "len".  The code is trying to copy a
         word from a buffer up to a comma or the last word in the buffer.
         Say you have the buffer, "foo,bar,baz", then this code truncates the
         last letter off each word so you get "fo", "ba", and "ba".  You would
         hope this kind of bug would get noticed in testing...
      
         I'm not very familiar with this code and I can't test it, but I think
         we should copy the final character.
      
      Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7bcc6738
    • Freddy Xin's avatar
      AX88179_178A: Add ethtool ops for EEE support · e98d69ba
      Freddy Xin authored
      
      
      Add functions to support ethtool EEE manipulating, and the EEE
      is disabled in default setting to enhance the compatibility
      with certain switch.
      
      Signed-off-by: default avatarFreddy Xin <freddy@asix.com.tw>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      e98d69ba
    • Tobias Klauser's avatar
      netlink: Use PAGE_ALIGNED macro · 74e83b23
      Tobias Klauser authored
      
      
      Use PAGE_ALIGNED(...) instead of IS_ALIGNED(..., PAGE_SIZE).
      
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      74e83b23
    • Duan Jiong's avatar
      net: fix the counter ICMP_MIB_INERRORS/ICMP6_MIB_INERRORS · 7304fe46
      Duan Jiong authored
      
      
      When dealing with ICMPv[46] Error Message, function icmp_socket_deliver()
      and icmpv6_notify() do some valid checks on packet's length, but then some
      protocols check packet's length redaudantly. So remove those duplicated
      statements, and increase counter ICMP_MIB_INERRORS/ICMP6_MIB_INERRORS in
      function icmp_socket_deliver() and icmpv6_notify() respectively.
      
      In addition, add missed counter in udp6/udplite6 when socket is NULL.
      
      Signed-off-by: default avatarDuan Jiong <duanj.fnst@cn.fujitsu.com>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7304fe46
    • Jason Gunthorpe's avatar
      sctp: Fixup v4mapped behaviour to comply with Sock API · 299ee123
      Jason Gunthorpe authored
      
      
      The SCTP socket extensions API document describes the v4mapping option as
      follows:
      
      8.1.15.  Set/Clear IPv4 Mapped Addresses (SCTP_I_WANT_MAPPED_V4_ADDR)
      
         This socket option is a Boolean flag which turns on or off the
         mapping of IPv4 addresses.  If this option is turned on, then IPv4
         addresses will be mapped to V6 representation.  If this option is
         turned off, then no mapping will be done of V4 addresses and a user
         will receive both PF_INET6 and PF_INET type addresses on the socket.
         See [RFC3542] for more details on mapped V6 addresses.
      
      This description isn't really in line with what the code does though.
      
      Introduce addr_to_user (renamed addr_v4map), which should be called
      before any sockaddr is passed back to user space. The new function
      places the sockaddr into the correct format depending on the
      SCTP_I_WANT_MAPPED_V4_ADDR option.
      
      Audit all places that touched v4mapped and either sanely construct
      a v4 or v6 address then call addr_to_user, or drop the
      unnecessary v4mapped check entirely.
      
      Audit all places that call addr_to_user and verify they are on a sycall
      return path.
      
      Add a custom getname that formats the address properly.
      
      Several bugs are addressed:
       - SCTP_I_WANT_MAPPED_V4_ADDR=0 often returned garbage for
         addresses to user space
       - The addr_len returned from recvmsg was not correct when
         returning AF_INET on a v6 socket
       - flowlabel and scope_id were not zerod when promoting
         a v4 to v6
       - Some syscalls like bind and connect behaved differently
         depending on v4mapped
      
      Tested bind, getpeername, getsockname, connect, and recvmsg for proper
      behaviour in v4mapped = 1 and 0 cases.
      
      Signed-off-by: default avatarNeil Horman <nhorman@tuxdriver.com>
      Tested-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: default avatarJason Gunthorpe <jgunthorpe@obsidianresearch.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      299ee123
    • Karoly Kemeny's avatar
      net: kernel-doc compliant documentation for net_device · 536721b1
      Karoly Kemeny authored
      
      
      Net_device is a vast and important structure, but it has no kernel-doc
      compliant documentation. This patch extracts the comments from the structure
      to clean it up, and let the scripts extract documentation from it. I know that
      the patch is big, but it's just reordering of comments into the appropriate
      form, and adding a few more, for the missing members.
      
      Signed-off-by: default avatarKaroly Kemeny <karoly.kemeny@gmail.com>
      Acked-by: default avatarRandy Dunlap <rdunlap@infradead.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      536721b1
    • David S. Miller's avatar
      Merge branch 'stmmac-next' · 8e97b85a
      David S. Miller authored
      
      
      Vince Bridgers says:
      
      ====================
      net: stmmac: Improve mcast/ucast filter for snps
      
      This patch series adds Synopsys specific bindings for the Synopsys EMAC
      filter characteristics since those are implementation dependent. The
      multicast and unicast filtering code was improved to handle different
      configuration variations based on device tree settings.
      
      I verified the operation of the multicast and unicast filters through
      Synopsys support as requested during the V1 review, and tested the GMAC
      configuration on an Altera Cyclone 5 SOC (which supports 256 multicast
      bins and 128 Unicast addresses). The 10/100 variant of this driver
      modification was not tested, although it was compile tested. I shared
      the email thread results of the investigation through Synopsys with the
      stmmac maintainer.
      
      V4: Remove patch from series that addressed a sparse issue from a
          down rev'd version of sparse that does not show up in the
          latest version of sparse.
      V3: Break up the patch into interface and functional change patches
          per review comments
      V2: Confirm with Synopsys methods to determine number of Multicast bins
          and Unicast address filter entries per first round review comments.
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8e97b85a
    • Vince Bridgers's avatar
      net: stmmac: Support devicetree configs for mcast and ucast filter entries · 3b57de95
      Vince Bridgers authored
      
      
      This patch adds and modifies code to support multiple Multicast and Unicast
      Synopsys MAC filter configurations. The default configuration is defined to
      support legacy driver behavior, which is 64 Multicast bins. The Unicast
      filter code previously assumed all controllers support 32 or 16 Unicast
      addresses based on controller version number, but this has been corrected
      to support a default of 1 Unicast address. The filter configuration may
      be specified through the devicetree using a Synopsys specific device tree
      entry. This information was verified with Synopsys through
      Synopsys Support Case #8000684337 and shared with the maintainer.
      
      Signed-off-by: default avatarVince Bridgers <vbridgers2013@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3b57de95
    • Vince Bridgers's avatar
      ARM: socfpga: Add socfpga Ethernet filter attributes entries · ea6856e3
      Vince Bridgers authored
      
      
      This patch adds socfpga Ethernet filter attributes for multicast
      and unicast filters per Synopsys Ethernet IP configuration chosen
      by Altera for the Cyclone 5 and Arria SOC FPGAs.
      
      Signed-off-by: default avatarVince Bridgers <vbridgers2013@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ea6856e3