1. 03 2月, 2018 1 次提交
    • 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
  2. 27 1月, 2018 3 次提交
  3. 26 1月, 2018 2 次提交
  4. 25 1月, 2018 1 次提交
  5. 24 1月, 2018 3 次提交
  6. 23 1月, 2018 2 次提交
  7. 22 1月, 2018 1 次提交
  8. 20 1月, 2018 3 次提交
  9. 18 1月, 2018 1 次提交
  10. 11 1月, 2018 4 次提交
  11. 04 1月, 2018 1 次提交
  12. 03 1月, 2018 3 次提交
  13. 29 12月, 2017 2 次提交
  14. 22 12月, 2017 1 次提交
  15. 20 12月, 2017 2 次提交
  16. 19 12月, 2017 1 次提交
  17. 14 12月, 2017 1 次提交
  18. 11 12月, 2017 1 次提交
    • T
      rhashtable: Change rhashtable_walk_start to return void · 97a6ec4a
      Tom Herbert 提交于
      Most callers of rhashtable_walk_start don't care about a resize event
      which is indicated by a return value of -EAGAIN. So calls to
      rhashtable_walk_start are wrapped wih code to ignore -EAGAIN. Something
      like this is common:
      
             ret = rhashtable_walk_start(rhiter);
             if (ret && ret != -EAGAIN)
                     goto out;
      
      Since zero and -EAGAIN are the only possible return values from the
      function this check is pointless. The condition never evaluates to true.
      
      This patch changes rhashtable_walk_start to return void. This simplifies
      code for the callers that ignore -EAGAIN. For the few cases where the
      caller cares about the resize event, particularly where the table can be
      walked in mulitple parts for netlink or seq file dump, the function
      rhashtable_walk_start_check has been added that returns -EAGAIN on a
      resize event.
      Signed-off-by: NTom Herbert <tom@quantonium.net>
      Acked-by: NHerbert Xu <herbert@gondor.apana.org.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      97a6ec4a
  19. 09 12月, 2017 6 次提交
  20. 07 12月, 2017 1 次提交