1. 11 4月, 2019 4 次提交
    • I
      mlxsw: core: Do not use WQ_MEM_RECLAIM for mlxsw workqueue · b442fed1
      Ido Schimmel 提交于
      The workqueue is used to periodically update the networking stack about
      activity / statistics of various objects such as neighbours and TC
      actions.
      
      It should not be called as part of memory reclaim path, so remove the
      WQ_MEM_RECLAIM flag.
      
      Fixes: 3d5479e9 ("mlxsw: core: Remove deprecated create_workqueue")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b442fed1
    • I
      mlxsw: core: Do not use WQ_MEM_RECLAIM for mlxsw ordered workqueue · 4af06997
      Ido Schimmel 提交于
      The ordered workqueue is used to offload various objects such as routes
      and neighbours in the order they are notified.
      
      It should not be called as part of memory reclaim path, so remove the
      WQ_MEM_RECLAIM flag. This can also result in a warning [1], if a worker
      tries to flush a non-WQ_MEM_RECLAIM workqueue.
      
      [1]
      [97703.542861] workqueue: WQ_MEM_RECLAIM mlxsw_core_ordered:mlxsw_sp_router_fib6_event_work [mlxsw_spectrum] is flushing !WQ_MEM_RECLAIM events:rht_deferred_worker
      [97703.542884] WARNING: CPU: 1 PID: 32492 at kernel/workqueue.c:2605 check_flush_dependency+0xb5/0x130
      ...
      [97703.542988] Hardware name: Mellanox Technologies Ltd. MSN3700C/VMOD0008, BIOS 5.11 10/10/2018
      [97703.543049] Workqueue: mlxsw_core_ordered mlxsw_sp_router_fib6_event_work [mlxsw_spectrum]
      [97703.543061] RIP: 0010:check_flush_dependency+0xb5/0x130
      ...
      [97703.543071] RSP: 0018:ffffb3f08137bc00 EFLAGS: 00010086
      [97703.543076] RAX: 0000000000000000 RBX: ffff96e07740ae00 RCX: 0000000000000000
      [97703.543080] RDX: 0000000000000094 RSI: ffffffff82dc1934 RDI: 0000000000000046
      [97703.543084] RBP: ffffb3f08137bc20 R08: ffffffff82dc18a0 R09: 00000000000225c0
      [97703.543087] R10: 0000000000000000 R11: 0000000000007eec R12: ffffffff816e4ee0
      [97703.543091] R13: ffff96e06f6a5c00 R14: ffff96e077ba7700 R15: ffffffff812ab0c0
      [97703.543097] FS: 0000000000000000(0000) GS:ffff96e077a80000(0000) knlGS:0000000000000000
      [97703.543101] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [97703.543104] CR2: 00007f8cd135b280 CR3: 00000001e860e003 CR4: 00000000003606e0
      [97703.543109] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      [97703.543112] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      [97703.543115] Call Trace:
      [97703.543129] __flush_work+0xbd/0x1e0
      [97703.543137] ? __cancel_work_timer+0x136/0x1b0
      [97703.543145] ? pwq_dec_nr_in_flight+0x49/0xa0
      [97703.543154] __cancel_work_timer+0x136/0x1b0
      [97703.543175] ? mlxsw_reg_trans_bulk_wait+0x145/0x400 [mlxsw_core]
      [97703.543184] cancel_work_sync+0x10/0x20
      [97703.543191] rhashtable_free_and_destroy+0x23/0x140
      [97703.543198] rhashtable_destroy+0xd/0x10
      [97703.543254] mlxsw_sp_fib_destroy+0xb1/0xf0 [mlxsw_spectrum]
      [97703.543310] mlxsw_sp_vr_put+0xa8/0xc0 [mlxsw_spectrum]
      [97703.543364] mlxsw_sp_fib_node_put+0xbf/0x140 [mlxsw_spectrum]
      [97703.543418] ? mlxsw_sp_fib6_entry_destroy+0xe8/0x110 [mlxsw_spectrum]
      [97703.543475] mlxsw_sp_router_fib6_event_work+0x6cd/0x7f0 [mlxsw_spectrum]
      [97703.543484] process_one_work+0x1fd/0x400
      [97703.543493] worker_thread+0x34/0x410
      [97703.543500] kthread+0x121/0x140
      [97703.543507] ? process_one_work+0x400/0x400
      [97703.543512] ? kthread_park+0x90/0x90
      [97703.543523] ret_from_fork+0x35/0x40
      
      Fixes: a3832b31 ("mlxsw: core: Create an ordered workqueue for FIB offload")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reported-by: NSemion Lisyansky <semionl@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4af06997
    • I
      mlxsw: core: Do not use WQ_MEM_RECLAIM for EMAD workqueue · a8c133b0
      Ido Schimmel 提交于
      The EMAD workqueue is used to handle retransmission of EMAD packets that
      contain configuration data for the device's firmware.
      
      Given the workers need to allocate these packets and that the code is
      not called as part of memory reclaim path, remove the WQ_MEM_RECLAIM
      flag.
      
      Fixes: d965465b ("mlxsw: core: Fix possible deadlock")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a8c133b0
    • I
      mlxsw: spectrum_switchdev: Add MDB entries in prepare phase · d4d0e409
      Ido Schimmel 提交于
      The driver cannot guarantee in the prepare phase that it will be able to
      write an MDB entry to the device. In case the driver returned success
      during the prepare phase, but then failed to add the entry in the commit
      phase, a WARNING [1] will be generated by the switchdev core.
      
      Fix this by doing the work in the prepare phase instead.
      
      [1]
      [  358.544486] swp12s0: Commit of object (id=2) failed.
      [  358.550061] WARNING: CPU: 0 PID: 30 at net/switchdev/switchdev.c:281 switchdev_port_obj_add_now+0x9b/0xe0
      [  358.560754] CPU: 0 PID: 30 Comm: kworker/0:1 Not tainted 5.0.0-custom-13382-gf2449babf221 #1350
      [  358.570472] Hardware name: Mellanox Technologies Ltd. MSN2100-CB2FO/SA001017, BIOS 5.6.5 06/07/2016
      [  358.580582] Workqueue: events switchdev_deferred_process_work
      [  358.587001] RIP: 0010:switchdev_port_obj_add_now+0x9b/0xe0
      ...
      [  358.614109] RSP: 0018:ffffa6b900d6fe18 EFLAGS: 00010286
      [  358.619943] RAX: 0000000000000000 RBX: ffff8b00797ff000 RCX: 0000000000000000
      [  358.627912] RDX: ffff8b00b7a1d4c0 RSI: ffff8b00b7a152e8 RDI: ffff8b00b7a152e8
      [  358.635881] RBP: ffff8b005c3f5bc0 R08: 000000000000022b R09: 0000000000000000
      [  358.643850] R10: 0000000000000000 R11: ffffa6b900d6fcc8 R12: 0000000000000000
      [  358.651819] R13: dead000000000100 R14: ffff8b00b65a23c0 R15: 0ffff8b00b7a2200
      [  358.659790] FS:  0000000000000000(0000) GS:ffff8b00b7a00000(0000) knlGS:0000000000000000
      [  358.668820] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [  358.675228] CR2: 00007f00aad90de0 CR3: 00000001ca80d000 CR4: 00000000001006f0
      [  358.683188] Call Trace:
      [  358.685918]  switchdev_port_obj_add_deferred+0x13/0x60
      [  358.691655]  switchdev_deferred_process+0x6b/0xf0
      [  358.696907]  switchdev_deferred_process_work+0xa/0x10
      [  358.702548]  process_one_work+0x1f5/0x3f0
      [  358.707022]  worker_thread+0x28/0x3c0
      [  358.711099]  ? process_one_work+0x3f0/0x3f0
      [  358.715768]  kthread+0x10d/0x130
      [  358.719369]  ? __kthread_create_on_node+0x180/0x180
      [  358.724815]  ret_from_fork+0x35/0x40
      
      Fixes: 3a49b4fd ("mlxsw: Adding layer 2 multicast support")
      Signed-off-by: NIdo Schimmel <idosch@mellanox.com>
      Reported-by: NAlex Kushnarov <alexanderk@mellanox.com>
      Tested-by: NAlex Kushnarov <alexanderk@mellanox.com>
      Acked-by: NJiri Pirko <jiri@mellanox.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d4d0e409
  2. 10 4月, 2019 1 次提交
  3. 09 4月, 2019 24 次提交
  4. 08 4月, 2019 11 次提交
    • F
      mac80211: make ieee80211_schedule_txq schedule empty TXQs · 2b4a6698
      Felix Fietkau 提交于
      Currently there is no way for the driver to signal to mac80211 that it should
      schedule a TXQ even if there are no packets on the mac80211 part of that queue.
      This is problematic if the driver has an internal retry queue to deal with
      software A-MPDU retry.
      
      This patch changes the behavior of ieee80211_schedule_txq to always schedule
      the queue, as its only user (ath9k) seems to expect such behavior already:
      it calls this function on tx status and on powersave wakeup whenever its
      internal retry queue is not empty.
      
      Also add an extra argument to ieee80211_return_txq to get the same behavior.
      
      This fixes an issue on ath9k where tx queues with packets to retry (and no
      new packets in mac80211) would not get serviced.
      
      Fixes: 89cea749 ("ath9k: Switch to mac80211 TXQ scheduling and airtime APIs")
      Signed-off-by: NFelix Fietkau <nbd@nbd.name>
      Acked-by: NToke Høiland-Jørgensen <toke@redhat.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      2b4a6698
    • J
      mac80211_hwsim: calculate if_combination.max_interfaces · 45fcef8b
      Johannes Berg 提交于
      If we just set this to 2048, and have multiple limits you
      can select from, the total number might run over and cause
      a warning in cfg80211. This doesn't make sense, so we just
      calculate the total max_interfaces now.
      
      Reported-by: syzbot+8f91bd563bbff230d0ee@syzkaller.appspotmail.com
      Fixes: 99e3a44b ("mac80211_hwsim: allow setting iftype support")
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      45fcef8b
    • S
      cfg80211: add ratelimited variants of err and warn · a58d7525
      Stanislaw Gruszka 提交于
      wiphy_{err,warn}_ratelimited will be used by rt2x00
      Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      a58d7525
    • L
      Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 · fd008d1a
      Linus Torvalds 提交于
      Pull crypto fix from Herbert Xu:
       "This fixes a bug in the implementation of xcbc and cmac in caam"
      
      * 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6:
        crypto: caam - fix copy of next buffer for xcbc and cmac
      fd008d1a
    • M
      net: vrf: Fix ping failed when vrf mtu is set to 0 · 5055376a
      Miaohe Lin 提交于
      When the mtu of a vrf device is set to 0, it would cause ping
      failed. So I think we should limit vrf mtu in a reasonable range
      to solve this problem. I set dev->min_mtu to IPV6_MIN_MTU, so it
      will works for both ipv4 and ipv6. And if dev->max_mtu still be 0
      can be confusing, so I set dev->max_mtu to ETH_MAX_MTU.
      
      Here is the reproduce step:
      
      1.Config vrf interface and set mtu to 0:
      3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel
      master vrf1 state UP mode DEFAULT group default qlen 1000
          link/ether 52:54:00:9e:dd:c1 brd ff:ff:ff:ff:ff:ff
      
      2.Ping peer:
      3: enp4s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel
      master vrf1 state UP group default qlen 1000
          link/ether 52:54:00:9e:dd:c1 brd ff:ff:ff:ff:ff:ff
          inet 10.0.0.1/16 scope global enp4s0
             valid_lft forever preferred_lft forever
      connect: Network is unreachable
      
      3.Set mtu to default value, ping works:
      PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
      64 bytes from 10.0.0.2: icmp_seq=1 ttl=64 time=1.88 ms
      
      Fixes: ad49bc63 ("net: vrf: remove MTU limits for vrf device")
      Signed-off-by: NMiaohe Lin <linmiaohe@huawei.com>
      Reviewed-by: NDavid Ahern <dsahern@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5055376a
    • Q
      slab: fix a crash by reading /proc/slab_allocators · fcf88917
      Qian Cai 提交于
      The commit 510ded33 ("slab: implement slab_root_caches list")
      changes the name of the list node within "struct kmem_cache" from "list"
      to "root_caches_node", but leaks_show() still use the "list" which
      causes a crash when reading /proc/slab_allocators.
      
      You need to have CONFIG_SLAB=y and CONFIG_MEMCG=y to see the problem,
      because without MEMCG all slab caches are root caches, and the "list"
      node happens to be the right one.
      
      Fixes: 510ded33 ("slab: implement slab_root_caches list")
      Signed-off-by: NQian Cai <cai@lca.pw>
      Reviewed-by: NTobin C. Harding <tobin@kernel.org>
      Cc: Tejun Heo <tj@kernel.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fcf88917
    • N
      selftests: add a tc matchall test case · b959ecf8
      Nicolas Dichtel 提交于
      This is a follow up of the commit 0db6f8be ("net/sched: fix ->get
      helper of the matchall cls").
      
      To test it:
      $ cd tools/testing/selftests/tc-testing
      $ ln -s ../plugin-lib/nsPlugin.py plugins/20-nsPlugin.py
      $ ./tdc.py -n -e 2638
      Signed-off-by: NNicolas Dichtel <nicolas.dichtel@6wind.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b959ecf8
    • L
      Linux 5.1-rc4 · 15ade5d2
      Linus Torvalds 提交于
      15ade5d2
    • L
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc · d8491223
      Linus Torvalds 提交于
      Pull ARM SoC fixes from Olof Johansson:
       "A collection of fixes from the last few weeks. Most of them are
        smaller tweaks and fixes to DT and hardware descriptions for boards.
        Some of the more significant ones are:
      
         - eMMC and RGMII stability tweaks for rk3288
      
         - DDC fixes for Rock PI 4
      
         - Audio fixes for two TI am335x eval boards
      
         - D_CAN clock fix for am335x
      
         - Compilation fixes for clang
      
         - !HOTPLUG_CPU compilation fix for one of the new platforms this
           release (milbeaut)
      
         - A revert of a gpio fix for nomadik that instead was fixed in the
           gpio subsystem
      
         - Whitespace fix for the DT JSON schema (no tabs allowed)"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (25 commits)
        ARM: milbeaut: fix build with !CONFIG_HOTPLUG_CPU
        ARM: iop: don't use using 64-bit DMA masks
        ARM: orion: don't use using 64-bit DMA masks
        Revert "ARM: dts: nomadik: Fix polarity of SPI CS"
        dt-bindings: cpu: Fix JSON schema
        arm/mach-at91/pm : fix possible object reference leak
        ARM: dts: at91: Fix typo in ISC_D0 on PC9
        ARM: dts: Fix dcan clkctrl clock for am3
        reset: meson-audio-arb: Fix missing .owner setting of reset_controller_dev
        dt-bindings: reset: meson-g12a: Add missing USB2 PHY resets
        ARM: dts: rockchip: Remove #address/#size-cells from rk3288-veyron gpio-keys
        ARM: dts: rockchip: Remove #address/#size-cells from rk3288 mipi_dsi
        ARM: dts: rockchip: Fix gpu opp node names for rk3288
        ARM: dts: am335x-evmsk: Correct the regulators for the audio codec
        ARM: dts: am335x-evm: Correct the regulators for the audio codec
        ARM: OMAP2+: add missing of_node_put after of_device_is_available
        ARM: OMAP1: ams-delta: Fix broken GPIO ID allocation
        arm64: dts: stratix10: add the sysmgr-syscon property from the gmac's
        arm64: dts: rockchip: fix rk3328 sdmmc0 write errors
        arm64: dts: rockchip: fix rk3328 rgmii high tx error rate
        ...
      d8491223
    • L
      Merge tag 'for-linus-20190407' of git://git.kernel.dk/linux-block · 429fba10
      Linus Torvalds 提交于
      Pull block fixes from Jens Axboe:
      
       - Fixups for the pf/pcd queue handling (YueHaibing)
      
       - Revert of the three direct issue changes as they have been proven to
         cause an issue with dm-mpath (Bart)
      
       - Plug rq_count reset fix (Dongli)
      
       - io_uring double free in fileset registration error handling (me)
      
       - Make null_blk handle bad numa node passed in (John)
      
       - BFQ ifdef fix (Konstantin)
      
       - Flush queue leak fix (Shenghui)
      
       - Plug trace fix (Yufen)
      
      * tag 'for-linus-20190407' of git://git.kernel.dk/linux-block:
        xsysace: Fix error handling in ace_setup
        null_blk: prevent crash from bad home_node value
        block: Revert v5.0 blk_mq_request_issue_directly() changes
        paride/pcd: Fix potential NULL pointer dereference and mem leak
        blk-mq: do not reset plug->rq_count before the list is sorted
        paride/pf: Fix potential NULL pointer dereference
        io_uring: fix double free in case of fileset regitration failure
        blk-mq: add trace block plug and unplug for multiple queues
        block: use blk_free_flush_queue() to free hctx->fq in blk_mq_init_hctx
        block/bfq: fix ifdef for CONFIG_BFQ_GROUP_IOSCHED=y
      429fba10
    • A
      ARM: milbeaut: fix build with !CONFIG_HOTPLUG_CPU · 9a8f3203
      Arnd Bergmann 提交于
      When HOTPLUG_CPU is disabled, some fields in the smp operations
      are not available or needed:
      
      arch/arm/mach-milbeaut/platsmp.c:90:3: error: field designator 'cpu_die' does not refer to any field in type
            'struct smp_operations'
              .cpu_die                = m10v_cpu_die,
               ^
      arch/arm/mach-milbeaut/platsmp.c:91:3: error: field designator 'cpu_kill' does not refer to any field in type
            'struct smp_operations'
              .cpu_kill               = m10v_cpu_kill,
               ^
      
      Hide them in an #ifdef like the other platforms do.
      
      Fixes: 9fb29c73 ("ARM: milbeaut: Add basic support for Milbeaut m10v SoC")
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NOlof Johansson <olof@lixom.net>
      9a8f3203