1. 29 May, 2019 2 commits
  2. 28 May, 2019 3 commits
    • Thomas Pedersen's avatar
      mac80211: mesh: fix RCU warning · 55184244
      Thomas Pedersen authored
      ifmsh->csa is an RCU-protected pointer. The writer context
      in ieee80211_mesh_finish_csa() is already mutually
      exclusive with wdev->sdata.mtx, but the RCU checker did
      not know this. Use rcu_dereference_protected() to avoid a
      warning.
      
      fixes the following warning:
      
      [   12.519089] =============================
      [   12.520042] WARNING: suspicious RCU usage
      [   12.520652] 5.1.0-rc7-wt+ #16 Tainted: G        W
      [   12.521409] -----------------------------
      [   12.521972] net/mac80211/mesh.c:1223 suspicious rcu_dereference_check() usage!
      [   12.522928] other info that might help us debug this:
      [   12.523984] rcu_scheduler_active = 2, debug_locks = 1
      [   12.524855] 5 locks held by kworker/u8:2/152:
      [   12.525438]  #0: 00000000057be08c ((wq_completion)phy0){+.+.}, at: process_one_work+0x1a2/0x620
      [   12.526607]  #1: 0000000059c6b07a ((work_completion)(&sdata->csa_finalize_work)){+.+.}, at: process_one_work+0x1a2/0x620
      [   12.528001]  #2: 00000000f184ba7d (&wdev->mtx){+.+.}, at: ieee80211_csa_finalize_work+0x2f/0x90
      [   12.529116]  #3: 00000000831a1f54 (&local->mtx){+.+.}, at: ieee80211_csa_finalize_work+0x47/0x90
      [   12.530233]  #4: 00000000fd06f988 (&local->chanctx_mtx){+.+.}, at: ieee80211_csa_finalize_work+0x51/0x90
      Signed-off-by: default avatarThomas Pedersen <thomas@eero.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      55184244
    • Andy Strohman's avatar
      nl80211: fix station_info pertid memory leak · f77bf486
      Andy Strohman authored
      When dumping stations, memory allocated for station_info's
      pertid member will leak if the nl80211 header cannot be added to
      the sk_buff due to insufficient tail room.
      
      I noticed this leak in the kmalloc-2048 cache.
      
      Cc: stable@vger.kernel.org
      Fixes: 8689c051 ("cfg80211: dynamically allocate per-tid stats for station info")
      Signed-off-by: default avatarAndy Strohman <andy@uplevelsystems.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f77bf486
    • Jouni Malinen's avatar
      mac80211: Do not use stack memory with scatterlist for GMAC · a71fd9da
      Jouni Malinen authored
      ieee80211_aes_gmac() uses the mic argument directly in sg_set_buf() and
      that does not allow use of stack memory (e.g., BUG_ON() is hit in
      sg_set_buf() with CONFIG_DEBUG_SG). BIP GMAC TX side is fine for this
      since it can use the skb data buffer, but the RX side was using a stack
      variable for deriving the local MIC value to compare against the
      received one.
      
      Fix this by allocating heap memory for the mic buffer.
      
      This was found with hwsim test case ap_cipher_bip_gmac_128 hitting that
      BUG_ON() and kernel panic.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarJouni Malinen <j@w1.fi>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      a71fd9da
  3. 24 May, 2019 5 commits
    • Manikanta Pubbisetty's avatar
      {nl,mac}80211: allow 4addr AP operation on crypto controlled devices · 33d915d9
      Manikanta Pubbisetty authored
      As per the current design, in the case of sw crypto controlled devices,
      it is the device which advertises the support for AP/VLAN iftype based
      on it's ability to tranmsit packets encrypted in software
      (In VLAN functionality, group traffic generated for a specific
      VLAN group is always encrypted in software). Commit db3bdcb9
      ("mac80211: allow AP_VLAN operation on crypto controlled devices")
      has introduced this change.
      
      Since 4addr AP operation also uses AP/VLAN iftype, this conditional
      way of advertising AP/VLAN support has broken 4addr AP mode operation on
      crypto controlled devices which do not support VLAN functionality.
      
      In the case of ath10k driver, not all firmwares have support for VLAN
      functionality but all can support 4addr AP operation. Because AP/VLAN
      support is not advertised for these devices, 4addr AP operations are
      also blocked.
      
      Fix this by allowing 4addr operation on devices which do not support
      AP/VLAN iftype but can support 4addr AP operation (decision is based on
      the wiphy flag WIPHY_FLAG_4ADDR_AP).
      
      Cc: stable@vger.kernel.org
      Fixes: db3bdcb9 ("mac80211: allow AP_VLAN operation on crypto controlled devices")
      Signed-off-by: default avatarManikanta Pubbisetty <mpubbise@codeaurora.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      33d915d9
    • Gustavo A. R. Silva's avatar
      mac80211_hwsim: mark expected switch fall-through · 85a55ff2
      Gustavo A. R. Silva authored
      In preparation to enabling -Wimplicit-fallthrough, mark switch
      cases where we are expecting to fall through.
      
      This patch fixes the following warning:
      
      drivers/net/wireless/mac80211_hwsim.c: In function ‘init_mac80211_hwsim’:
      drivers/net/wireless/mac80211_hwsim.c:3853:21: warning: this statement may fall through [-Wimplicit-fallthrough=]
          param.reg_strict = true;
          ~~~~~~~~~~~~~~~~~^~~~~~
      drivers/net/wireless/mac80211_hwsim.c:3854:3: note: here
         case HWSIM_REGTEST_DRIVER_REG_ALL:
         ^~~~
      
      Warning level 3 was used: -Wimplicit-fallthrough=3
      
      This patch is part of the ongoing efforts to enable
      -Wimplicit-fallthrough.
      Signed-off-by: default avatarGustavo A. R. Silva <gustavo@embeddedor.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      85a55ff2
    • John Crispin's avatar
      mac80211: fix rate reporting inside cfg80211_calculate_bitrate_he() · 25d16d12
      John Crispin authored
      The reported rate is not scaled down correctly. After applying this patch,
      the function will behave just like the v/ht equivalents.
      Signed-off-by: default avatarShashidhar Lakkavalli <slakkavalli@datto.com>
      Signed-off-by: default avatarJohn Crispin <john@phrozen.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      25d16d12
    • YueHaibing's avatar
      mac80211: remove set but not used variable 'old' · 818e9dfa
      YueHaibing authored
      Fixes gcc '-Wunused-but-set-variable' warning:
      
      net/mac80211/key.c: In function 'ieee80211_set_tx_key':
      net/mac80211/key.c:271:24: warning:
       variable 'old' set but not used [-Wunused-but-set-variable]
      
      It is not used since introduction in
      commit 96fc6efb ("mac80211: IEEE 802.11 Extended Key ID support")
      Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      818e9dfa
    • Yu Wang's avatar
      mac80211: handle deauthentication/disassociation from TDLS peer · 79c92ca4
      Yu Wang authored
      When receiving a deauthentication/disassociation frame from a TDLS
      peer, a station should not disconnect the current AP, but only
      disable the current TDLS link if it's enabled.
      
      Without this change, a TDLS issue can be reproduced by following the
      steps as below:
      
      1. STA-1 and STA-2 are connected to AP, bidirection traffic is running
         between STA-1 and STA-2.
      2. Set up TDLS link between STA-1 and STA-2, stay for a while, then
         teardown TDLS link.
      3. Repeat step #2 and monitor the connection between STA and AP.
      
      During the test, one STA may send a deauthentication/disassociation
      frame to another, after TDLS teardown, with reason code 6/7, which
      means: Class 2/3 frame received from nonassociated STA.
      
      On receive this frame, the receiver STA will disconnect the current
      AP and then reconnect. It's not a expected behavior, purpose of this
      frame should be disabling the TDLS link, not the link with AP.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarYu Wang <yyuwang@codeaurora.org>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      79c92ca4
  4. 14 May, 2019 1 commit
  5. 13 May, 2019 21 commits
    • Linus Torvalds's avatar
      Merge tag 'gcc-plugins-v5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/kees/linux · 63863ee8
      Linus Torvalds authored
      Pull gcc plugin fix from Kees Cook:
       "Fix ARM stack-protector-per-task plugin build for older GCC < 6 (Chris
        Packham)"
      
      * tag 'gcc-plugins-v5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/kees/linux:
        gcc-plugins: arm_ssp_per_task_plugin: Fix for older GCC < 6
      63863ee8
    • Tobin C. Harding's avatar
      gfs2: Fix error path kobject memory leak · fbcde197
      Tobin C. Harding authored
      If a call to kobject_init_and_add() fails we must call kobject_put()
      otherwise we leak memory.
      
      Function gfs2_sys_fs_add always calls kobject_init_and_add() which
      always calls kobject_init().
      
      It is safe to leave object destruction up to the kobject release
      function and never free it manually.
      
      Remove call to kfree() and always call kobject_put() in the error path.
      Signed-off-by: default avatarTobin C. Harding <tobin@kernel.org>
      Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      fbcde197
    • Linus Torvalds's avatar
      Merge branch 'for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu · 3aff5fac
      Linus Torvalds authored
      Pull percpu updates from Dennis Zhou:
      
       - scan hint update which helps address performance issues with heavily
         fragmented blocks
      
       - lockdep fix when freeing an allocation causes balance work to be
         scheduled
      
      * 'for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu:
        percpu: remove spurious lock dependency between percpu and sched
        percpu: use chunk scan_hint to skip some scanning
        percpu: convert chunk hints to be based on pcpu_block_md
        percpu: make pcpu_block_md generic
        percpu: use block scan_hint to only scan forward
        percpu: remember largest area skipped during allocation
        percpu: add block level scan_hint
        percpu: set PCPU_BITMAP_BLOCK_SIZE to PAGE_SIZE
        percpu: relegate chunks unusable when failing small allocations
        percpu: manage chunks based on contig_bits instead of free_bytes
        percpu: introduce helper to determine if two regions overlap
        percpu: do not search past bitmap when allocating an area
        percpu: update free path with correct new free region
      3aff5fac
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 0aed4b28
      Linus Torvalds authored
      Pull input updates from Dmitry Torokhov:
       "A few new drivers:
      
         - driver for Azoteq IQS550/572/525 touch controllers
      
         - driver for Microchip AT42QT1050 keys
      
         - driver for GPIO controllable vibrators
      
         - support for GT5663 in Goodix driver
      
        ... along with miscellaneous driver fixes"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Input: libps2 - mark expected switch fall-through
        Input: qt1050 - add Microchip AT42QT1050 support
        Input: add support for Azoteq IQS550/572/525
        Input: add a driver for GPIO controllable vibrators
        Input: synaptics-rmi4 - fix enum_fmt
        Input: synaptics-rmi4 - fill initial format
        HID: input: add mapping for KEY_KBD_LAYOUT_NEXT
        Input: add KEY_KBD_LAYOUT_NEXT
        Input: hyperv-keyboard - add module description
        Input: olpc_apsp - depend on ARCH_MMP
        Input: sun4i-a10-lradc-keys - add support for A83T
        Input: snvs_pwrkey - use dev_pm_set_wake_irq() to simplify code
        Input: lpc32xx-key - add clocks property and fix DT binding example
        Input: i8042 - signal wakeup from atkbd/psmouse
        Input: goodix - add GT5663 CTP support
        Input: goodix - add regulators suppot
        Input: evdev - use struct_size() in kzalloc() and vzalloc()
        Input: edt-ft5x06 - convert to use SPDX identifier
        Input: edt-ft5x06 - enable ACPI enumeration
      0aed4b28
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · a3958f5e
      Linus Torvalds authored
      Pull networking fixes from David Miller:
       "Fixes all over:
      
         1) Netdev refcnt leak in nf_flow_table, from Taehee Yoo.
      
         2) Fix RCU usage in nf_tables, from Florian Westphal.
      
         3) Fix DSA build when NET_DSA_TAG_BRCM_PREPEND is not set, from Yue
            Haibing.
      
         4) Add missing page read/write ops to realtek driver, from Heiner
            Kallweit.
      
         5) Endianness fix in qrtr code, from Nicholas Mc Guire.
      
         6) Fix various bugs in DSA_SKB_* macros, from Vladimir Oltean.
      
         7) Several BPF documentation cures, from Quentin Monnet.
      
         8) Fix undefined behavior in narrow load handling of BPF verifier,
            from Krzesimir Nowak.
      
         9) DMA ops crash in SGI Seeq driver due to not set netdev parent
            device pointer, from Thomas Bogendoerfer.
      
        10) Flow dissector has to disable preemption when invoking BPF
            program, from Eric Dumazet"
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (48 commits)
        net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering
        net: ethernet: ti: netcp_ethss: fix build
        flow_dissector: disable preemption around BPF calls
        bonding: fix arp_validate toggling in active-backup mode
        net: meson: fixup g12a glue ephy id
        net: phy: realtek: Replace phy functions with non-locked version in rtl8211e_config_init()
        net: seeq: fix crash caused by not set dev.parent
        of_net: Fix missing of_find_device_by_node ref count drop
        net: mvpp2: cls: Add missing NETIF_F_NTUPLE flag
        bpf: fix undefined behavior in narrow load handling
        libbpf: detect supported kernel BTF features and sanitize BTF
        selftests: bpf: Add files generated after build to .gitignore
        tools: bpf: synchronise BPF UAPI header with tools
        bpf: fix minor issues in documentation for BPF helpers.
        bpf: fix recurring typo in documentation for BPF helpers
        bpf: fix script for generating man page on BPF helpers
        bpf: add various test cases for backward jumps
        net: dccp : proto: remove Unneeded variable "err"
        net: dsa: Remove the now unused DSA_SKB_CB_COPY() macro
        net: dsa: Remove dangerous DSA_SKB_CLONE() macro
        ...
      a3958f5e
    • Linus Torvalds's avatar
      Merge tag 'fsnotify_for_v5.2-rc1' of... · d4c60811
      Linus Torvalds authored
      Merge tag 'fsnotify_for_v5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
      
      Pull fsnotify fixes from Jan Kara:
       "Two fsnotify fixes"
      
      * tag 'fsnotify_for_v5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        fsnotify: fix unlink performance regression
        fsnotify: Clarify connector assignment in fsnotify_add_mark_list()
      d4c60811
    • Linus Torvalds's avatar
      Merge tag 'fs_for_v5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs · 29c079ca
      Linus Torvalds authored
      Pull misc filesystem updates from Jan Kara:
       "A couple of small bugfixes and cleanups for quota, udf, ext2, and
        reiserfs"
      
      * tag 'fs_for_v5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs:
        quota: check time limit when back out space/inode change
        fs/quota: erase unused but set variable warning
        quota: fix wrong indentation
        udf: fix an uninitialized read bug and remove dead code
        fs/reiserfs/journal.c: Make remove_journal_hash static
        quota: remove trailing whitespaces
        quota: code cleanup for __dquot_alloc_space()
        ext2: Adjust the comment of function ext2_alloc_branch
        udf: Explain handling of load_nls() failure
      29c079ca
    • Corentin Labbe's avatar
      net: ethernet: stmmac: dwmac-sun8i: enable support of unicast filtering · d4c26eb6
      Corentin Labbe authored
      When adding more MAC addresses to a dwmac-sun8i interface, the device goes
      directly in promiscuous mode.
      This is due to IFF_UNICAST_FLT missing flag.
      
      So since the hardware support unicast filtering, let's add IFF_UNICAST_FLT.
      
      Fixes: 9f93ac8d ("net-next: stmmac: Add dwmac-sun8i")
      Signed-off-by: default avatarCorentin Labbe <clabbe@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d4c26eb6
    • Grygorii Strashko's avatar
      net: ethernet: ti: netcp_ethss: fix build · a8577e13
      Grygorii Strashko authored
      Fix reported build fail:
      ERROR: "cpsw_ale_flush_multicast" [drivers/net/ethernet/ti/keystone_netcp_ethss.ko] undefined!
      ERROR: "cpsw_ale_create" [drivers/net/ethernet/ti/keystone_netcp_ethss.ko] undefined!
      ERROR: "cpsw_ale_add_vlan" [drivers/net/ethernet/ti/keystone_netcp_ethss.ko] undefined!
      
      Fixes: 16f54164 ("net: ethernet: ti: cpsw: drop CONFIG_TI_CPSW_ALE config option")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Signed-off-by: default avatarGrygorii Strashko <grygorii.strashko@ti.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a8577e13
    • Eric Dumazet's avatar
      flow_dissector: disable preemption around BPF calls · b1c17a9a
      Eric Dumazet authored
      Various things in eBPF really require us to disable preemption
      before running an eBPF program.
      
      syzbot reported :
      
      BUG: assuming atomic context at net/core/flow_dissector.c:737
      in_atomic(): 0, irqs_disabled(): 0, pid: 24710, name: syz-executor.3
      2 locks held by syz-executor.3/24710:
       #0: 00000000e81a4bf1 (&tfile->napi_mutex){+.+.}, at: tun_get_user+0x168e/0x3ff0 drivers/net/tun.c:1850
       #1: 00000000254afebd (rcu_read_lock){....}, at: __skb_flow_dissect+0x1e1/0x4bb0 net/core/flow_dissector.c:822
      CPU: 1 PID: 24710 Comm: syz-executor.3 Not tainted 5.1.0+ #6
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
      Call Trace:
       __dump_stack lib/dump_stack.c:77 [inline]
       dump_stack+0x172/0x1f0 lib/dump_stack.c:113
       __cant_sleep kernel/sched/core.c:6165 [inline]
       __cant_sleep.cold+0xa3/0xbb kernel/sched/core.c:6142
       bpf_flow_dissect+0xfe/0x390 net/core/flow_dissector.c:737
       __skb_flow_dissect+0x362/0x4bb0 net/core/flow_dissector.c:853
       skb_flow_dissect_flow_keys_basic include/linux/skbuff.h:1322 [inline]
       skb_probe_transport_header include/linux/skbuff.h:2500 [inline]
       skb_probe_transport_header include/linux/skbuff.h:2493 [inline]
       tun_get_user+0x2cfe/0x3ff0 drivers/net/tun.c:1940
       tun_chr_write_iter+0xbd/0x156 drivers/net/tun.c:2037
       call_write_iter include/linux/fs.h:1872 [inline]
       do_iter_readv_writev+0x5fd/0x900 fs/read_write.c:693
       do_iter_write fs/read_write.c:970 [inline]
       do_iter_write+0x184/0x610 fs/read_write.c:951
       vfs_writev+0x1b3/0x2f0 fs/read_write.c:1015
       do_writev+0x15b/0x330 fs/read_write.c:1058
       __do_sys_writev fs/read_write.c:1131 [inline]
       __se_sys_writev fs/read_write.c:1128 [inline]
       __x64_sys_writev+0x75/0xb0 fs/read_write.c:1128
       do_syscall_64+0x103/0x670 arch/x86/entry/common.c:298
       entry_SYSCALL_64_after_hwframe+0x49/0xbe
      
      Fixes: d58e468b ("flow_dissector: implements flow dissector BPF hook")
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarsyzbot <syzkaller@googlegroups.com>
      Cc: Petar Penkov <ppenkov@google.com>
      Cc: Stanislav Fomichev <sdf@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b1c17a9a
    • Jarod Wilson's avatar
      bonding: fix arp_validate toggling in active-backup mode · a9b8a2b3
      Jarod Wilson authored
      There's currently a problem with toggling arp_validate on and off with an
      active-backup bond. At the moment, you can start up a bond, like so:
      
      modprobe bonding mode=1 arp_interval=100 arp_validate=0 arp_ip_targets=192.168.1.1
      ip link set bond0 down
      echo "ens4f0" > /sys/class/net/bond0/bonding/slaves
      echo "ens4f1" > /sys/class/net/bond0/bonding/slaves
      ip link set bond0 up
      ip addr add 192.168.1.2/24 dev bond0
      
      Pings to 192.168.1.1 work just fine. Now turn on arp_validate:
      
      echo 1 > /sys/class/net/bond0/bonding/arp_validate
      
      Pings to 192.168.1.1 continue to work just fine. Now when you go to turn
      arp_validate off again, the link falls flat on it's face:
      
      echo 0 > /sys/class/net/bond0/bonding/arp_validate
      dmesg
      ...
      [133191.911987] bond0: Setting arp_validate to none (0)
      [133194.257793] bond0: bond_should_notify_peers: slave ens4f0
      [133194.258031] bond0: link status definitely down for interface ens4f0, disabling it
      [133194.259000] bond0: making interface ens4f1 the new active one
      [133197.330130] bond0: link status definitely down for interface ens4f1, disabling it
      [133197.331191] bond0: now running without any active interface!
      
      The problem lies in bond_options.c, where passing in arp_validate=0
      results in bond->recv_probe getting set to NULL. This flies directly in
      the face of commit 3fe68df9, which says we need to set recv_probe =
      bond_arp_recv, even if we're not using arp_validate. Said commit fixed
      this in bond_option_arp_interval_set, but missed that we can get to that
      same state in bond_option_arp_validate_set as well.
      
      One solution would be to universally set recv_probe = bond_arp_recv here
      as well, but I don't think bond_option_arp_validate_set has any business
      touching recv_probe at all, and that should be left to the arp_interval
      code, so we can just make things much tidier here.
      
      Fixes: 3fe68df9 ("bonding: always set recv_probe to bond_arp_rcv in arp monitor")
      CC: Jay Vosburgh <j.vosburgh@gmail.com>
      CC: Veaceslav Falico <vfalico@gmail.com>
      CC: Andy Gospodarek <andy@greyhouse.net>
      CC: "David S. Miller" <davem@davemloft.net>
      CC: netdev@vger.kernel.org
      Signed-off-by: default avatarJarod Wilson <jarod@redhat.com>
      Signed-off-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a9b8a2b3
    • Jerome Brunet's avatar
      net: meson: fixup g12a glue ephy id · 0ecfc7e1
      Jerome Brunet authored
      The phy id chosen by Amlogic is incorrectly set in the mdio mux and
      does not match the phy driver.
      
      It was not detected before because DT forces the use the correct driver
      for the internal PHY.
      
      Fixes: 70904251 ("net: phy: add amlogic g12a mdio mux support")
      Reported-by: default avatarQi Duan <qi.duan@amlogic.com>
      Signed-off-by: default avatarJerome Brunet <jbrunet@baylibre.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ecfc7e1
    • Kunihiko Hayashi's avatar
      net: phy: realtek: Replace phy functions with non-locked version in rtl8211e_config_init() · dffe7d2e
      Kunihiko Hayashi authored
      After calling phy_select_page() and until calling phy_restore_page(),
      the mutex 'mdio_lock' is already locked, so the driver should use
      non-locked version of phy functions. Or there will be a deadlock with
      'mdio_lock'.
      
      This replaces phy functions called from rtl8211e_config_init() to avoid
      the deadlock issue.
      
      Fixes: f81dadbc ("net: phy: realtek: Add rtl8211e rx/tx delays config")
      Signed-off-by: default avatarKunihiko Hayashi <hayashi.kunihiko@socionext.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dffe7d2e
    • Thomas Bogendoerfer's avatar
      net: seeq: fix crash caused by not set dev.parent · 5afcd14c
      Thomas Bogendoerfer authored
      The old MIPS implementation of dma_cache_sync() didn't use the dev argument,
      but commit c9eb6172 ("dma-mapping: turn dma_cache_sync into a
      dma_map_ops method") changed that, so we now need to set dev.parent.
      Signed-off-by: default avatarThomas Bogendoerfer <tbogendoerfer@suse.de>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5afcd14c
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf · 3ebb41bf
      David S. Miller authored
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter fixes for net
      
      The following patchset contains Netfilter fixes for net:
      
      1) Postpone chain policy update to drop after transaction is complete,
         from Florian Westphal.
      
      2) Add entry to flowtable after confirmation to fix UDP flows with
         packets going in one single direction.
      
      3) Reference count leak in dst object, from Taehee Yoo.
      
      4) Check for TTL field in flowtable datapath, from Taehee Yoo.
      
      5) Fix h323 conntrack helper due to incorrect boundary check,
         from Jakub Jankowski.
      
      6) Fix incorrect rcu dereference when fetching basechain stats,
         from Florian Westphal.
      
      7) Missing error check when adding new entries to flowtable,
         from Taehee Yoo.
      
      8) Use version field in nfnetlink message to honor the nfgen_family
         field, from Kristian Evensen.
      
      9) Remove incorrect configuration check for CONFIG_NF_CONNTRACK_IPV6,
         from Subash Abhinov Kasiviswanathan.
      
      10) Prevent dying entries from being added to the flowtable,
          from Taehee Yoo.
      
      11) Don't hit WARN_ON() with malformed blob in ebtables with
          trailing data after last rule, reported by syzbot, patch
          from Florian Westphal.
      
      12) Remove NFT_CT_TIMEOUT enumeration, never used in the kernel
          code.
      
      13) Fix incorrect definition for NFT_LOGLEVEL_MAX, from Florian
          Westphal.
      
      This batch comes with a conflict that can be fixed with this patch:
      
      diff --cc include/uapi/linux/netfilter/nf_tables.h
      index 7bdb234f3d8c,f0cf7b0f4f35..505393c6e959
      --- a/include/uapi/linux/netfilter/nf_tables.h
      +++ b/include/uapi/linux/netfilter/nf_tables.h
      @@@ -966,6 -966,8 +966,7 @@@ enum nft_socket_keys
         * @NFT_CT_DST_IP: conntrack layer 3 protocol destination (IPv4 address)
         * @NFT_CT_SRC_IP6: conntrack layer 3 protocol source (IPv6 address)
         * @NFT_CT_DST_IP6: conntrack layer 3 protocol destination (IPv6 address)
       - * @NFT_CT_TIMEOUT: connection tracking timeout policy assigned to conntrack
      +  * @NFT_CT_ID: conntrack id
         */
        enum nft_ct_keys {
        	NFT_CT_STATE,
      @@@ -991,6 -993,8 +992,7 @@@
        	NFT_CT_DST_IP,
        	NFT_CT_SRC_IP6,
        	NFT_CT_DST_IP6,
       -	NFT_CT_TIMEOUT,
      + 	NFT_CT_ID,
        	__NFT_CT_MAX
        };
        #define NFT_CT_MAX		(__NFT_CT_MAX - 1)
      
      That replaces the unused NFT_CT_TIMEOUT definition by NFT_CT_ID. If you prefer,
      I can also solve this conflict here, just let me know.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3ebb41bf
    • Petr Štetiar's avatar
      of_net: Fix missing of_find_device_by_node ref count drop · 3ee9ae74
      Petr Štetiar authored
      of_find_device_by_node takes a reference to the embedded struct device
      which needs to be dropped after use.
      
      Fixes: d01f449c ("of_net: add NVMEM support to of_get_mac_address")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Reported-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarPetr Štetiar <ynezz@true.cz>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3ee9ae74
    • Maxime Chevallier's avatar
      net: mvpp2: cls: Add missing NETIF_F_NTUPLE flag · da86f59f
      Maxime Chevallier authored
      Now that the mvpp2 driver supports classification offloading, we must
      add the NETIF_F_NTUPLE to the features list.
      
      Since the current code doesn't allow disabling the feature, we don't set
      the flag in dev->hw_features.
      
      Fixes: 90b509b3 ("net: mvpp2: cls: Add Classification offload support")
      Reported-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Acked-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
      Signed-off-by: default avatarMaxime Chevallier <maxime.chevallier@bootlin.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      da86f59f
    • Linus Torvalds's avatar
      Merge tag 'iommu-updates-v5.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/joro/iommu · a13f0655
      Linus Torvalds authored
      Pull IOMMU updates from Joerg Roedel:
      
       - ATS support for ARM-SMMU-v3.
      
       - AUX domain support in the IOMMU-API and the Intel VT-d driver. This
         adds support for multiple DMA address spaces per (PCI-)device. The
         use-case is to multiplex devices between host and KVM guests in a
         more flexible way than supported by SR-IOV.
      
       - the rest are smaller cleanups and fixes, two of which needed to be
         reverted after testing in linux-next.
      
      * tag 'iommu-updates-v5.2' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/joro/iommu: (45 commits)
        Revert "iommu/amd: Flush not present cache in iommu_map_page"
        Revert "iommu/amd: Remove the leftover of bypass support"
        iommu/vt-d: Fix leak in intel_pasid_alloc_table on error path
        iommu/vt-d: Make kernel parameter igfx_off work with vIOMMU
        iommu/vt-d: Set intel_iommu_gfx_mapped correctly
        iommu/amd: Flush not present cache in iommu_map_page
        iommu/vt-d: Cleanup: no spaces at the start of a line
        iommu/vt-d: Don't request page request irq under dmar_global_lock
        iommu/vt-d: Use struct_size() helper
        iommu/mediatek: Fix leaked of_node references
        iommu/amd: Remove amd_iommu_pd_list
        iommu/arm-smmu: Log CBFRSYNRA register on context fault
        iommu/arm-smmu-v3: Don't disable SMMU in kdump kernel
        iommu/arm-smmu-v3: Disable tagged pointers
        iommu/arm-smmu-v3: Add support for PCI ATS
        iommu/arm-smmu-v3: Link domains and devices
        iommu/arm-smmu-v3: Add a master->domain pointer
        iommu/arm-smmu-v3: Store SteamIDs in master
        iommu/arm-smmu-v3: Rename arm_smmu_master_data to arm_smmu_master
        ACPI/IORT: Check ATS capability in root complex nodes
        ...
      a13f0655
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-5.2-rc1' of git://www.linux-watchdog.org/linux-watchdog · 55472bae
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - a new watchdog driver for the ROHM BD70528 watchdog block
      
       - a new watchdog driver for the i.MX system controller watchdog
      
       - conversions to use device managed functions and other improvements
      
       - refactor watchdog_init_timeout
      
       - make watchdog core configurable as module
      
       - pretimeout governors improvements
      
       - a lot of other fixes
      
      * tag 'linux-watchdog-5.2-rc1' of git://www.linux-watchdog.org/linux-watchdog: (114 commits)
        watchdog: Enforce that at least one pretimeout governor is enabled
        watchdog: stm32: add dynamic prescaler support
        watchdog: Improve Kconfig entry ordering and dependencies
        watchdog: npcm: Enable modular builds
        watchdog: Make watchdog core configurable as module
        watchdog: Move pretimeout governor configuration up
        watchdog: Use depends instead of select for pretimeout governors
        watchdog: rtd119x: drop unused module.h include
        watchdog: intel_scu: make it explicitly non-modular
        watchdog: coh901327: make it explicitly non-modular
        watchdog: ziirave_wdt: drop warning after calling watchdog_init_timeout
        watchdog: xen_wdt: drop warning after calling watchdog_init_timeout
        watchdog: stm32_iwdg: drop warning after calling watchdog_init_timeout
        watchdog: st_lpc_wdt: drop warning after calling watchdog_init_timeout
        watchdog: sp5100_tco: drop warning after calling watchdog_init_timeout
        watchdog: renesas_wdt: drop warning after calling watchdog_init_timeout
        watchdog: nic7018_wdt: drop warning after calling watchdog_init_timeout
        watchdog: ni903x_wdt: drop warning after calling watchdog_init_timeout
        watchdog: imx_sc_wdt: drop warning after calling watchdog_init_timeout
        watchdog: i6300esb: drop warning after calling watchdog_init_timeout
        ...
      55472bae
    • David S. Miller's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 69dda13f
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2019-05-13
      
      The following pull-request contains BPF updates for your *net* tree.
      
      The main changes are:
      
      1) Fix out of bounds backwards jumps due to a bug in dead code
         removal, from Daniel.
      
      2) Fix libbpf users by detecting unsupported BTF kernel features
         and sanitize them before load, from Andrii.
      
      3) Fix undefined behavior in narrow load handling of context
         fields, from Krzesimir.
      
      4) Various BPF uapi header doc/man page fixes, from Quentin.
      
      5) Misc .gitignore fixups to exclude built files, from Kelsey.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      69dda13f
    • Krzesimir Nowak's avatar
      bpf: fix undefined behavior in narrow load handling · e2f7fc0a
      Krzesimir Nowak authored
      Commit 31fd8581 ("bpf: permits narrower load from bpf program
      context fields") made the verifier add AND instructions to clear the
      unwanted bits with a mask when doing a narrow load. The mask is
      computed with
      
        (1 << size * 8) - 1
      
      where "size" is the size of the narrow load. When doing a 4 byte load
      of a an 8 byte field the verifier shifts the literal 1 by 32 places to
      the left. This results in an overflow of a signed integer, which is an
      undefined behavior. Typically, the computed mask was zero, so the
      result of the narrow load ended up being zero too.
      
      Cast the literal to long long to avoid overflows. Note that narrow
      load of the 4 byte fields does not have the undefined behavior,
      because the load size can only be either 1 or 2 bytes, so shifting 1
      by 8 or 16 places will not overflow it. And reading 4 bytes would not
      be a narrow load of a 4 bytes field.
      
      Fixes: 31fd8581 ("bpf: permits narrower load from bpf program context fields")
      Reviewed-by: default avatarAlban Crequy <alban@kinvolk.io>
      Reviewed-by: default avatarIago López Galeiras <iago@kinvolk.io>
      Signed-off-by: default avatarKrzesimir Nowak <krzesimir@kinvolk.io>
      Cc: Yonghong Song <yhs@fb.com>
      Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
      e2f7fc0a
  6. 12 May, 2019 8 commits