1. 13 Jun, 2017 14 commits
  2. 12 Jun, 2017 3 commits
    • Jacob Keller's avatar
      i40e: fix handling of HW ATR eviction · 6964e53f
      Jacob Keller authored
      A recent commit to refactor the driver and remove the hw_disabled_flags
      field accidentally introduced two regressions. First, we overwrote
      pf->flags which removed various key flags including the MSI-X settings.
      
      Additionally, it was intended that we have now two flags,
      HW_ATR_EVICT_CAPABLE and HW_ATR_EVICT_ENABLED, but this was not done,
      and we accidentally were mis-using HW_ATR_EVICT_CAPABLE everywhere.
      
      This patch adds the missing piece, HW_ATR_EVICT_ENABLED, and safely
      updates pf->flags instead of overwriting it.
      
      Without this patch we will have many problems including disabling MSI-X
      support, and we'll attempt to use HW ATR eviction on devices which do
      not support it.
      
      Fixes: 47994c11 ("i40e: remove hw_disabled_flags in favor of using separate flag bits", 2017-04-19)
      Signed-off-by: default avatarJacob Keller <jacob.e.keller@intel.com>
      Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6964e53f
    • Karicheri, Muralidharan's avatar
      hsr: fix incorrect warning · 675c8da0
      Karicheri, Muralidharan authored
      When HSR interface is setup using ip link command, an annoying warning
      appears with the trace as below:-
      
      [  203.019828] hsr_get_node: Non-HSR frame
      [  203.019833] Modules linked in:
      [  203.019848] CPU: 0 PID: 158 Comm: sd-resolve Tainted: G        W       4.12.0-rc3-00052-g9fa6bf70 #2
      [  203.019853] Hardware name: Generic DRA74X (Flattened Device Tree)
      [  203.019869] [<c0110280>] (unwind_backtrace) from [<c010c2f4>] (show_stack+0x10/0x14)
      [  203.019880] [<c010c2f4>] (show_stack) from [<c04b9f64>] (dump_stack+0xac/0xe0)
      [  203.019894] [<c04b9f64>] (dump_stack) from [<c01374e8>] (__warn+0xd8/0x104)
      [  203.019907] [<c01374e8>] (__warn) from [<c0137548>] (warn_slowpath_fmt+0x34/0x44)
      root@am57xx-evm:~# [  203.019921] [<c0137548>] (warn_slowpath_fmt) from [<c081126c>] (hsr_get_node+0x148/0x170)
      [  203.019932] [<c081126c>] (hsr_get_node) from [<c0814240>] (hsr_forward_skb+0x110/0x7c0)
      [  203.019942] [<c0814240>] (hsr_forward_skb) from [<c0811d64>] (hsr_dev_xmit+0x2c/0x34)
      [  203.019954] [<c0811d64>] (hsr_dev_xmit) from [<c06c0828>] (dev_hard_start_xmit+0xc4/0x3bc)
      [  203.019963] [<c06c0828>] (dev_hard_start_xmit) from [<c06c13d8>] (__dev_queue_xmit+0x7c4/0x98c)
      [  203.019974] [<c06c13d8>] (__dev_queue_xmit) from [<c0782f54>] (ip6_finish_output2+0x330/0xc1c)
      [  203.019983] [<c0782f54>] (ip6_finish_output2) from [<c0788f0c>] (ip6_output+0x58/0x454)
      [  203.019994] [<c0788f0c>] (ip6_output) from [<c07b16cc>] (mld_sendpack+0x420/0x744)
      
      As this is an expected path to hsr_get_node() with frame coming from
      the master interface, add a check to ensure packet is not from the
      master port and then warn.
      Signed-off-by: default avatarMurali Karicheri <m-karicheri2@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      675c8da0
    • Christian Perle's avatar
      proc: snmp6: Use correct type in memset · 3500cd73
      Christian Perle authored
      Reading /proc/net/snmp6 yields bogus values on 32 bit kernels.
      Use "u64" instead of "unsigned long" in sizeof().
      
      Fixes: 4a4857b1 ("proc: Reduce cache miss in snmp6_seq_show")
      Signed-off-by: default avatarChristian Perle <christian.perle@secunet.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3500cd73
  3. 11 Jun, 2017 18 commits
  4. 10 Jun, 2017 5 commits
    • David S. Miller's avatar
      Merge branch 'mvpp2-fixes' · b87fa0fa
      David S. Miller authored
      Thomas Petazzoni says:
      
      ====================
      net: mvpp2: driver fixes
      
      As requested, here is a series of patches containing only bug fixes
      for the mvpp2 driver. It is based on the latest "net" branch.
      
      Changes since v1:
      
       - Fixed a build breakage that occurred when only PATCH 1 was only,
         and not later patches in the series. Was reported by the kbuild
         report on the first submission.
      
       - Added Tested-by from Marc Zyngier on PATCH 2.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b87fa0fa
    • Thomas Petazzoni's avatar
      net: mvpp2: use {get, put}_cpu() instead of smp_processor_id() · a704bb5c
      Thomas Petazzoni authored
      smp_processor_id() should not be used in migration-enabled contexts. We
      originally thought it was OK in the specific situation of this driver,
      but it was wrong, and calling smp_processor_id() in a migration-enabled
      context prints a big fat warning when CONFIG_DEBUG_PREEMPT=y.
      
      Therefore, this commit replaces the smp_processor_id() in
      migration-enabled contexts by the appropriate get_cpu/put_cpu sections.
      Reported-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Fixes: a786841d ("net: mvpp2: handle register mapping and access for PPv2.2")
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Tested-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a704bb5c
    • Thomas Petazzoni's avatar
      net: mvpp2: remove mvpp2_bm_cookie_{build,pool_get} · 56b8aae9
      Thomas Petazzoni authored
      This commit removes the useless remove
      mvpp2_bm_cookie_{build,pool_get} functions. All what
      mvpp2_bm_cookie_build() was doing is compute a 32-bit value by
      concatenating the pool number and the CPU number... only to get the pool
      number re-extracted by mvpp2_bm_cookie_pool_get() later on.
      
      Instead, just get the pool number directly from RX descriptor status,
      and pass it to mvpp2_pool_refill() and mvpp2_rx_refill().
      
      This has the added benefit of dropping a smp_processor_id() call in a
      migration-enabled context, which is wrong, and is the original
      motivation for making this change.
      
      Fixes: 3f518509 ("ethernet: Add new driver for Marvell Armada 375 network unit")
      Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      56b8aae9
    • Jia-Ju Bai's avatar
      net: tipc: Fix a sleep-in-atomic bug in tipc_msg_reverse · 343eba69
      Jia-Ju Bai authored
      The kernel may sleep under a rcu read lock in tipc_msg_reverse, and the
      function call path is:
      tipc_l2_rcv_msg (acquire the lock by rcu_read_lock)
        tipc_rcv
          tipc_sk_rcv
            tipc_msg_reverse
              pskb_expand_head(GFP_KERNEL) --> may sleep
      tipc_node_broadcast
        tipc_node_xmit_skb
          tipc_node_xmit
            tipc_sk_rcv
              tipc_msg_reverse
                pskb_expand_head(GFP_KERNEL) --> may sleep
      
      To fix it, "GFP_KERNEL" is replaced with "GFP_ATOMIC".
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@163.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      343eba69
    • Jia-Ju Bai's avatar
      net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx · f146e872
      Jia-Ju Bai authored
      The kernel may sleep under a rcu read lock in cfpkt_create_pfx, and the
      function call path is:
      cfcnfg_linkup_rsp (acquire the lock by rcu_read_lock)
        cfctrl_linkdown_req
          cfpkt_create
            cfpkt_create_pfx
              alloc_skb(GFP_KERNEL) --> may sleep
      cfserl_receive (acquire the lock by rcu_read_lock)
        cfpkt_split
          cfpkt_create_pfx
            alloc_skb(GFP_KERNEL) --> may sleep
      
      There is "in_interrupt" in cfpkt_create_pfx to decide use "GFP_KERNEL" or
      "GFP_ATOMIC". In this situation, "GFP_KERNEL" is used because the function
      is called under a rcu read lock, instead in interrupt.
      
      To fix it, only "GFP_ATOMIC" is used in cfpkt_create_pfx.
      Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@163.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f146e872