1. 21 2月, 2018 6 次提交
  2. 10 2月, 2018 5 次提交
  3. 09 2月, 2018 2 次提交
    • D
      net: thunder: change q_len's type to handle max ring size · 88c991a9
      Dean Nelson 提交于
      The Cavium thunder nicvf driver supports rx/tx rings of up to 65536 entries per.
      The number of entires are stored in the q_len member of struct q_desc_mem. The
      problem is that q_len being a u16, results in 65536 becoming 0.
      
      In getting pointers to descriptors in the rings, the driver uses q_len minus 1
      as a mask after incrementing the pointer, in order to go back to the beginning
      and not go past the end of the ring.
      
      With the q_len set to 0 the mask is no longer correct and the driver does go
      beyond the end of the ring, causing various ills. Usually the first thing that
      shows up is a "NETDEV WATCHDOG: enP2p1s0f1 (nicvf): transmit queue 7 timed out"
      warning.
      
      This patch remedies the problem by changing q_len to a u32.
      Signed-off-by: NDean Nelson <dnelson@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88c991a9
    • N
      ibmvnic: queue reset when CRQ gets closed during reset · ec95dffa
      Nathan Fontenot 提交于
      While handling a driver reset we get a H_CLOSED return trying
      to send a CRQ event. When this occurs we need to queue up another
      reset attempt. Without doing this we see instances where the driver
      is left in a closed state because the reset failed and there is no
      further attempts to reset the driver.
      Signed-off-by: NNathan Fontenot <nfont@linux.vnet.ibm.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ec95dffa
  4. 08 2月, 2018 12 次提交
  5. 07 2月, 2018 4 次提交
  6. 06 2月, 2018 2 次提交
  7. 05 2月, 2018 1 次提交
  8. 03 2月, 2018 4 次提交
    • A
      net: qlge: use memmove instead of skb_copy_to_linear_data · cfabb177
      Arnd Bergmann 提交于
      gcc-8 points out that the skb_copy_to_linear_data() argument points to
      the skb itself, which makes it run into a problem with overlapping
      memcpy arguments:
      
      In file included from include/linux/ip.h:20,
                       from drivers/net/ethernet/qlogic/qlge/qlge_main.c:26:
      drivers/net/ethernet/qlogic/qlge/qlge_main.c: In function 'ql_realign_skb':
      include/linux/skbuff.h:3378:2: error: 'memcpy' source argument is the same as destination [-Werror=restrict]
        memcpy(skb->data, from, len);
      
      It's unclear to me what the best solution is, maybe it ought to use a
      different helper that adjusts the skb data in a safe way. Simply using
      memmove() here seems like the easiest workaround.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cfabb177
    • A
      net: qed: use correct strncpy() size · 11f71108
      Arnd Bergmann 提交于
      passing the strlen() of the source string as the destination
      length is pointless, and gcc-8 now warns about it:
      
      drivers/net/ethernet/qlogic/qed/qed_debug.c: In function 'qed_grc_dump':
      include/linux/string.h:253: error: 'strncpy' specified bound depends on the length of the source argument [-Werror=stringop-overflow=]
      
      This changes qed_grc_dump_big_ram() to instead uses the length of
      the destination buffer, and use strscpy() to guarantee nul-termination.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      11f71108
    • A
      net: cxgb4: avoid memcpy beyond end of source buffer · 1a91649f
      Arnd Bergmann 提交于
      Building with link-time-optimizations revealed that the cxgb4 driver does
      a fixed-size memcpy() from a variable-length constant string into the
      network interface name:
      
      In function 'memcpy',
          inlined from 'cfg_queues_uld.constprop' at drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:335:2,
          inlined from 'cxgb4_register_uld.constprop' at drivers/net/ethernet/chelsio/cxgb4/cxgb4_uld.c:719:9:
      include/linux/string.h:350:3: error: call to '__read_overflow2' declared with attribute error: detected read beyond size of object passed as 2nd parameter
         __read_overflow2();
         ^
      
      I can see two equally workable solutions: either we use a strncpy() instead
      of the memcpy() to stop at the end of the input, or we make the source buffer
      fixed length as well. This implements the latter.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1a91649f
    • E
      nfp: fix TLV offset calculation · 1d8ef0c0
      Edwin Peer 提交于
      The data pointer in the config space TLV parser already includes
      NFP_NET_CFG_TLV_BASE, it should not be added again. Incorrect
      offset values were only used in printed user output, rendering
      the bug merely cosmetic.
      
      Fixes: 73a0329b ("nfp: add TLV capabilities to the BAR")
      Signed-off-by: NEdwin Peer <edwin.peer@netronome.com>
      Reviewed-by: NJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1d8ef0c0
  9. 02 2月, 2018 3 次提交
  10. 01 2月, 2018 1 次提交