1. 18 4月, 2020 5 次提交
  2. 17 4月, 2020 16 次提交
    • T
      blk-wbt: Drop needless newlines from tracepoint format strings · 3f22037d
      Tommi Rantala 提交于
      Drop needless newlines from tracepoint format strings, they only add
      empty lines to perf tracing output.
      Signed-off-by: NTommi Rantala <tommi.t.rantala@nokia.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      3f22037d
    • T
      blk-wbt: Use tracepoint_string() for wbt_step tracepoint string literals · 3a89c25d
      Tommi Rantala 提交于
      Use tracepoint_string() for string literals that are used in the
      wbt_step tracepoint, so that userspace tools can display the string
      content.
      Signed-off-by: NTommi Rantala <tommi.t.rantala@nokia.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      3a89c25d
    • S
      s390/dasd: remove IOSCHED_DEADLINE from DASD Kconfig · 3dceecfa
      Stefan Haberland 提交于
      CONFIG_IOSCHED_DEADLINE was removed with
      commit f382fb0b ("block: remove legacy IO schedulers")
      
      and setting of the scheduler was removed with
      commit a5fd8ddc ("s390/dasd: remove setting of scheduler from driver").
      
      So get rid of the select.
      Reported-by: NKrzysztof Kozlowski <krzk@kernel.org>
      Signed-off-by: NStefan Haberland <sth@linux.ibm.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      3dceecfa
    • J
      btrfs: fix setting last_trans for reloc roots · aec7db3b
      Josef Bacik 提交于
      I made a mistake with my previous fix, I assumed that we didn't need to
      mess with the reloc roots once we were out of the part of relocation where
      we are actually moving the extents.
      
      The subtle thing that I missed is that btrfs_init_reloc_root() also
      updates the last_trans for the reloc root when we do
      btrfs_record_root_in_trans() for the corresponding fs_root.  I've added a
      comment to make sure future me doesn't make this mistake again.
      
      This showed up as a WARN_ON() in btrfs_copy_root() because our
      last_trans didn't == the current transid.  This could happen if we
      snapshotted a fs root with a reloc root after we set
      rc->create_reloc_tree = 0, but before we actually merge the reloc root.
      
      Worth mentioning that the regression produced the following warning
      when running snapshot creation and balance in parallel:
      
        BTRFS info (device sdc): relocating block group 30408704 flags metadata|dup
        ------------[ cut here ]------------
        WARNING: CPU: 0 PID: 12823 at fs/btrfs/ctree.c:191 btrfs_copy_root+0x26f/0x430 [btrfs]
        CPU: 0 PID: 12823 Comm: btrfs Tainted: G        W 5.6.0-rc7-btrfs-next-58 #1
        Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.0-59-gc9ba5276e321-prebuilt.qemu.org 04/01/2014
        RIP: 0010:btrfs_copy_root+0x26f/0x430 [btrfs]
        RSP: 0018:ffffb96e044279b8 EFLAGS: 00010202
        RAX: 0000000000000009 RBX: ffff9da70bf61000 RCX: ffffb96e04427a48
        RDX: ffff9da733a770c8 RSI: ffff9da70bf61000 RDI: ffff9da694163818
        RBP: ffff9da733a770c8 R08: fffffffffffffff8 R09: 0000000000000002
        R10: ffffb96e044279a0 R11: 0000000000000000 R12: ffff9da694163818
        R13: fffffffffffffff8 R14: ffff9da6d2512000 R15: ffff9da714cdac00
        FS:  00007fdeacf328c0(0000) GS:ffff9da735e00000(0000) knlGS:0000000000000000
        CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
        CR2: 000055a2a5b8a118 CR3: 00000001eed78002 CR4: 00000000003606f0
        DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
        DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
        Call Trace:
         ? create_reloc_root+0x49/0x2b0 [btrfs]
         ? kmem_cache_alloc_trace+0xe5/0x200
         create_reloc_root+0x8b/0x2b0 [btrfs]
         btrfs_reloc_post_snapshot+0x96/0x5b0 [btrfs]
         create_pending_snapshot+0x610/0x1010 [btrfs]
         create_pending_snapshots+0xa8/0xd0 [btrfs]
         btrfs_commit_transaction+0x4c7/0xc50 [btrfs]
         ? btrfs_mksubvol+0x3cd/0x560 [btrfs]
         btrfs_mksubvol+0x455/0x560 [btrfs]
         __btrfs_ioctl_snap_create+0x15f/0x190 [btrfs]
         btrfs_ioctl_snap_create_v2+0xa4/0xf0 [btrfs]
         ? mem_cgroup_commit_charge+0x6e/0x540
         btrfs_ioctl+0x12d8/0x3760 [btrfs]
         ? do_raw_spin_unlock+0x49/0xc0
         ? _raw_spin_unlock+0x29/0x40
         ? __handle_mm_fault+0x11b3/0x14b0
         ? ksys_ioctl+0x92/0xb0
         ksys_ioctl+0x92/0xb0
         ? trace_hardirqs_off_thunk+0x1a/0x1c
         __x64_sys_ioctl+0x16/0x20
         do_syscall_64+0x5c/0x280
         entry_SYSCALL_64_after_hwframe+0x49/0xbe
        RIP: 0033:0x7fdeabd3bdd7
      
      Fixes: 2abc726a ("btrfs: do not init a reloc root if we aren't relocating")
      Reviewed-by: NFilipe Manana <fdmanana@suse.com>
      Signed-off-by: NJosef Bacik <josef@toxicpanda.com>
      Signed-off-by: NDavid Sterba <dsterba@suse.com>
      aec7db3b
    • L
      Merge tag 'nfs-for-5.7-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs · 7a56db02
      Linus Torvalds 提交于
      Pull NFS client bugfix from Trond Myklebust:
       "Fix an ABBA spinlock issue in pnfs_update_layout()"
      
      * tag 'nfs-for-5.7-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
        NFS: Fix an ABBA spinlock issue in pnfs_update_layout()
      7a56db02
    • L
      Merge tag 'tag-chrome-platform-fixes-for-v5.7-rc2' of... · 2fcd8014
      Linus Torvalds 提交于
      Merge tag 'tag-chrome-platform-fixes-for-v5.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux
      
      Pull chrome-platform fixes from Benson Leung:
       "Two small fixes for cros_ec_sensorhub_ring.c, addressing issues
        introduced in the cros_ec_sensorhub FIFO support commit"
      
      * tag 'tag-chrome-platform-fixes-for-v5.7-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux:
        platform/chrome: cros_ec_sensorhub: Add missing '\n' in log messages
        platform/chrome: cros_ec_sensorhub: Off by one in cros_sensorhub_send_sample()
      2fcd8014
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net · c8372665
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) Disable RISCV BPF JIT builds when !MMU, from Björn Töpel.
      
       2) nf_tables leaves dangling pointer after free, fix from Eric Dumazet.
      
       3) Out of boundary write in __xsk_rcv_memcpy(), fix from Li RongQing.
      
       4) Adjust icmp6 message source address selection when routes have a
          preferred source address set, from Tim Stallard.
      
       5) Be sure to validate HSR protocol version when creating new links,
          from Taehee Yoo.
      
       6) CAP_NET_ADMIN should be sufficient to manage l2tp tunnels even in
          non-initial namespaces, from Michael Weiß.
      
       7) Missing release firmware call in mlx5, from Eran Ben Elisha.
      
       8) Fix variable type in macsec_changelink(), caught by KASAN. Fix from
          Taehee Yoo.
      
       9) Fix pause frame negotiation in marvell phy driver, from Clemens
          Gruber.
      
      10) Record RX queue early enough in tun packet paths such that XDP
          programs will see the correct RX queue index, from Gilberto Bertin.
      
      11) Fix double unlock in mptcp, from Florian Westphal.
      
      12) Fix offset overflow in ARM bpf JIT, from Luke Nelson.
      
      13) marvell10g needs to soft reset PHY when coming out of low power
          mode, from Russell King.
      
      14) Fix MTU setting regression in stmmac for some chip types, from
          Florian Fainelli.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (101 commits)
        amd-xgbe: Use __napi_schedule() in BH context
        mISDN: make dmril and dmrim static
        net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes
        net: dsa: mt7530: fix tagged frames pass-through in VLAN-unaware mode
        tipc: fix incorrect increasing of link window
        Documentation: Fix tcp_challenge_ack_limit default value
        net: tulip: make early_486_chipsets static
        dt-bindings: net: ethernet-phy: add desciption for ethernet-phy-id1234.d400
        ipv6: remove redundant assignment to variable err
        net/rds: Use ERR_PTR for rds_message_alloc_sgs()
        net: mscc: ocelot: fix untagged packet drops when enslaving to vlan aware bridge
        selftests/bpf: Check for correct program attach/detach in xdp_attach test
        libbpf: Fix type of old_fd in bpf_xdp_set_link_opts
        libbpf: Always specify expected_attach_type on program load if supported
        xsk: Add missing check on user supplied headroom size
        mac80211: fix channel switch trigger from unknown mesh peer
        mac80211: fix race in ieee80211_register_hw()
        net: marvell10g: soft-reset the PHY when coming out of low power
        net: marvell10g: report firmware version
        net/cxgb4: Check the return from t4_query_params properly
        ...
      c8372665
    • S
      amd-xgbe: Use __napi_schedule() in BH context · d518691c
      Sebastian Andrzej Siewior 提交于
      The driver uses __napi_schedule_irqoff() which is fine as long as it is
      invoked with disabled interrupts by everybody. Since the commit
      mentioned below the driver may invoke xgbe_isr_task() in tasklet/softirq
      context. This may lead to list corruption if another driver uses
      __napi_schedule_irqoff() in IRQ context.
      
      Use __napi_schedule() which safe to use from IRQ and softirq context.
      
      Fixes: 85b85c85 ("amd-xgbe: Re-issue interrupt if interrupt status not cleared")
      Signed-off-by: NSebastian Andrzej Siewior <bigeasy@linutronix.de>
      Acked-by: NTom Lendacky <thomas.lendacky@amd.com>
      Cc: Tom Lendacky <thomas.lendacky@amd.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d518691c
    • J
      mISDN: make dmril and dmrim static · 05eab4f3
      Jason Yan 提交于
      Fix the following sparse warning:
      
      drivers/isdn/hardware/mISDN/mISDNisar.c:746:12: warning: symbol 'dmril'
      was not declared. Should it be static?
      drivers/isdn/hardware/mISDN/mISDNisar.c:749:12: warning: symbol 'dmrim'
      was not declared. Should it be static?
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NJason Yan <yanaijie@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      05eab4f3
    • F
      net: stmmac: dwmac-sunxi: Provide TX and RX fifo sizes · 806fd188
      Florian Fainelli 提交于
      After commit bfcb8132 ("net: dsa:
      configure the MTU for switch ports") my Lamobo R1 platform which uses
      an allwinner,sun7i-a20-gmac compatible Ethernet MAC started to fail
      by rejecting a MTU of 1536. The reason for that is that the DMA
      capabilities are not readable on this version of the IP, and there
      is also no 'tx-fifo-depth' property being provided in Device Tree. The
      property is documented as optional, and is not provided.
      
      Chen-Yu indicated that the FIFO sizes are 4KB for TX and 16KB for RX, so
      provide these values through platform data as an immediate fix until
      various Device Tree sources get updated accordingly.
      
      Fixes: eaf4fac4 ("net: stmmac: Do not accept invalid MTU values")
      Suggested-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: NChen-Yu Tsai <wens@csie.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      806fd188
    • D
      net: dsa: mt7530: fix tagged frames pass-through in VLAN-unaware mode · e045124e
      DENG Qingfang 提交于
      In VLAN-unaware mode, the Egress Tag (EG_TAG) field in Port VLAN
      Control register must be set to Consistent to let tagged frames pass
      through as is, otherwise their tags will be stripped.
      
      Fixes: 83163f7d ("net: dsa: mediatek: add VLAN support for MT7530")
      Signed-off-by: NDENG Qingfang <dqfext@gmail.com>
      Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Tested-by: NRené van Dorst <opensource@vdorst.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e045124e
    • L
      Merge tag 'selinux-pr-20200416' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux · 9786cab6
      Linus Torvalds 提交于
      Pull SELinux fix from Paul Moore:
       "One small SELinux fix to ensure we cleanup properly on an error
        condition"
      
      * tag 'selinux-pr-20200416' of git://git.kernel.org/pub/scm/linux/kernel/git/pcmoore/selinux:
        selinux: free str on error in str_read()
      9786cab6
    • L
      Merge tag 'ceph-for-5.7-rc2' of git://github.com/ceph/ceph-client · 3fa84bf9
      Linus Torvalds 提交于
      Pull ceph fixes from Ilya Dryomov:
      
       - a set of patches for a deadlock on "rbd map" error path
      
       - a fix for invalid pointer dereference and uninitialized variable use
         on asynchronous create and unlink error paths.
      
      * tag 'ceph-for-5.7-rc2' of git://github.com/ceph/ceph-client:
        ceph: fix potential bad pointer deref in async dirops cb's
        rbd: don't mess with a page vector in rbd_notify_op_lock()
        rbd: don't test rbd_dev->opts in rbd_dev_image_release()
        rbd: call rbd_dev_unprobe() after unwatching and flushing notifies
        rbd: avoid a deadlock on header_rwsem when flushing notifies
      3fa84bf9
    • L
      Merge tag 'trace-v5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace · 4ede1259
      Linus Torvalds 提交于
      Pull tracing fix from Steven Rostedt:
       "This fixes a small race between allocating a snapshot buffer and
        setting the snapshot trigger.
      
        On a slow machine, the trigger can occur before the snapshot is
        allocated causing a warning to be displayed in the ring buffer, and no
        snapshot triggering. Reversing the allocation and the enabling of the
        trigger fixes the problem"
      
      * tag 'trace-v5.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
        tracing: Fix the race between registering 'snapshot' event trigger and triggering 'snapshot' operation
      4ede1259
    • V
      keys: Fix proc_keys_next to increase position index · 86d32f9a
      Vasily Averin 提交于
      If seq_file .next function does not change position index,
      read after some lseek can generate unexpected output:
      
          $ dd if=/proc/keys bs=1  # full usual output
          0f6bfdf5 I--Q---     2 perm 3f010000  1000  1000 user      4af2f79ab8848d0a: 740
          1fb91b32 I--Q---     3 perm 1f3f0000  1000 65534 keyring   _uid.1000: 2
          27589480 I--Q---     1 perm 0b0b0000     0     0 user      invocation_id: 16
          2f33ab67 I--Q---   152 perm 3f030000     0     0 keyring   _ses: 2
          33f1d8fa I--Q---     4 perm 3f030000  1000  1000 keyring   _ses: 1
          3d427fda I--Q---     2 perm 3f010000  1000  1000 user      69ec44aec7678e5a: 740
          3ead4096 I--Q---     1 perm 1f3f0000  1000 65534 keyring   _uid_ses.1000: 1
          521+0 records in
          521+0 records out
          521 bytes copied, 0,00123769 s, 421 kB/s
      
      But a read after lseek in middle of last line results in the partial
      last line and then a repeat of the final line:
      
          $ dd if=/proc/keys bs=500 skip=1
          dd: /proc/keys: cannot skip to specified offset
          g   _uid_ses.1000: 1
          3ead4096 I--Q---     1 perm 1f3f0000  1000 65534 keyring   _uid_ses.1000: 1
          0+1 records in
          0+1 records out
          97 bytes copied, 0,000135035 s, 718 kB/s
      
      and a read after lseek beyond end of file results in the last line being
      shown:
      
          $ dd if=/proc/keys bs=1000 skip=1   # read after lseek beyond end of file
          dd: /proc/keys: cannot skip to specified offset
          3ead4096 I--Q---     1 perm 1f3f0000  1000 65534 keyring   _uid_ses.1000: 1
          0+1 records in
          0+1 records out
          76 bytes copied, 0,000119981 s, 633 kB/s
      
      See https://bugzilla.kernel.org/show_bug.cgi?id=206283
      
      Fixes: 1f4aace6 ("fs/seq_file.c: simplify seq_file iteration code ...")
      Signed-off-by: NVasily Averin <vvs@virtuozzo.com>
      Signed-off-by: NDavid Howells <dhowells@redhat.com>
      Reviewed-by: NJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      86d32f9a
    • K
      ahci: Add Intel Comet Lake PCH-U PCI ID · 1f2ef049
      Kai-Heng Feng 提交于
      Add Intel Comet Lake PCH-U PCI ID to the list of supported controllers.
      
      Set default SATA LPM so the SoC can enter S0ix.
      Signed-off-by: NKai-Heng Feng <kai.heng.feng@canonical.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      1f2ef049
  3. 16 4月, 2020 12 次提交
    • J
      blk-mq: Put driver tag in blk_mq_dispatch_rq_list() when no budget · 5fe56de7
      John Garry 提交于
      If in blk_mq_dispatch_rq_list() we find no budget, then we break of the
      dispatch loop, but the request may keep the driver tag, evaulated
      in 'nxt' in the previous loop iteration.
      
      Fix by putting the driver tag for that request.
      Reviewed-by: NMing Lei <ming.lei@redhat.com>
      Signed-off-by: NJohn Garry <john.garry@huawei.com>
      Signed-off-by: NJens Axboe <axboe@kernel.dk>
      5fe56de7
    • L
      Merge tag 'efi-urgent-2020-04-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 00086336
      Linus Torvalds 提交于
      Pull EFI fixes from Ingo Molnar:
       "Misc EFI fixes, including the boot failure regression caused by the
        BSS section not being cleared by the loaders"
      
      * tag 'efi-urgent-2020-04-15' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        efi/x86: Revert struct layout change to fix kexec boot regression
        efi/x86: Don't remap text<->rodata gap read-only for mixed mode
        efi/x86: Fix the deletion of variables in mixed mode
        efi/libstub/file: Merge file name buffers to reduce stack usage
        Documentation/x86, efi/x86: Clarify EFI handover protocol and its requirements
        efi/arm: Deal with ADR going out of range in efi_enter_kernel()
        efi/x86: Always relocate the kernel for EFI handover entry
        efi/x86: Move efi stub globals from .bss to .data
        efi/libstub/x86: Remove redundant assignment to pointer hdr
        efi/cper: Use scnprintf() for avoiding potential buffer overflow
      00086336
    • T
      tipc: fix incorrect increasing of link window · edadedf1
      Tuong Lien 提交于
      In commit 16ad3f40 ("tipc: introduce variable window congestion
      control"), we allow link window to change with the congestion avoidance
      algorithm. However, there is a bug that during the slow-start if packet
      retransmission occurs, the link will enter the fast-recovery phase, set
      its window to the 'ssthresh' which is never less than 300, so the link
      window suddenly increases to that limit instead of decreasing.
      
      Consequently, two issues have been observed:
      
      - For broadcast-link: it can leave a gap between the link queues that a
      new packet will be inserted and sent before the previous ones, i.e. not
      in-order.
      
      - For unicast: the algorithm does not work as expected, the link window
      jumps to the slow-start threshold whereas packet retransmission occurs.
      
      This commit fixes the issues by avoiding such the link window increase,
      but still decreasing if the 'ssthresh' is lowered.
      
      Fixes: 16ad3f40 ("tipc: introduce variable window congestion control")
      Acked-by: NJon Maloy <jmaloy@redhat.com>
      Signed-off-by: NTuong Lien <tuong.t.lien@dektech.com.au>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      edadedf1
    • C
      Documentation: Fix tcp_challenge_ack_limit default value · 5309960e
      Cambda Zhu 提交于
      The default value of tcp_challenge_ack_limit has been changed from
      100 to 1000 and this patch fixes its documentation.
      Signed-off-by: NCambda Zhu <cambda@linux.alibaba.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      5309960e
    • J
      net: tulip: make early_486_chipsets static · ae5a44bb
      Jason Yan 提交于
      Fix the following sparse warning:
      
      drivers/net/ethernet/dec/tulip/tulip_core.c:1280:28: warning: symbol
      'early_486_chipsets' was not declared. Should it be static?
      Reported-by: NHulk Robot <hulkci@huawei.com>
      Signed-off-by: NJason Yan <yanaijie@huawei.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ae5a44bb
    • J
      dt-bindings: net: ethernet-phy: add desciption for ethernet-phy-id1234.d400 · c8322754
      Johan Jonker 提交于
      The description below is already in use in
      'rk3228-evb.dts', 'rk3229-xms6.dts' and 'rk3328.dtsi'
      but somehow never added to a document, so add
      "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22"
      for ethernet-phy nodes on Rockchip platforms to
      'ethernet-phy.yaml'.
      Signed-off-by: NJohan Jonker <jbx6244@gmail.com>
      Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      c8322754
    • C
      ipv6: remove redundant assignment to variable err · 672e2477
      Colin Ian King 提交于
      The variable err is being initialized with a value that is never read
      and it is being updated later with a new value.  The initialization is
      redundant and can be removed.
      
      Addresses-Coverity: ("Unused value")
      Signed-off-by: NColin Ian King <colin.king@canonical.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      672e2477
    • O
      selinux: free str on error in str_read() · af15f14c
      Ondrej Mosnacek 提交于
      In [see "Fixes:"] I missed the fact that str_read() may give back an
      allocated pointer even if it returns an error, causing a potential
      memory leak in filename_trans_read_one(). Fix this by making the
      function free the allocated string whenever it returns a non-zero value,
      which also makes its behavior more obvious and prevents repeating the
      same mistake in the future.
      Reported-by: Ncoverity-bot <keescook+coverity-bot@chromium.org>
      Addresses-Coverity-ID: 1461665 ("Resource leaks")
      Fixes: c3a27611 ("selinux: optimize storage of filename transitions")
      Signed-off-by: NOndrej Mosnacek <omosnace@redhat.com>
      Reviewed-by: NKees Cook <keescook@chromium.org>
      Signed-off-by: NPaul Moore <paul@paul-moore.com>
      af15f14c
    • J
      net/rds: Use ERR_PTR for rds_message_alloc_sgs() · 7dba9203
      Jason Gunthorpe 提交于
      Returning the error code via a 'int *ret' when the function returns a
      pointer is very un-kernely and causes gcc 10's static analysis to choke:
      
      net/rds/message.c: In function ‘rds_message_map_pages’:
      net/rds/message.c:358:10: warning: ‘ret’ may be used uninitialized in this function [-Wmaybe-uninitialized]
        358 |   return ERR_PTR(ret);
      
      Use a typical ERR_PTR return instead.
      Signed-off-by: NJason Gunthorpe <jgg@mellanox.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      7dba9203
    • V
      net: mscc: ocelot: fix untagged packet drops when enslaving to vlan aware bridge · 87b0f983
      Vladimir Oltean 提交于
      To rehash a previous explanation given in commit 1c44ce56 ("net:
      mscc: ocelot: fix vlan_filtering when enslaving to bridge before link is
      up"), the switch driver operates the in a mode where a single VLAN can
      be transmitted as untagged on a particular egress port. That is the
      "native VLAN on trunk port" use case.
      
      The configuration for this native VLAN is driven in 2 ways:
       - Set the egress port rewriter to strip the VLAN tag for the native
         VID (as it is egress-untagged, after all).
       - Configure the ingress port to drop untagged and priority-tagged
         traffic, if there is no native VLAN. The intention of this setting is
         that a trunk port with no native VLAN should not accept untagged
         traffic.
      
      Since both of the above configurations for the native VLAN should only
      be done if VLAN awareness is requested, they are actually done from the
      ocelot_port_vlan_filtering function, after the basic procedure of
      toggling the VLAN awareness flag of the port.
      
      But there's a problem with that simplistic approach: we are trying to
      juggle with 2 independent variables from a single function:
       - Native VLAN of the port - its value is held in port->vid.
       - VLAN awareness state of the port - currently there are some issues
         here, more on that later*.
      The actual problem can be seen when enslaving the switch ports to a VLAN
      filtering bridge:
       0. The driver configures a pvid of zero for each port, when in
          standalone mode. While the bridge configures a default_pvid of 1 for
          each port that gets added as a slave to it.
       1. The bridge calls ocelot_port_vlan_filtering with vlan_aware=true.
          The VLAN-filtering-dependent portion of the native VLAN
          configuration is done, considering that the native VLAN is 0.
       2. The bridge calls ocelot_vlan_add with vid=1, pvid=true,
          untagged=true. The native VLAN changes to 1 (change which gets
          propagated to hardware).
       3. ??? - nobody calls ocelot_port_vlan_filtering again, to reapply the
          VLAN-filtering-dependent portion of the native VLAN configuration,
          for the new native VLAN of 1. One can notice that after toggling "ip
          link set dev br0 type bridge vlan_filtering 0 && ip link set dev br0
          type bridge vlan_filtering 1", the new native VLAN finally makes it
          through and untagged traffic finally starts flowing again. But
          obviously that shouldn't be needed.
      
      So it is clear that 2 independent variables need to both re-trigger the
      native VLAN configuration. So we introduce the second variable as
      ocelot_port->vlan_aware.
      
      *Actually both the DSA Felix driver and the Ocelot driver already had
      each its own variable:
       - Ocelot: ocelot_port_private->vlan_aware
       - Felix: dsa_port->vlan_filtering
      but the common Ocelot library needs to work with a single, common,
      variable, so there is some refactoring done to move the vlan_aware
      property from the private structure into the common ocelot_port
      structure.
      
      Fixes: 97bb69e1 ("net: mscc: ocelot: break apart ocelot_vlan_port_apply")
      Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com>
      Reviewed-by: NHoratiu Vultur <horatiu.vultur@microchip.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      87b0f983
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf · 78b87711
      David S. Miller 提交于
      Daniel Borkmann says:
      
      ====================
      pull-request: bpf 2020-04-15
      
      The following pull-request contains BPF updates for your *net* tree.
      
      We've added 10 non-merge commits during the last 3 day(s) which contain
      a total of 11 files changed, 238 insertions(+), 95 deletions(-).
      
      The main changes are:
      
      1) Fix offset overflow for BPF_MEM BPF_DW insn mapping on arm32 JIT,
         from Luke Nelson and Xi Wang.
      
      2) Prevent mprotect() to make frozen & mmap()'ed BPF map writeable
         again, from Andrii Nakryiko and Jann Horn.
      
      3) Fix type of old_fd in bpf_xdp_set_link_opts to int in libbpf and add
         selftests, from Toke Høiland-Jørgensen.
      
      4) Fix AF_XDP to check that headroom cannot be larger than the available
         space in the chunk, from Magnus Karlsson.
      
      5) Fix reset of XDP prog when expected_fd is set, from David Ahern.
      
      6) Fix a segfault in bpftool's struct_ops command when BTF is not
         available, from Daniel T. Lee.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      78b87711
    • D
      Merge tag 'mac80211-for-net-2020-04-15' of... · 6058ee09
      David S. Miller 提交于
      Merge tag 'mac80211-for-net-2020-04-15' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211
      
      Johannes Berg says:
      
      ====================
      A couple of fixes:
       * FTM responder policy netlink validation fix
         (but the only user validates again later)
       * kernel-doc fixes
       * a fix for a race in mac80211 radio registration vs. userspace
       * a mesh channel switch fix
       * a fix for a syzbot reported kasprintf() issue
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      6058ee09
  4. 15 4月, 2020 7 次提交