1. 05 Sep, 2018 5 commits
    • Bernd Edlinger's avatar
      nl80211: Add a missing break in parse_station_flags · 4fd08972
      Bernd Edlinger authored
      [ Upstream commit 5cf3006c ]
      
      I was looking at usually suppressed gcc warnings,
      [-Wimplicit-fallthrough=] in this case:
      
      The code definitely looks like a break is missing here.
      However I am not able to test the NL80211_IFTYPE_MESH_POINT,
      nor do I actually know what might be :)
      So please use this patch with caution and only if you are
      able to do some testing.
      Signed-off-by: default avatarBernd Edlinger <bernd.edlinger@hotmail.de>
      [johannes: looks obvious enough to apply as is, interesting
       though that it never seems to have been a problem]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      4fd08972
    • mpubbise@codeaurora.org's avatar
      mac80211: add stations tied to AP_VLANs during hw reconfig · f1ddbb19
      mpubbise@codeaurora.org authored
      [ Upstream commit 19103a4b ]
      
      As part of hw reconfig, only stations linked to AP interfaces are added
      back to the driver ignoring those which are tied to AP_VLAN interfaces.
      
      It is true that there could be stations tied to the AP_VLAN interface while
      serving 4addr clients or when using AP_VLAN for VLAN operations; we should
      be adding these stations back to the driver as part of hw reconfig, failing
      to do so can cause functional issues.
      
      In the case of ath10k driver, the following errors were observed.
      
      ath10k_pci : failed to install key for non-existent peer XX:XX:XX:XX:XX:XX
      Workqueue: events_freezable ieee80211_restart_work [mac80211]
      (unwind_backtrace) from (show_stack+0x10/0x14)
      (show_stack) (dump_stack+0x80/0xa0)
      (dump_stack) (warn_slowpath_common+0x68/0x8c)
      (warn_slowpath_common) (warn_slowpath_null+0x18/0x20)
      (warn_slowpath_null) (ieee80211_enable_keys+0x88/0x154 [mac80211])
      (ieee80211_enable_keys) (ieee80211_reconfig+0xc90/0x19c8 [mac80211])
      (ieee80211_reconfig]) (ieee80211_restart_work+0x8c/0xa0 [mac80211])
      (ieee80211_restart_work) (process_one_work+0x284/0x488)
      (process_one_work) (worker_thread+0x228/0x360)
      (worker_thread) (kthread+0xd8/0xec)
      (kthread) (ret_from_fork+0x14/0x24)
      
      Also while bringing down the AP VAP, WARN_ONs and errors related to peer
      removal were observed.
      
      ath10k_pci : failed to clear all peer wep keys for vdev 0: -2
      ath10k_pci : failed to disassociate station: 8c:fd:f0:0a:8c:f5 vdev 0: -2
      (unwind_backtrace) (show_stack+0x10/0x14)
      (show_stack) (dump_stack+0x80/0xa0)
      (dump_stack) (warn_slowpath_common+0x68/0x8c)
      (warn_slowpath_common) (warn_slowpath_null+0x18/0x20)
      (warn_slowpath_null) (sta_set_sinfo+0xb98/0xc9c [mac80211])
      (sta_set_sinfo [mac80211]) (__sta_info_flush+0xf0/0x134 [mac80211])
      (__sta_info_flush [mac80211]) (ieee80211_stop_ap+0xe8/0x390 [mac80211])
      (ieee80211_stop_ap [mac80211]) (__cfg80211_stop_ap+0xe0/0x3dc [cfg80211])
      (__cfg80211_stop_ap [cfg80211]) (cfg80211_stop_ap+0x30/0x44 [cfg80211])
      (cfg80211_stop_ap [cfg80211]) (genl_rcv_msg+0x274/0x30c)
      (genl_rcv_msg) (netlink_rcv_skb+0x58/0xac)
      (netlink_rcv_skb) (genl_rcv+0x20/0x34)
      (genl_rcv) (netlink_unicast+0x11c/0x204)
      (netlink_unicast) (netlink_sendmsg+0x30c/0x370)
      (netlink_sendmsg) (sock_sendmsg+0x70/0x84)
      (sock_sendmsg) (___sys_sendmsg.part.3+0x188/0x228)
      (___sys_sendmsg.part.3) (__sys_sendmsg+0x4c/0x70)
      (__sys_sendmsg) (ret_fast_syscall+0x0/0x44)
      
      These issues got fixed by adding the stations which are
      tied to AP_VLANs back to the driver.
      Signed-off-by: default avatarManikanta Pubbisetty <mpubbise@codeaurora.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      f1ddbb19
    • Florian Westphal's avatar
      xfrm: free skb if nlsk pointer is NULL · 301a6da4
      Florian Westphal authored
      [ Upstream commit 86126b77 ]
      
      nlmsg_multicast() always frees the skb, so in case we cannot call
      it we must do that ourselves.
      
      Fixes: 21ee543e ("xfrm: fix race between netns cleanup and state expire notification")
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      301a6da4
    • Tommi Rantala's avatar
      xfrm: fix missing dst_release() after policy blocking lbcast and multicast · 590f312a
      Tommi Rantala authored
      [ Upstream commit 8cc88773 ]
      
      Fix missing dst_release() when local broadcast or multicast traffic is
      xfrm policy blocked.
      
      For IPv4 this results to dst leak: ip_route_output_flow() allocates
      dst_entry via __ip_route_output_key() and passes it to
      xfrm_lookup_route(). xfrm_lookup returns ERR_PTR(-EPERM) that is
      propagated. The dst that was allocated is never released.
      
      IPv4 local broadcast testcase:
       ping -b 192.168.1.255 &
       sleep 1
       ip xfrm policy add src 0.0.0.0/0 dst 192.168.1.255/32 dir out action block
      
      IPv4 multicast testcase:
       ping 224.0.0.1 &
       sleep 1
       ip xfrm policy add src 0.0.0.0/0 dst 224.0.0.1/32 dir out action block
      
      For IPv6 the missing dst_release() causes trouble e.g. when used in netns:
       ip netns add TEST
       ip netns exec TEST ip link set lo up
       ip link add dummy0 type dummy
       ip link set dev dummy0 netns TEST
       ip netns exec TEST ip addr add fd00::1111 dev dummy0
       ip netns exec TEST ip link set dummy0 up
       ip netns exec TEST ping -6 -c 5 ff02::1%dummy0 &
       sleep 1
       ip netns exec TEST ip xfrm policy add src ::/0 dst ff02::1 dir out action block
       wait
       ip netns del TEST
      
      After netns deletion we see:
      [  258.239097] unregister_netdevice: waiting for lo to become free. Usage count = 2
      [  268.279061] unregister_netdevice: waiting for lo to become free. Usage count = 2
      [  278.367018] unregister_netdevice: waiting for lo to become free. Usage count = 2
      [  288.375259] unregister_netdevice: waiting for lo to become free. Usage count = 2
      
      Fixes: ac37e251 ("xfrm: release dst_orig in case of error in xfrm_lookup()")
      Signed-off-by: default avatarTommi Rantala <tommi.t.rantala@nokia.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      590f312a
    • Eyal Birger's avatar
      vti6: fix PMTU caching and reporting on xmit · ce723f86
      Eyal Birger authored
      [ Upstream commit d6990976 ]
      
      When setting the skb->dst before doing the MTU check, the route PMTU
      caching and reporting is done on the new dst which is about to be
      released.
      
      Instead, PMTU handling should be done using the original dst.
      
      This is aligned with IPv4 VTI.
      
      Fixes: ccd740cb ("vti6: Add pmtu handling to vti6_xmit.")
      Signed-off-by: default avatarEyal Birger <eyal.birger@gmail.com>
      Signed-off-by: default avatarSteffen Klassert <steffen.klassert@secunet.com>
      Signed-off-by: default avatarSasha Levin <alexander.levin@microsoft.com>
      Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      ce723f86
  2. 24 Aug, 2018 35 commits