Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update 5.4.x+fslc to v5.4.44 #81

Merged
merged 141 commits into from
Jun 3, 2020
Merged

Commits on Jun 3, 2020

  1. ax25: fix setsockopt(SO_BINDTODEVICE)

    [ Upstream commit 687775c ]
    
    syzbot was able to trigger this trace [1], probably by using
    a zero optlen.
    
    While we are at it, cap optlen to IFNAMSIZ - 1 instead of IFNAMSIZ.
    
    [1]
    BUG: KMSAN: uninit-value in strnlen+0xf9/0x170 lib/string.c:569
    CPU: 0 PID: 8807 Comm: syz-executor483 Not tainted 5.7.0-rc4-syzkaller #0
    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+0x1c9/0x220 lib/dump_stack.c:118
     kmsan_report+0xf7/0x1e0 mm/kmsan/kmsan_report.c:121
     __msan_warning+0x58/0xa0 mm/kmsan/kmsan_instr.c:215
     strnlen+0xf9/0x170 lib/string.c:569
     dev_name_hash net/core/dev.c:207 [inline]
     netdev_name_node_lookup net/core/dev.c:277 [inline]
     __dev_get_by_name+0x75/0x2b0 net/core/dev.c:778
     ax25_setsockopt+0xfa3/0x1170 net/ax25/af_ax25.c:654
     __compat_sys_setsockopt+0x4ed/0x910 net/compat.c:403
     __do_compat_sys_setsockopt net/compat.c:413 [inline]
     __se_compat_sys_setsockopt+0xdd/0x100 net/compat.c:410
     __ia32_compat_sys_setsockopt+0x62/0x80 net/compat.c:410
     do_syscall_32_irqs_on arch/x86/entry/common.c:339 [inline]
     do_fast_syscall_32+0x3bf/0x6d0 arch/x86/entry/common.c:398
     entry_SYSENTER_compat+0x68/0x77 arch/x86/entry/entry_64_compat.S:139
    RIP: 0023:0xf7f57dd9
    Code: 90 e8 0b 00 00 00 f3 90 0f ae e8 eb f9 8d 74 26 00 89 3c 24 c3 90 90 90 90 90 90 90 90 90 90 90 90 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 eb 0d 90 90 90 90 90 90 90 90 90 90 90 90
    RSP: 002b:00000000ffae8c1c EFLAGS: 00000217 ORIG_RAX: 000000000000016e
    RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 0000000000000101
    RDX: 0000000000000019 RSI: 0000000020000000 RDI: 0000000000000004
    RBP: 0000000000000012 R08: 0000000000000000 R09: 0000000000000000
    R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
    R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
    
    Local variable ----devname@ax25_setsockopt created at:
     ax25_setsockopt+0xe6/0x1170 net/ax25/af_ax25.c:536
     ax25_setsockopt+0xe6/0x1170 net/ax25/af_ax25.c:536
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reported-by: syzbot <syzkaller@googlegroups.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Eric Dumazet authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    d9ce4b6 View commit details
    Browse the repository at this point in the history
  2. dpaa_eth: fix usage as DSA master, try 3

    [ Upstream commit 5d14c30 ]
    
    The dpaa-eth driver probes on compatible string for the MAC node, and
    the fman/mac.c driver allocates a dpaa-ethernet platform device that
    triggers the probing of the dpaa-eth net device driver.
    
    All of this is fine, but the problem is that the struct device of the
    dpaa_eth net_device is 2 parents away from the MAC which can be
    referenced via of_node. So of_find_net_device_by_node can't find it, and
    DSA switches won't be able to probe on top of FMan ports.
    
    It would be a bit silly to modify a core function
    (of_find_net_device_by_node) to look for dev->parent->parent->of_node
    just for one driver. We're just 1 step away from implementing full
    recursion.
    
    Actually there have already been at least 2 previous attempts to make
    this work:
    - Commit a1a50c8 ("fsl/man: Inherit parent device and of_node")
    - One or more of the patches in "[v3,0/6] adapt DPAA drivers for DSA":
      https://patchwork.ozlabs.org/project/netdev/cover/1508178970-28945-1-git-send-email-madalin.bucur@nxp.com/
      (I couldn't really figure out which one was supposed to solve the
      problem and how).
    
    Point being, it looks like this is still pretty much a problem today.
    On T1040, the /sys/class/net/eth0 symlink currently points to
    
    ../../devices/platform/ffe000000.soc/ffe400000.fman/ffe4e6000.ethernet/dpaa-ethernet.0/net/eth0
    
    which pretty much illustrates the problem. The closest of_node we've got
    is the "fsl,fman-memac" at /soc@ffe000000/fman@400000/ethernet@e6000,
    which is what we'd like to be able to reference from DSA as host port.
    
    For of_find_net_device_by_node to find the eth0 port, we would need the
    parent of the eth0 net_device to not be the "dpaa-ethernet" platform
    device, but to point 1 level higher, aka the "fsl,fman-memac" node
    directly. The new sysfs path would look like this:
    
    ../../devices/platform/ffe000000.soc/ffe400000.fman/ffe4e6000.ethernet/net/eth0
    
    And this is exactly what SET_NETDEV_DEV does. It sets the parent of the
    net_device. The new parent has an of_node associated with it, and
    of_dev_node_match already checks for the of_node of the device or of its
    parent.
    
    Fixes: a1a50c8 ("fsl/man: Inherit parent device and of_node")
    Fixes: c6e26ea ("dpaa_eth: change device used")
    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    vladimiroltean authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    40a904b View commit details
    Browse the repository at this point in the history
  3. net: don't return invalid table id error when we fall back to PF_UNSPEC

    [ Upstream commit 41b4bd9 ]
    
    In case we can't find a ->dumpit callback for the requested
    (family,type) pair, we fall back to (PF_UNSPEC,type). In effect, we're
    in the same situation as if userspace had requested a PF_UNSPEC
    dump. For RTM_GETROUTE, that handler is rtnl_dump_all, which calls all
    the registered RTM_GETROUTE handlers.
    
    The requested table id may or may not exist for all of those
    families. commit ae677bb ("net: Don't return invalid table id
    error when dumping all families") fixed the problem when userspace
    explicitly requests a PF_UNSPEC dump, but missed the fallback case.
    
    For example, when we pass ipv6.disable=1 to a kernel with
    CONFIG_IP_MROUTE=y and CONFIG_IP_MROUTE_MULTIPLE_TABLES=y,
    the (PF_INET6, RTM_GETROUTE) handler isn't registered, so we end up in
    rtnl_dump_all, and listing IPv6 routes will unexpectedly print:
    
      # ip -6 r
      Error: ipv4: MR table does not exist.
      Dump terminated
    
    commit ae677bb introduced the dump_all_families variable, which
    gets set when userspace requests a PF_UNSPEC dump. However, we can't
    simply set the family to PF_UNSPEC in rtnetlink_rcv_msg in the
    fallback case to get dump_all_families == true, because some messages
    types (for example RTM_GETRULE and RTM_GETNEIGH) only register the
    PF_UNSPEC handler and use the family to filter in the kernel what is
    dumped to userspace. We would then export more entries, that userspace
    would have to filter. iproute does that, but other programs may not.
    
    Instead, this patch removes dump_all_families and updates the
    RTM_GETROUTE handlers to check if the family that is being dumped is
    their own. When it's not, which covers both the intentional PF_UNSPEC
    dumps (as dump_all_families did) and the fallback case, ignore the
    missing table id error.
    
    Fixes: cb16789 ("net: Plumb support for filtering ipv4 and ipv6 multicast route dumps")
    Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
    Reviewed-by: David Ahern <dsahern@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    qsn authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    b853a13 View commit details
    Browse the repository at this point in the history
  4. net: dsa: mt7530: fix roaming from DSA user ports

    [ Upstream commit 5e5502e ]
    
    When a client moves from a DSA user port to a software port in a bridge,
    it cannot reach any other clients that connected to the DSA user ports.
    That is because SA learning on the CPU port is disabled, so the switch
    ignores the client's frames from the CPU port and still thinks it is at
    the user port.
    
    Fix it by enabling SA learning on the CPU port.
    
    To prevent the switch from learning from flooding frames from the CPU
    port, set skb->offload_fwd_mark to 1 for unicast and broadcast frames,
    and let the switch flood them instead of trapping to the CPU port.
    Multicast frames still need to be trapped to the CPU port for snooping,
    so set the SA_DIS bit of the MTK tag to 1 when transmitting those frames
    to disable SA learning.
    
    Fixes: b8f126a ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
    Signed-off-by: DENG Qingfang <dqfext@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    LGA1150 authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    557045f View commit details
    Browse the repository at this point in the history
  5. net: ethernet: ti: cpsw: fix ASSERT_RTNL() warning during suspend

    [ Upstream commit 4c64b83 ]
    
    vlan_for_each() are required to be called with rtnl_lock taken, otherwise
    ASSERT_RTNL() warning will be triggered - which happens now during System
    resume from suspend:
      cpsw_suspend()
      |- cpsw_ndo_stop()
        |- __hw_addr_ref_unsync_dev()
          |- cpsw_purge_all_mc()
             |- vlan_for_each()
                |- ASSERT_RTNL();
    
    Hence, fix it by surrounding cpsw_ndo_stop() by rtnl_lock/unlock() calls.
    
    Fixes: 15180ec ("net: ethernet: ti: cpsw: fix vlan mcast")
    Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    grygoriyS authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    53cf25d View commit details
    Browse the repository at this point in the history
  6. __netif_receive_skb_core: pass skb by reference

    [ Upstream commit c0bbbdc ]
    
    __netif_receive_skb_core may change the skb pointer passed into it (e.g.
    in rx_handler). The original skb may be freed as a result of this
    operation.
    
    The callers of __netif_receive_skb_core may further process original skb
    by using pt_prev pointer returned by __netif_receive_skb_core thus
    leading to unpleasant effects.
    
    The solution is to pass skb by reference into __netif_receive_skb_core.
    
    v2: Added Fixes tag and comment regarding ppt_prev and skb invariant.
    
    Fixes: 88eb194 ("net: core: propagate SKB lists through packet_type lookup")
    Signed-off-by: Boris Sukholitko <boris.sukholitko@broadcom.com>
    Acked-by: Edward Cree <ecree@solarflare.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Boris Sukholitko authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    b51eb49 View commit details
    Browse the repository at this point in the history
  7. net: inet_csk: Fix so_reuseport bind-address cache in tb->fast*

    [ Upstream commit 88d7fcf ]
    
    The commit 637bc8b ("inet: reset tb->fastreuseport when adding a reuseport sk")
    added a bind-address cache in tb->fast*.  The tb->fast* caches the address
    of a sk which has successfully been binded with SO_REUSEPORT ON.  The idea
    is to avoid the expensive conflict search in inet_csk_bind_conflict().
    
    There is an issue with wildcard matching where sk_reuseport_match() should
    have returned false but it is currently returning true.  It ends up
    hiding bind conflict.  For example,
    
    bind("[::1]:443"); /* without SO_REUSEPORT. Succeed. */
    bind("[::2]:443"); /* with    SO_REUSEPORT. Succeed. */
    bind("[::]:443");  /* with    SO_REUSEPORT. Still Succeed where it shouldn't */
    
    The last bind("[::]:443") with SO_REUSEPORT on should have failed because
    it should have a conflict with the very first bind("[::1]:443") which
    has SO_REUSEPORT off.  However, the address "[::2]" is cached in
    tb->fast* in the second bind. In the last bind, the sk_reuseport_match()
    returns true because the binding sk's wildcard addr "[::]" matches with
    the "[::2]" cached in tb->fast*.
    
    The correct bind conflict is reported by removing the second
    bind such that tb->fast* cache is not involved and forces the
    bind("[::]:443") to go through the inet_csk_bind_conflict():
    
    bind("[::1]:443"); /* without SO_REUSEPORT. Succeed. */
    bind("[::]:443");  /* with    SO_REUSEPORT. -EADDRINUSE */
    
    The expected behavior for sk_reuseport_match() is, it should only allow
    the "cached" tb->fast* address to be used as a wildcard match but not
    the address of the binding sk.  To do that, the current
    "bool match_wildcard" arg is split into
    "bool match_sk1_wildcard" and "bool match_sk2_wildcard".
    
    This change only affects the sk_reuseport_match() which is only
    used by inet_csk (e.g. TCP).
    The other use cases are calling inet_rcv_saddr_equal() and
    this patch makes it pass the same "match_wildcard" arg twice to
    the "ipv[46]_rcv_saddr_equal(..., match_wildcard, match_wildcard)".
    
    Cc: Josef Bacik <jbacik@fb.com>
    Fixes: 637bc8b ("inet: reset tb->fastreuseport when adding a reuseport sk")
    Signed-off-by: Martin KaFai Lau <kafai@fb.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    iamkafai authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    4d827ed View commit details
    Browse the repository at this point in the history
  8. net: ipip: fix wrong address family in init error path

    [ Upstream commit 57ebc8f ]
    
    In case of error with MPLS support the code is misusing AF_INET
    instead of AF_MPLS.
    
    Fixes: 1b69e7e ("ipip: support MPLS over IPv4")
    Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    vvfedorenko authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    a9595d1 View commit details
    Browse the repository at this point in the history
  9. net/mlx5: Add command entry handling completion

    [ Upstream commit 17d00e8 ]
    
    When FW response to commands is very slow and all command entries in
    use are waiting for completion we can have a race where commands can get
    timeout before they get out of the queue and handled. Timeout
    completion on uninitialized command will cause releasing command's
    buffers before accessing it for initialization and then we will get NULL
    pointer exception while trying access it. It may also cause releasing
    buffers of another command since we may have timeout completion before
    even allocating entry index for this command.
    Add entry handling completion to avoid this race.
    
    Fixes: e126ba9 ("mlx5: Add driver for Mellanox Connect-IB adapters")
    Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
    Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Moshe Shemesh authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    212bcf1 View commit details
    Browse the repository at this point in the history
  10. net: mvpp2: fix RX hashing for non-10G ports

    [ Upstream commit 3138a07 ]
    
    When rxhash is enabled on any ethernet port except the first in each CP
    block, traffic flow is prevented.  The analysis is below:
    
    I've been investigating this afternoon, and what I've found, comparing
    a kernel without 895586d and with 895586d applied is:
    
    - The table programmed into the hardware via mvpp22_rss_fill_table()
      appears to be identical with or without the commit.
    
    - When rxhash is enabled on eth2, mvpp2_rss_port_c2_enable() reports
      that c2.attr[0] and c2.attr[2] are written back containing:
    
       - with 895586d, failing:    00200000 40000000
       - without 895586d, working: 04000000 40000000
    
    - When disabling rxhash, c2.attr[0] and c2.attr[2] are written back as:
    
       04000000 00000000
    
    The second value represents the MVPP22_CLS_C2_ATTR2_RSS_EN bit, the
    first value is the queue number, which comprises two fields. The high
    5 bits are 24:29 and the low three are 21:23 inclusive. This comes
    from:
    
           c2.attr[0] = MVPP22_CLS_C2_ATTR0_QHIGH(qh) |
                         MVPP22_CLS_C2_ATTR0_QLOW(ql);
    
    So, the working case gives eth2 a queue id of 4.0, or 32 as per
    port->first_rxq, and the non-working case a queue id of 0.1, or 1.
    The allocation of queue IDs seems to be in mvpp2_port_probe():
    
            if (priv->hw_version == MVPP21)
                    port->first_rxq = port->id * port->nrxqs;
            else
                    port->first_rxq = port->id * priv->max_port_rxqs;
    
    Where:
    
            if (priv->hw_version == MVPP21)
                    priv->max_port_rxqs = 8;
            else
                    priv->max_port_rxqs = 32;
    
    Making the port 0 (eth0 / eth1) have port->first_rxq = 0, and port 1
    (eth2) be 32. It seems the idea is that the first 32 queues belong to
    port 0, the second 32 queues belong to port 1, etc.
    
    mvpp2_rss_port_c2_enable() gets the queue number from it's parameter,
    'ctx', which comes from mvpp22_rss_ctx(port, 0). This returns
    port->rss_ctx[0].
    
    mvpp22_rss_context_create() is responsible for allocating that, which
    it does by looking for an unallocated priv->rss_tables[] pointer. This
    table is shared amongst all ports on the CP silicon.
    
    When we write the tables in mvpp22_rss_fill_table(), the RSS table
    entry is defined by:
    
                    u32 sel = MVPP22_RSS_INDEX_TABLE(rss_ctx) |
                              MVPP22_RSS_INDEX_TABLE_ENTRY(i);
    
    where rss_ctx is the context ID (queue number) and i is the index in
    the table.
    
    If we look at what is written:
    
    - The first table to be written has "sel" values of 00000000..0000001f,
      containing values 0..3. This appears to be for eth1. This is table 0,
      RX queue number 0.
    - The second table has "sel" values of 00000100..0000011f, and appears
      to be for eth2.  These contain values 0x20..0x23. This is table 1,
      RX queue number 0.
    - The third table has "sel" values of 00000200..0000021f, and appears
      to be for eth3.  These contain values 0x40..0x43. This is table 2,
      RX queue number 0.
    
    How do queue numbers translate to the RSS table?  There is another
    table - the RXQ2RSS table, indexed by the MVPP22_RSS_INDEX_QUEUE field
    of MVPP22_RSS_INDEX and accessed through the MVPP22_RXQ2RSS_TABLE
    register. Before 895586d, it was:
    
           mvpp2_write(priv, MVPP22_RSS_INDEX,
                       MVPP22_RSS_INDEX_QUEUE(port->first_rxq));
           mvpp2_write(priv, MVPP22_RXQ2RSS_TABLE,
                       MVPP22_RSS_TABLE_POINTER(port->id));
    
    and after:
    
           mvpp2_write(priv, MVPP22_RSS_INDEX, MVPP22_RSS_INDEX_QUEUE(ctx));
           mvpp2_write(priv, MVPP22_RXQ2RSS_TABLE, MVPP22_RSS_TABLE_POINTER(ctx));
    
    Before the commit, for eth2, that would've contained '32' for the
    index and '1' for the table pointer - mapping queue 32 to table 1.
    Remember that this is queue-high.queue-low of 4.0.
    
    After the commit, we appear to map queue 1 to table 1. That again
    looks fine on the face of it.
    
    Section 9.3.1 of the A8040 manual seems indicate the reason that the
    queue number is separated. queue-low seems to always come from the
    classifier, whereas queue-high can be from the ingress physical port
    number or the classifier depending on the MVPP2_CLS_SWFWD_PCTRL_REG.
    
    We set the port bit in MVPP2_CLS_SWFWD_PCTRL_REG, meaning that queue-high
    comes from the MVPP2_CLS_SWFWD_P2HQ_REG() register... and this seems to
    be where our bug comes from.
    
    mvpp2_cls_oversize_rxq_set() sets this up as:
    
            mvpp2_write(port->priv, MVPP2_CLS_SWFWD_P2HQ_REG(port->id),
                        (port->first_rxq >> MVPP2_CLS_OVERSIZE_RXQ_LOW_BITS));
    
            val = mvpp2_read(port->priv, MVPP2_CLS_SWFWD_PCTRL_REG);
            val |= MVPP2_CLS_SWFWD_PCTRL_MASK(port->id);
            mvpp2_write(port->priv, MVPP2_CLS_SWFWD_PCTRL_REG, val);
    
    Setting the MVPP2_CLS_SWFWD_PCTRL_MASK bit means that the queue-high
    for eth2 is _always_ 4, so only queues 32 through 39 inclusive are
    available to eth2. Yet, we're trying to tell the classifier to set
    queue-high, which will be ignored, to zero. Hence, the queue-high
    field (MVPP22_CLS_C2_ATTR0_QHIGH()) from the classifier will be
    ignored.
    
    This means we end up directing traffic from eth2 not to queue 1, but
    to queue 33, and then we tell it to look up queue 33 in the RSS table.
    However, RSS table has not been programmed for queue 33, and so it ends
    up (presumably) dropping the packets.
    
    It seems that mvpp22_rss_context_create() doesn't take account of the
    fact that the upper 5 bits of the queue ID can't actually be changed
    due to the settings in mvpp2_cls_oversize_rxq_set(), _or_ it seems that
    mvpp2_cls_oversize_rxq_set() has been missed in this commit. Either
    way, these two functions mutually disagree with what queue number
    should be used.
    
    Looking deeper into what mvpp2_cls_oversize_rxq_set() and the MTU
    validation is doing, it seems that MVPP2_CLS_SWFWD_P2HQ_REG() is used
    for over-sized packets attempting to egress through this port. With
    the classifier having had RSS enabled and directing eth2 traffic to
    queue 1, we may still have packets appearing on queue 32 for this port.
    
    However, the only way we may end up with over-sized packets attempting
    to egress through eth2 - is if the A8040 forwards frames between its
    ports. From what I can see, we don't support that feature, and the
    kernel restricts the egress packet size to the MTU. In any case, if we
    were to attempt to transmit an oversized packet, we have no support in
    the kernel to deal with that appearing in the port's receive queue.
    
    So, this patch attempts to solve the issue by clearing the
    MVPP2_CLS_SWFWD_PCTRL_MASK() bit, allowing MVPP22_CLS_C2_ATTR0_QHIGH()
    from the classifier to define the queue-high field of the queue number.
    
    My testing seems to confirm my findings above - clearing this bit
    means that if I enable rxhash on eth2, the interface can then pass
    traffic, as we are now directing traffic to RX queue 1 rather than
    queue 33. Traffic still seems to work with rxhash off as well.
    
    Reported-by: Matteo Croce <mcroce@redhat.com>
    Tested-by: Matteo Croce <mcroce@redhat.com>
    Fixes: 895586d ("net: mvpp2: cls: Use RSS contexts to handle RSS tables")
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Russell King authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    84e9131 View commit details
    Browse the repository at this point in the history
  11. net: nlmsg_cancel() if put fails for nhmsg

    [ Upstream commit d69100b ]
    
    Fixes data remnant seen when we fail to reserve space for a
    nexthop group during a larger dump.
    
    If we fail the reservation, we goto nla_put_failure and
    cancel the message.
    
    Reproduce with the following iproute2 commands:
    =====================
    ip link add dummy1 type dummy
    ip link add dummy2 type dummy
    ip link add dummy3 type dummy
    ip link add dummy4 type dummy
    ip link add dummy5 type dummy
    ip link add dummy6 type dummy
    ip link add dummy7 type dummy
    ip link add dummy8 type dummy
    ip link add dummy9 type dummy
    ip link add dummy10 type dummy
    ip link add dummy11 type dummy
    ip link add dummy12 type dummy
    ip link add dummy13 type dummy
    ip link add dummy14 type dummy
    ip link add dummy15 type dummy
    ip link add dummy16 type dummy
    ip link add dummy17 type dummy
    ip link add dummy18 type dummy
    ip link add dummy19 type dummy
    ip link add dummy20 type dummy
    ip link add dummy21 type dummy
    ip link add dummy22 type dummy
    ip link add dummy23 type dummy
    ip link add dummy24 type dummy
    ip link add dummy25 type dummy
    ip link add dummy26 type dummy
    ip link add dummy27 type dummy
    ip link add dummy28 type dummy
    ip link add dummy29 type dummy
    ip link add dummy30 type dummy
    ip link add dummy31 type dummy
    ip link add dummy32 type dummy
    
    ip link set dummy1 up
    ip link set dummy2 up
    ip link set dummy3 up
    ip link set dummy4 up
    ip link set dummy5 up
    ip link set dummy6 up
    ip link set dummy7 up
    ip link set dummy8 up
    ip link set dummy9 up
    ip link set dummy10 up
    ip link set dummy11 up
    ip link set dummy12 up
    ip link set dummy13 up
    ip link set dummy14 up
    ip link set dummy15 up
    ip link set dummy16 up
    ip link set dummy17 up
    ip link set dummy18 up
    ip link set dummy19 up
    ip link set dummy20 up
    ip link set dummy21 up
    ip link set dummy22 up
    ip link set dummy23 up
    ip link set dummy24 up
    ip link set dummy25 up
    ip link set dummy26 up
    ip link set dummy27 up
    ip link set dummy28 up
    ip link set dummy29 up
    ip link set dummy30 up
    ip link set dummy31 up
    ip link set dummy32 up
    
    ip link set dummy33 up
    ip link set dummy34 up
    
    ip link set vrf-red up
    ip link set vrf-blue up
    
    ip link set dummyVRFred up
    ip link set dummyVRFblue up
    
    ip ro add 1.1.1.1/32 dev dummy1
    ip ro add 1.1.1.2/32 dev dummy2
    ip ro add 1.1.1.3/32 dev dummy3
    ip ro add 1.1.1.4/32 dev dummy4
    ip ro add 1.1.1.5/32 dev dummy5
    ip ro add 1.1.1.6/32 dev dummy6
    ip ro add 1.1.1.7/32 dev dummy7
    ip ro add 1.1.1.8/32 dev dummy8
    ip ro add 1.1.1.9/32 dev dummy9
    ip ro add 1.1.1.10/32 dev dummy10
    ip ro add 1.1.1.11/32 dev dummy11
    ip ro add 1.1.1.12/32 dev dummy12
    ip ro add 1.1.1.13/32 dev dummy13
    ip ro add 1.1.1.14/32 dev dummy14
    ip ro add 1.1.1.15/32 dev dummy15
    ip ro add 1.1.1.16/32 dev dummy16
    ip ro add 1.1.1.17/32 dev dummy17
    ip ro add 1.1.1.18/32 dev dummy18
    ip ro add 1.1.1.19/32 dev dummy19
    ip ro add 1.1.1.20/32 dev dummy20
    ip ro add 1.1.1.21/32 dev dummy21
    ip ro add 1.1.1.22/32 dev dummy22
    ip ro add 1.1.1.23/32 dev dummy23
    ip ro add 1.1.1.24/32 dev dummy24
    ip ro add 1.1.1.25/32 dev dummy25
    ip ro add 1.1.1.26/32 dev dummy26
    ip ro add 1.1.1.27/32 dev dummy27
    ip ro add 1.1.1.28/32 dev dummy28
    ip ro add 1.1.1.29/32 dev dummy29
    ip ro add 1.1.1.30/32 dev dummy30
    ip ro add 1.1.1.31/32 dev dummy31
    ip ro add 1.1.1.32/32 dev dummy32
    
    ip next add id 1 via 1.1.1.1 dev dummy1
    ip next add id 2 via 1.1.1.2 dev dummy2
    ip next add id 3 via 1.1.1.3 dev dummy3
    ip next add id 4 via 1.1.1.4 dev dummy4
    ip next add id 5 via 1.1.1.5 dev dummy5
    ip next add id 6 via 1.1.1.6 dev dummy6
    ip next add id 7 via 1.1.1.7 dev dummy7
    ip next add id 8 via 1.1.1.8 dev dummy8
    ip next add id 9 via 1.1.1.9 dev dummy9
    ip next add id 10 via 1.1.1.10 dev dummy10
    ip next add id 11 via 1.1.1.11 dev dummy11
    ip next add id 12 via 1.1.1.12 dev dummy12
    ip next add id 13 via 1.1.1.13 dev dummy13
    ip next add id 14 via 1.1.1.14 dev dummy14
    ip next add id 15 via 1.1.1.15 dev dummy15
    ip next add id 16 via 1.1.1.16 dev dummy16
    ip next add id 17 via 1.1.1.17 dev dummy17
    ip next add id 18 via 1.1.1.18 dev dummy18
    ip next add id 19 via 1.1.1.19 dev dummy19
    ip next add id 20 via 1.1.1.20 dev dummy20
    ip next add id 21 via 1.1.1.21 dev dummy21
    ip next add id 22 via 1.1.1.22 dev dummy22
    ip next add id 23 via 1.1.1.23 dev dummy23
    ip next add id 24 via 1.1.1.24 dev dummy24
    ip next add id 25 via 1.1.1.25 dev dummy25
    ip next add id 26 via 1.1.1.26 dev dummy26
    ip next add id 27 via 1.1.1.27 dev dummy27
    ip next add id 28 via 1.1.1.28 dev dummy28
    ip next add id 29 via 1.1.1.29 dev dummy29
    ip next add id 30 via 1.1.1.30 dev dummy30
    ip next add id 31 via 1.1.1.31 dev dummy31
    ip next add id 32 via 1.1.1.32 dev dummy32
    
    i=100
    
    while [ $i -le 200 ]
    do
    ip next add id $i group 1/2/3/4/5/6/7/8/9/10/11/12/13/14/15/16/17/18/19
    
    	echo $i
    
    	((i++))
    
    done
    
    ip next add id 999 group 1/2/3/4/5/6
    
    ip next ls
    
    ========================
    
    Fixes: ab84be7 ("net: Initial nexthop code")
    Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
    Reviewed-by: David Ahern <dsahern@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    sworleys authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    7e0e066 View commit details
    Browse the repository at this point in the history
  12. net: qrtr: Fix passing invalid reference to qrtr_local_enqueue()

    [ Upstream commit d28ea1f ]
    
    Once the traversal of the list is completed with list_for_each_entry(),
    the iterator (node) will point to an invalid object. So passing this to
    qrtr_local_enqueue() which is outside of the iterator block is erroneous
    eventhough the object is not used.
    
    So fix this by passing NULL to qrtr_local_enqueue().
    
    Fixes: bdabad3 ("net: Add Qualcomm IPC router")
    Reported-by: kbuild test robot <lkp@intel.com>
    Reported-by: Julia Lawall <julia.lawall@lip6.fr>
    Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
    Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Mani-Sadhasivam authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    83588bf View commit details
    Browse the repository at this point in the history
  13. net: revert "net: get rid of an signed integer overflow in ip_idents_…

    …reserve()"
    
    [ Upstream commit a6211ca ]
    
    Commit adb0311 ("net: get rid of an signed integer overflow in ip_idents_reserve()")
    used atomic_cmpxchg to replace "atomic_add_return" inside the function
    "ip_idents_reserve". The reason was to avoid UBSAN warning.
    However, this change has caused performance degrade and in GCC-8,
    fno-strict-overflow is now mapped to -fwrapv -fwrapv-pointer
    and signed integer overflow is now undefined by default at all
    optimization levels[1]. Moreover, it was a bug in UBSAN vs -fwrapv
    /-fno-strict-overflow, so Let's revert it safely.
    
    [1] https://gcc.gnu.org/gcc-8/changes.html
    
    Suggested-by: Peter Zijlstra <peterz@infradead.org>
    Suggested-by: Eric Dumazet <edumazet@google.com>
    Cc: "David S. Miller" <davem@davemloft.net>
    Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
    Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
    Cc: Jakub Kicinski <kuba@kernel.org>
    Cc: Jiri Pirko <jiri@resnulli.us>
    Cc: Arvind Sankar <nivedita@alum.mit.edu>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Eric Dumazet <edumazet@google.com>
    Cc: Jiong Wang <jiongwang@huawei.com>
    Signed-off-by: Yuqi Jin <jinyuqi@huawei.com>
    Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    yuqijin16 authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    f123981 View commit details
    Browse the repository at this point in the history
  14. net sched: fix reporting the first-time use timestamp

    [ Upstream commit b15e626 ]
    
    When a new action is installed, firstuse field of 'tcf_t' is explicitly set
    to 0. Value of zero means "new action, not yet used"; as a packet hits the
    action, 'firstuse' is stamped with the current jiffies value.
    
    tcf_tm_dump() should return 0 for firstuse if action has not yet been hit.
    
    Fixes: 48d8ee1 ("net sched actions: aggregate dumping of actions timeinfo")
    Cc: Jamal Hadi Salim <jhs@mojatatu.com>
    Signed-off-by: Roman Mashak <mrv@mojatatu.com>
    Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Roman Mashak authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    587e134 View commit details
    Browse the repository at this point in the history
  15. net/tls: fix race condition causing kernel panic

    [ Upstream commit 0cada33 ]
    
    tls_sw_recvmsg() and tls_decrypt_done() can be run concurrently.
    // tls_sw_recvmsg()
    	if (atomic_read(&ctx->decrypt_pending))
    		crypto_wait_req(-EINPROGRESS, &ctx->async_wait);
    	else
    		reinit_completion(&ctx->async_wait.completion);
    
    //tls_decrypt_done()
      	pending = atomic_dec_return(&ctx->decrypt_pending);
    
      	if (!pending && READ_ONCE(ctx->async_notify))
      		complete(&ctx->async_wait.completion);
    
    Consider the scenario tls_decrypt_done() is about to run complete()
    
    	if (!pending && READ_ONCE(ctx->async_notify))
    
    and tls_sw_recvmsg() reads decrypt_pending == 0, does reinit_completion(),
    then tls_decrypt_done() runs complete(). This sequence of execution
    results in wrong completion. Consequently, for next decrypt request,
    it will not wait for completion, eventually on connection close, crypto
    resources freed, there is no way to handle pending decrypt response.
    
    This race condition can be avoided by having atomic_read() mutually
    exclusive with atomic_dec_return(),complete().Intoduced spin lock to
    ensure the mutual exclution.
    
    Addressed similar problem in tx direction.
    
    v1->v2:
    - More readable commit message.
    - Corrected the lock to fix new race scenario.
    - Removed barrier which is not needed now.
    
    Fixes: a42055e ("net/tls: Add support for async encryption of records for performance")
    Signed-off-by: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
    Reviewed-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    vinaychelsio authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    cf4cc95 View commit details
    Browse the repository at this point in the history
  16. nexthop: Fix attribute checking for groups

    [ Upstream commit 84be69b ]
    
    For nexthop groups, attributes after NHA_GROUP_TYPE are invalid, but
    nh_check_attr_group starts checking at NHA_GROUP. The group type defaults
    to multipath and the NHA_GROUP_TYPE is currently optional so this has
    slipped through so far. Fix the attribute checking to handle support of
    new group types.
    
    Fixes: 430a049 ("nexthop: Add support for nexthop groups")
    Signed-off-by: ASSOGBA Emery <assogba.emery@gmail.com>
    Signed-off-by: David Ahern <dsahern@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    dsahern authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    983fa2e View commit details
    Browse the repository at this point in the history
  17. r8152: support additional Microsoft Surface Ethernet Adapter variant

    [ Upstream commit c27a204 ]
    
    Device id 0927 is the RTL8153B-based component of the 'Surface USB-C to
    Ethernet and USB Adapter' and may be used as a component of other devices
    in future. Tested and working with the r8152 driver.
    
    Update the cdc_ether blacklist due to the RTL8153 'network jam on suspend'
    issue which this device will cause (personally confirmed).
    
    Signed-off-by: Marc Payne <marc.payne@mdpsys.co.uk>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Marc Payne authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    3403676 View commit details
    Browse the repository at this point in the history
  18. sctp: Don't add the shutdown timer if its already been added

    [ Upstream commit 20a785a ]
    
    This BUG halt was reported a while back, but the patch somehow got
    missed:
    
    PID: 2879   TASK: c16adaa0  CPU: 1   COMMAND: "sctpn"
     #0 [f418dd28] crash_kexec at c04a7d8c
     Freescale#1 [f418dd7c] oops_end at c0863e02
     Freescale#2 [f418dd90] do_invalid_op at c040aaca
     Freescale#3 [f418de28] error_code (via invalid_op) at c08631a5
        EAX: f34baac0  EBX: 00000090  ECX: f418deb0  EDX: f5542950  EBP: 00000000
        DS:  007b      ESI: f34ba800  ES:  007b      EDI: f418dea0  GS:  00e0
        CS:  0060      EIP: c046fa5e  ERR: ffffffff  EFLAGS: 00010286
     Freescale#4 [f418de5c] add_timer at c046fa5e
     Freescale#5 [f418de68] sctp_do_sm at f8db8c77 [sctp]
     Freescale#6 [f418df30] sctp_primitive_SHUTDOWN at f8dcc1b5 [sctp]
     Freescale#7 [f418df48] inet_shutdown at c080baf9
     Freescale#8 [f418df5c] sys_shutdown at c079eedf
     Freescale#9 [f418df7] sys_socketcall at c079fe88
        EAX: ffffffda  EBX: 0000000d  ECX: bfceea90  EDX: 0937af98
        DS:  007b      ESI: 0000000c  ES:  007b      EDI: b7150ae4
        SS:  007b      ESP: bfceea7c  EBP: bfceeaa8  GS:  0033
        CS:  0073      EIP: b775c424  ERR: 00000066  EFLAGS: 00000282
    
    It appears that the side effect that starts the shutdown timer was processed
    multiple times, which can happen as multiple paths can trigger it.  This of
    course leads to the BUG halt in add_timer getting called.
    
    Fix seems pretty straightforward, just check before the timer is added if its
    already been started.  If it has mod the timer instead to min(current
    expiration, new expiration)
    
    Its been tested but not confirmed to fix the problem, as the issue has only
    occured in production environments where test kernels are enjoined from being
    installed.  It appears to be a sane fix to me though.  Also, recentely,
    Jere found a reproducer posted on list to confirm that this resolves the
    issues
    
    Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
    CC: Vlad Yasevich <vyasevich@gmail.com>
    CC: "David S. Miller" <davem@davemloft.net>
    CC: jere.leppanen@nokia.com
    CC: marcelo.leitner@gmail.com
    CC: netdev@vger.kernel.org
    Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    nhorman authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    70989e5 View commit details
    Browse the repository at this point in the history
  19. sctp: Start shutdown on association restart if in SHUTDOWN-SENT state…

    … and socket is closed
    
    [ Upstream commit d3e8e4c ]
    
    Commit bdf6fa5 ("sctp: handle association restarts when the
    socket is closed.") starts shutdown when an association is restarted,
    if in SHUTDOWN-PENDING state and the socket is closed. However, the
    rationale stated in that commit applies also when in SHUTDOWN-SENT
    state - we don't want to move an association to ESTABLISHED state when
    the socket has been closed, because that results in an association
    that is unreachable from user space.
    
    The problem scenario:
    
    1.  Client crashes and/or restarts.
    
    2.  Server (using one-to-one socket) calls close(). SHUTDOWN is lost.
    
    3.  Client reconnects using the same addresses and ports.
    
    4.  Server's association is restarted. The association and the socket
        move to ESTABLISHED state, even though the server process has
        closed its descriptor.
    
    Also, after step 4 when the server process exits, some resources are
    leaked in an attempt to release the underlying inet sock structure in
    ESTABLISHED state:
    
        IPv4: Attempt to release TCP socket in state 1 00000000377288c7
    
    Fix by acting the same way as in SHUTDOWN-PENDING state. That is, if
    an association is restarted in SHUTDOWN-SENT state and the socket is
    closed, then start shutdown and don't move the association or the
    socket to ESTABLISHED state.
    
    Fixes: bdf6fa5 ("sctp: handle association restarts when the socket is closed.")
    Signed-off-by: Jere Leppänen <jere.leppanen@nokia.com>
    Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    JereLeppanen authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    5398c7f View commit details
    Browse the repository at this point in the history
  20. tipc: block BH before using dst_cache

    [ Upstream commit 1378817 ]
    
    dst_cache_get() documents it must be used with BH disabled.
    
    sysbot reported :
    
    BUG: using smp_processor_id() in preemptible [00000000] code: /21697
    caller is dst_cache_get+0x3a/0xb0 net/core/dst_cache.c:68
    CPU: 0 PID: 21697 Comm:  Not tainted 5.7.0-rc6-syzkaller #0
    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+0x188/0x20d lib/dump_stack.c:118
     check_preemption_disabled lib/smp_processor_id.c:47 [inline]
     debug_smp_processor_id.cold+0x88/0x9b lib/smp_processor_id.c:57
     dst_cache_get+0x3a/0xb0 net/core/dst_cache.c:68
     tipc_udp_xmit.isra.0+0xb9/0xad0 net/tipc/udp_media.c:164
     tipc_udp_send_msg+0x3e6/0x490 net/tipc/udp_media.c:244
     tipc_bearer_xmit_skb+0x1de/0x3f0 net/tipc/bearer.c:526
     tipc_enable_bearer+0xb2f/0xd60 net/tipc/bearer.c:331
     __tipc_nl_bearer_enable+0x2bf/0x390 net/tipc/bearer.c:995
     tipc_nl_bearer_enable+0x1e/0x30 net/tipc/bearer.c:1003
     genl_family_rcv_msg_doit net/netlink/genetlink.c:673 [inline]
     genl_family_rcv_msg net/netlink/genetlink.c:718 [inline]
     genl_rcv_msg+0x627/0xdf0 net/netlink/genetlink.c:735
     netlink_rcv_skb+0x15a/0x410 net/netlink/af_netlink.c:2469
     genl_rcv+0x24/0x40 net/netlink/genetlink.c:746
     netlink_unicast_kernel net/netlink/af_netlink.c:1303 [inline]
     netlink_unicast+0x537/0x740 net/netlink/af_netlink.c:1329
     netlink_sendmsg+0x882/0xe10 net/netlink/af_netlink.c:1918
     sock_sendmsg_nosec net/socket.c:652 [inline]
     sock_sendmsg+0xcf/0x120 net/socket.c:672
     ____sys_sendmsg+0x6bf/0x7e0 net/socket.c:2362
     ___sys_sendmsg+0x100/0x170 net/socket.c:2416
     __sys_sendmsg+0xec/0x1b0 net/socket.c:2449
     do_syscall_64+0xf6/0x7d0 arch/x86/entry/common.c:295
     entry_SYSCALL_64_after_hwframe+0x49/0xb3
    RIP: 0033:0x45ca29
    
    Fixes: e9c1a79 ("tipc: add dst_cache support for udp media")
    Cc: Xin Long <lucien.xin@gmail.com>
    Cc: Jon Maloy <jon.maloy@ericsson.com>
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Reported-by: syzbot <syzkaller@googlegroups.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Eric Dumazet authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    8c9df6c View commit details
    Browse the repository at this point in the history
  21. net/mlx5e: kTLS, Destroy key object after destroying the TIS

    [ Upstream commit 16736e1 ]
    
    The TLS TIS object contains the dek/key ID.
    By destroying the key first, the TIS would contain an invalid
    non-existing key ID.
    Reverse the destroy order, this also acheives the desired assymetry
    between the destroy and the create flows.
    
    Fixes: d2ead1f ("net/mlx5e: Add kTLS TX HW offload support")
    Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
    Reviewed-by: Boris Pismenny <borisp@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Tariq Toukan authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    f9e2700 View commit details
    Browse the repository at this point in the history
  22. net/mlx5e: Fix inner tirs handling

    [ Upstream commit a16b8e0 ]
    
    In the cited commit inner_tirs argument was added to create and destroy
    inner tirs, and no indication was added to mlx5e_modify_tirs_hash()
    function. In order to have a consistent handling, use
    inner_indir_tir[0].tirn in tirs destroy/modify function as an indication
    to whether inner tirs are created.
    Inner tirs are not created for representors and before this commit,
    a call to mlx5e_modify_tirs_hash() was sending HW commands to
    modify non-existent inner tirs.
    
    Fixes: 46dc933 ("net/mlx5e: Provide explicit directive if to create inner indirect tirs")
    Signed-off-by: Roi Dayan <roid@mellanox.com>
    Reviewed-by: Vlad Buslov <vladbu@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    roidayan authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    e23f88f View commit details
    Browse the repository at this point in the history
  23. net/mlx5: Fix memory leak in mlx5_events_init

    [ Upstream commit df14ad1 ]
    
    Fix memory leak in mlx5_events_init(), in case
    create_single_thread_workqueue() fails, events
    struct should be freed.
    
    Fixes: 5d3c537 ("net/mlx5: Handle event of power detection in the PCIE slot")
    Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
    Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Moshe Shemesh authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    02c97e8 View commit details
    Browse the repository at this point in the history
  24. net/mlx5e: Update netdev txq on completions during closure

    [ Upstream commit 5e911e2 ]
    
    On sq closure when we free its descriptors, we should also update netdev
    txq on completions which would not arrive. Otherwise if we reopen sqs
    and attach them back, for example on fw fatal recovery flow, we may get
    tx timeout.
    
    Fixes: 29429f3 ("net/mlx5e: Timeout if SQ doesn't flush during close")
    Signed-off-by: Moshe Shemesh <moshe@mellanox.com>
    Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Moshe Shemesh authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    9fe88c9 View commit details
    Browse the repository at this point in the history
  25. net/mlx5: Fix error flow in case of function_setup failure

    [ Upstream commit 4f7400d ]
    
    Currently, if an error occurred during mlx5_function_setup(), we
    keep dev->state as DEVICE_STATE_UP.
    Fixing it by adding a goto label.
    
    Fixes: e161105 ("net/mlx5: Function setup/teardown procedures")
    Signed-off-by: Shay Drory <shayd@mellanox.com>
    Reviewed-by: Moshe Shemesh <moshe@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    shayshd authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    f493398 View commit details
    Browse the repository at this point in the history
  26. net/mlx5: Annotate mutex destroy for root ns

    commit 9ca4153 upstream.
    
    Invoke mutex_destroy() to catch any errors.
    
    Fixes: 2cc43b4 ("net/mlx5_core: Managing root flow table")
    Signed-off-by: Roi Dayan <roid@mellanox.com>
    Reviewed-by: Mark Bloch <markb@mellanox.com>
    Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    roidayan authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    3f4f034 View commit details
    Browse the repository at this point in the history
  27. net/tls: fix encryption error checking

    commit a7bff11 upstream.
    
    bpf_exec_tx_verdict() can return negative value for copied
    variable. In that case this value will be pushed back to caller
    and the real error code will be lost. Fix it using signed type and
    checking for positive value.
    
    Fixes: d10523d ("net/tls: free the record on encryption error")
    Fixes: d3b18ad ("tls: add bpf support to sk_msg handling")
    Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    vvfedorenko authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    cff9e73 View commit details
    Browse the repository at this point in the history
  28. net/tls: free record only on encryption error

    commit 635d939 upstream.
    
    We cannot free record on any transient error because it leads to
    losing previos data. Check socket error to know whether record must
    be freed or not.
    
    Fixes: d10523d ("net/tls: free the record on encryption error")
    Signed-off-by: Vadim Fedorenko <vfedorenko@novek.ru>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    vvfedorenko authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    d12fc81 View commit details
    Browse the repository at this point in the history
  29. net: sun: fix missing release regions in cas_init_one().

    commit 5a73015 upstream.
    
    In cas_init_one(), "pdev" is requested by "pci_request_regions", but it
    was not released after a call of the function “pci_write_config_byte”
    failed. Thus replace the jump target “err_write_cacheline” by
    "err_out_free_res".
    
    Fixes: 1f26dac ("[NET]: Add Sun Cassini driver.")
    Signed-off-by: Qiushi Wu <wu000273@umn.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    QiushiWu authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    fcb4d58 View commit details
    Browse the repository at this point in the history
  30. net/mlx4_core: fix a memory leak bug.

    commit febfd9d upstream.
    
    In function mlx4_opreq_action(), pointer "mailbox" is not released,
    when mlx4_cmd_box() return and error, causing a memory leak bug.
    Fix this issue by going to "out" label, mlx4_free_cmd_mailbox() can
    free this pointer.
    
    Fixes: fe6f700 ("net/mlx4_core: Respond to operation request by firmware")
    Signed-off-by: Qiushi Wu <wu000273@umn.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    QiushiWu authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    9aeacb8 View commit details
    Browse the repository at this point in the history
  31. mlxsw: spectrum: Fix use-after-free of split/unsplit/type_set in case…

    … reload fails
    
    commit 4340f42 upstream.
    
    In case of reload fail, the mlxsw_sp->ports contains a pointer to a
    freed memory (either by reload_down() or reload_up() error path).
    Fix this by initializing the pointer to NULL and checking it before
    dereferencing in split/unsplit/type_set callpaths.
    
    Fixes: 24cc68a ("mlxsw: core: Add support for reload")
    Reported-by: Danielle Ratson <danieller@mellanox.com>
    Signed-off-by: Jiri Pirko <jiri@mellanox.com>
    Signed-off-by: Ido Schimmel <idosch@mellanox.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jpirko authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    c5b2233 View commit details
    Browse the repository at this point in the history
  32. ARM: dts: rockchip: fix phy nodename for rk3228-evb

    [ Upstream commit 287e0d5 ]
    
    A test with the command below gives for example this error:
    
    arch/arm/boot/dts/rk3228-evb.dt.yaml: phy@0:
    '#phy-cells' is a required property
    
    The phy nodename is normally used by a phy-handle.
    This node is however compatible with
    "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22"
    which is just been added to 'ethernet-phy.yaml'.
    So change nodename to 'ethernet-phy' for which '#phy-cells'
    is not a required property
    
    make ARCH=arm dtbs_check
    DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
    phy/phy-provider.yaml
    
    Signed-off-by: Johan Jonker <jbx6244@gmail.com>
    Signed-off-by: Heiko Stuebner <heiko@sntech.de>
    Link: https://lore.kernel.org/r/20200416170321.4216-1-jbx6244@gmail.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Johan Jonker authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    203a45e View commit details
    Browse the repository at this point in the history
  33. ARM: dts: rockchip: fix phy nodename for rk3229-xms6

    [ Upstream commit 621c8d0 ]
    
    A test with the command below gives for example this error:
    
    arch/arm/boot/dts/rk3229-xms6.dt.yaml: phy@0:
    '#phy-cells' is a required property
    
    The phy nodename is normally used by a phy-handle.
    This node is however compatible with
    "ethernet-phy-id1234.d400", "ethernet-phy-ieee802.3-c22"
    which is just been added to 'ethernet-phy.yaml'.
    So change nodename to 'ethernet-phy' for which '#phy-cells'
    is not a required property
    
    make ARCH=arm dtbs_check
    DT_SCHEMA_FILES=~/.local/lib/python3.5/site-packages/dtschema/schemas/
    phy/phy-provider.yaml
    
    Signed-off-by: Johan Jonker <jbx6244@gmail.com>
    Signed-off-by: Heiko Stuebner <heiko@sntech.de>
    Link: https://lore.kernel.org/r/20200416170321.4216-2-jbx6244@gmail.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Johan Jonker authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    dd35a80 View commit details
    Browse the repository at this point in the history
  34. arm64: dts: rockchip: fix status for &gmac2phy in rk3328-evb.dts

    [ Upstream commit c617ed8 ]
    
    The status was removed of the '&gmac2phy' node with the apply
    of a patch long time ago, so fix status for '&gmac2phy'
    in 'rk3328-evb.dts'.
    
    Signed-off-by: Johan Jonker <jbx6244@gmail.com>
    Link: https://lore.kernel.org/r/20200425122345.12902-2-jbx6244@gmail.com
    Signed-off-by: Heiko Stuebner <heiko@sntech.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Johan Jonker authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    9dc2e51 View commit details
    Browse the repository at this point in the history
  35. arm64: dts: rockchip: swap interrupts interrupt-names rk3399 gpu node

    [ Upstream commit c604fd8 ]
    
    Dts files with Rockchip rk3399 'gpu' nodes were manually verified.
    In order to automate this process arm,mali-midgard.txt
    has been converted to yaml. In the new setup dtbs_check with
    arm,mali-midgard.yaml expects interrupts and interrupt-names values
    in the same order. Fix this for rk3399.
    
    make ARCH=arm64 dtbs_check
    DT_SCHEMA_FILES=Documentation/devicetree/bindings/gpu/
    arm,mali-midgard.yaml
    
    Signed-off-by: Johan Jonker <jbx6244@gmail.com>
    Link: https://lore.kernel.org/r/20200425143837.18706-1-jbx6244@gmail.com
    Signed-off-by: Heiko Stuebner <heiko@sntech.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Johan Jonker authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    96e88e6 View commit details
    Browse the repository at this point in the history
  36. ARM: dts: rockchip: swap clock-names of gpu nodes

    [ Upstream commit b14f389 ]
    
    Dts files with Rockchip 'gpu' nodes were manually verified.
    In order to automate this process arm,mali-utgard.txt
    has been converted to yaml. In the new setup dtbs_check with
    arm,mali-utgard.yaml expects clock-names values
    in the same order, so fix that.
    
    Signed-off-by: Johan Jonker <jbx6244@gmail.com>
    Link: https://lore.kernel.org/r/20200425192500.1808-1-jbx6244@gmail.com
    Signed-off-by: Heiko Stuebner <heiko@sntech.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Johan Jonker authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    881dc2e View commit details
    Browse the repository at this point in the history
  37. ARM: dts: rockchip: fix pinctrl sub nodename for spi in rk322x.dtsi

    [ Upstream commit 855bdca ]
    
    A test with the command below gives these errors:
    
    arch/arm/boot/dts/rk3229-evb.dt.yaml: spi-0:
    '#address-cells' is a required property
    arch/arm/boot/dts/rk3229-evb.dt.yaml: spi-1:
    '#address-cells' is a required property
    arch/arm/boot/dts/rk3229-xms6.dt.yaml: spi-0:
    '#address-cells' is a required property
    arch/arm/boot/dts/rk3229-xms6.dt.yaml: spi-1:
    '#address-cells' is a required property
    
    The $nodename pattern for spi nodes is
    "^spi(@.*|-[0-9a-f])*$". To prevent warnings rename
    'spi-0' and 'spi-1' pinctrl sub nodenames to
    'spi0' and 'spi1' in 'rk322x.dtsi'.
    
    make ARCH=arm dtbs_check
    DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/spi-controller.yaml
    
    Signed-off-by: Johan Jonker <jbx6244@gmail.com>
    Link: https://lore.kernel.org/r/20200424123923.8192-1-jbx6244@gmail.com
    Signed-off-by: Heiko Stuebner <heiko@sntech.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Johan Jonker authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    6ff411a View commit details
    Browse the repository at this point in the history
  38. gpio: tegra: mask GPIO IRQs during IRQ shutdown

    [ Upstream commit 0cf253e ]
    
    The driver currently leaves GPIO IRQs unmasked even when the GPIO IRQ
    client has released the GPIO IRQ. This allows the HW to raise IRQs, and
    SW to process them, after shutdown. Fix this by masking the IRQ when it's
    shut down. This is usually taken care of by the irqchip core, but since
    this driver has a custom irq_shutdown implementation, it must do this
    explicitly itself.
    
    Signed-off-by: Stephen Warren <swarren@nvidia.com>
    Link: https://lore.kernel.org/r/20200427232605.11608-1-swarren@wwwdotorg.org
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    nvswarren authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    3e4e413 View commit details
    Browse the repository at this point in the history
  39. ALSA: usb-audio: add mapping for ASRock TRX40 Creator

    [ Upstream commit da7a8f1 ]
    
    This is another TRX40 based motherboard with ALC1220-VB USB-audio
    that requires a static mapping table.
    
    This motherboard also has a PCI device which advertises no codecs.  The
    PCI ID is 1022:1487 and PCI SSID is 1022:d102.  As this is using the AMD
    vendor ID, don't blacklist for now in case other boards have a working
    audio device with the same ssid.
    
    alsa-info.sh report for this board:
    http://alsa-project.org/db/?f=0a742f89066527497b77ce16bca486daccf8a70c
    
    Signed-off-by: Andrew Oakley <andrew@adoakley.name>
    Link: https://lore.kernel.org/r/20200503141639.35519-1-andrew@adoakley.name
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    adoakley authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    2578135 View commit details
    Browse the repository at this point in the history
  40. net: microchip: encx24j600: add missed kthread_stop

    [ Upstream commit ff8ce31 ]
    
    This driver calls kthread_run() in probe, but forgets to call
    kthread_stop() in probe failure and remove.
    Add the missed kthread_stop() to fix it.
    
    Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    WillLester authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    02a76cd View commit details
    Browse the repository at this point in the history
  41. gfs2: move privileged user check to gfs2_quota_lock_check

    [ Upstream commit 4ed0c30 ]
    
    Before this patch, function gfs2_quota_lock checked if it was called
    from a privileged user, and if so, it bypassed the quota check:
    superuser can operate outside the quotas.
    That's the wrong place for the check because the lock/unlock functions
    are separate from the lock_check function, and you can do lock and
    unlock without actually checking the quotas.
    
    This patch moves the check to gfs2_quota_lock_check.
    
    Signed-off-by: Bob Peterson <rpeterso@redhat.com>
    Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    AstralBob authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    fd5516e View commit details
    Browse the repository at this point in the history
  42. gfs2: Grab glock reference sooner in gfs2_add_revoke

    [ Upstream commit f4e2f5e ]
    
    This patch rearranges gfs2_add_revoke so that the extra glock
    reference is added earlier on in the function to avoid races in which
    the glock is freed before the new reference is taken.
    
    Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
    Signed-off-by: Bob Peterson <rpeterso@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Andreas Gruenbacher authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    4938844 View commit details
    Browse the repository at this point in the history
  43. drm/amdgpu: drop unnecessary cancel_delayed_work_sync on PG ungate

    [ Upstream commit 1fe48ec ]
    
    As this is already properly handled in amdgpu_gfx_off_ctrl(). In fact,
    this unnecessary cancel_delayed_work_sync may leave a small time window
    for race condition and is dangerous.
    
    Signed-off-by: Evan Quan <evan.quan@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Evan Quan authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    4552f27 View commit details
    Browse the repository at this point in the history
  44. drm/amd/powerplay: perform PG ungate prior to CG ungate

    [ Upstream commit f4fcfa4 ]
    
    Since gfxoff should be disabled first before trying to access those
    GC registers.
    
    Signed-off-by: Evan Quan <evan.quan@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Evan Quan authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    2dd33d3 View commit details
    Browse the repository at this point in the history
  45. drm/amdgpu: Use GEM obj reference for KFD BOs

    [ Upstream commit 39b3128 ]
    
    Releasing the AMDGPU BO ref directly leads to problems when BOs were
    exported as DMA bufs. Releasing the GEM reference makes sure that the
    AMDGPU/TTM BO is not freed too early.
    
    Also take a GEM reference when importing BOs from DMABufs to keep
    references to imported BOs balances properly.
    
    Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
    Tested-by: Alex Sierra <alex.sierra@amd.com>
    Acked-by: Christian König <christian.koenig@amd.com>
    Reviewed-by: Alex Sierra <alex.sierra@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    fxkamd authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    336292c View commit details
    Browse the repository at this point in the history
  46. cachefiles: Fix race between read_waiter and read_copier involving op…

    …->to_do
    
    [ Upstream commit 7bb0c53 ]
    
    There is a potential race in fscache operation enqueuing for reading and
    copying multiple pages from cachefiles to netfs.  The problem can be seen
    easily on a heavy loaded system (for example many processes reading files
    continually on an NFS share covered by fscache triggered this problem within
    a few minutes).
    
    The race is due to cachefiles_read_waiter() adding the op to the monitor
    to_do list and then then drop the object->work_lock spinlock before
    completing fscache_enqueue_operation().  Once the lock is dropped,
    cachefiles_read_copier() grabs the op, completes processing it, and
    makes it through fscache_retrieval_complete() which sets the op->state to
    the final state of FSCACHE_OP_ST_COMPLETE(4).  When cachefiles_read_waiter()
    finally gets through the remainder of fscache_enqueue_operation()
    it sees the invalid state, and hits the ASSERTCMP and the following
    oops is seen:
    [ 2259.612361] FS-Cache:
    [ 2259.614785] FS-Cache: Assertion failed
    [ 2259.618639] FS-Cache: 4 == 5 is false
    [ 2259.622456] ------------[ cut here ]------------
    [ 2259.627190] kernel BUG at fs/fscache/operation.c:70!
    ...
    [ 2259.791675] RIP: 0010:[<ffffffffc061b4cf>]  [<ffffffffc061b4cf>] fscache_enqueue_operation+0xff/0x170 [fscache]
    [ 2259.802059] RSP: 0000:ffffa0263d543be0  EFLAGS: 00010046
    [ 2259.807521] RAX: 0000000000000019 RBX: ffffa01a4d390480 RCX: 0000000000000006
    [ 2259.814847] RDX: 0000000000000000 RSI: 0000000000000046 RDI: ffffa0263d553890
    [ 2259.822176] RBP: ffffa0263d543be8 R08: 0000000000000000 R09: ffffa0263c2d8708
    [ 2259.829502] R10: 0000000000001e7f R11: 0000000000000000 R12: ffffa01a4d390480
    [ 2259.844483] R13: ffff9fa9546c5920 R14: ffffa0263d543c80 R15: ffffa0293ff9bf10
    [ 2259.859554] FS:  00007f4b6efbd700(0000) GS:ffffa0263d540000(0000) knlGS:0000000000000000
    [ 2259.875571] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [ 2259.889117] CR2: 00007f49e1624ff0 CR3: 0000012b38b38000 CR4: 00000000007607e0
    [ 2259.904015] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
    [ 2259.918764] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
    [ 2259.933449] PKRU: 55555554
    [ 2259.943654] Call Trace:
    [ 2259.953592]  <IRQ>
    [ 2259.955577]  [<ffffffffc03a7c12>] cachefiles_read_waiter+0x92/0xf0 [cachefiles]
    [ 2259.978039]  [<ffffffffa34d3942>] __wake_up_common+0x82/0x120
    [ 2259.991392]  [<ffffffffa34d3a63>] __wake_up_common_lock+0x83/0xc0
    [ 2260.004930]  [<ffffffffa34d3510>] ? task_rq_unlock+0x20/0x20
    [ 2260.017863]  [<ffffffffa34d3ab3>] __wake_up+0x13/0x20
    [ 2260.030230]  [<ffffffffa34c72a0>] __wake_up_bit+0x50/0x70
    [ 2260.042535]  [<ffffffffa35bdcdb>] unlock_page+0x2b/0x30
    [ 2260.054495]  [<ffffffffa35bdd09>] page_endio+0x29/0x90
    [ 2260.066184]  [<ffffffffa368fc81>] mpage_end_io+0x51/0x80
    
    CPU1
    cachefiles_read_waiter()
     20 static int cachefiles_read_waiter(wait_queue_entry_t *wait, unsigned mode,
     21                                   int sync, void *_key)
     22 {
    ...
     61         spin_lock(&object->work_lock);
     62         list_add_tail(&monitor->op_link, &op->to_do);
     63         spin_unlock(&object->work_lock);
    <begin race window>
     64
     65         fscache_enqueue_retrieval(op);
    182 static inline void fscache_enqueue_retrieval(struct fscache_retrieval *op)
    183 {
    184         fscache_enqueue_operation(&op->op);
    185 }
     58 void fscache_enqueue_operation(struct fscache_operation *op)
     59 {
     60         struct fscache_cookie *cookie = op->object->cookie;
     61
     62         _enter("{OBJ%x OP%x,%u}",
     63                op->object->debug_id, op->debug_id, atomic_read(&op->usage));
     64
     65         ASSERT(list_empty(&op->pend_link));
     66         ASSERT(op->processor != NULL);
     67         ASSERT(fscache_object_is_available(op->object));
     68         ASSERTCMP(atomic_read(&op->usage), >, 0);
    <end race window>
    
    CPU2
    cachefiles_read_copier()
    168         while (!list_empty(&op->to_do)) {
    ...
    202                 fscache_end_io(op, monitor->netfs_page, error);
    203                 put_page(monitor->netfs_page);
    204                 fscache_retrieval_complete(op, 1);
    
    CPU1
     58 void fscache_enqueue_operation(struct fscache_operation *op)
     59 {
    ...
     69         ASSERTIFCMP(op->state != FSCACHE_OP_ST_IN_PROGRESS,
     70                     op->state, ==,  FSCACHE_OP_ST_CANCELLED);
    
    Signed-off-by: Lei Xue <carmark.dlut@gmail.com>
    Signed-off-by: Dave Wysochanski <dwysocha@redhat.com>
    Signed-off-by: David Howells <dhowells@redhat.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    carmark authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    e1dfa98 View commit details
    Browse the repository at this point in the history
  47. usb: dwc3: pci: Enable extcon driver for Intel Merrifield

    [ Upstream commit 066c095 ]
    
    Intel Merrifield provides a DR support via PMIC which has its own
    extcon driver.
    
    Add a property string to link to that driver.
    
    Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
    Signed-off-by: Felipe Balbi <balbi@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    andy-shev authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    e02fe52 View commit details
    Browse the repository at this point in the history
  48. usb: phy: twl6030-usb: Fix a resource leak in an error handling path …

    …in 'twl6030_usb_probe()'
    
    [ Upstream commit f058764 ]
    
    A call to 'regulator_get()' is hidden in 'twl6030_usb_ldo_init()'. A
    corresponding put must be performed in the error handling path, as
    already done in the remove function.
    
    While at it, also move a 'free_irq()' call in the error handling path in
    order to be consistent.
    
    Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Signed-off-by: Felipe Balbi <balbi@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    tititiou36 authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    e8a03e7 View commit details
    Browse the repository at this point in the history
  49. usb: gadget: legacy: fix redundant initialization warnings

    [ Upstream commit d13cce7 ]
    
    Fix the following cppcheck warnings:
    
    drivers/usb/gadget/legacy/inode.c:1364:8: style: Redundant initialization for 'value'. The initialized value is overwritten$
     value = -EOPNOTSUPP;
           ^
    drivers/usb/gadget/legacy/inode.c:1331:15: note: value is initialized
     int    value = -EOPNOTSUPP;
                  ^
    drivers/usb/gadget/legacy/inode.c:1364:8: note: value is overwritten
     value = -EOPNOTSUPP;
           ^
    drivers/usb/gadget/legacy/inode.c:1817:8: style: Redundant initialization for 'value'. The initialized value is overwritten$
     value = -EINVAL;
           ^
    drivers/usb/gadget/legacy/inode.c:1787:18: note: value is initialized
     ssize_t   value = len, length = len;
                     ^
    drivers/usb/gadget/legacy/inode.c:1817:8: note: value is overwritten
     value = -EINVAL;
           ^
    Acked-by: Alan Stern <stern@rowland.harvard.edu>
    Reported-by: kbuild test robot <lkp@intel.com>
    Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
    Signed-off-by: Felipe Balbi <balbi@kernel.org>
    
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    masahir0y authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    74037ef View commit details
    Browse the repository at this point in the history
  50. net: freescale: select CONFIG_FIXED_PHY where needed

    [ Upstream commit 99352c7 ]
    
    I ran into a randconfig build failure with CONFIG_FIXED_PHY=m
    and CONFIG_GIANFAR=y:
    
    x86_64-linux-ld: drivers/net/ethernet/freescale/gianfar.o:(.rodata+0x418): undefined reference to `fixed_phy_change_carrier'
    
    It seems the same thing can happen with dpaa and ucc_geth, so change
    all three to do an explicit 'select FIXED_PHY'.
    
    The fixed-phy driver actually has an alternative stub function that
    theoretically allows building network drivers when fixed-phy is
    disabled, but I don't see how that would help here, as the drivers
    presumably would not work then.
    
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Acked-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: Jakub Kicinski <kuba@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    arndb authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    706fee6 View commit details
    Browse the repository at this point in the history
  51. IB/i40iw: Remove bogus call to netdev_master_upper_dev_get()

    [ Upstream commit 856ec7f ]
    
    Local variable netdev is not used in these calls.
    
    It should be noted, that this change is required to work in bonded mode.
    Otherwise we would get the following assert:
    
     "RTNL: assertion failed at net/core/dev.c (5665)"
    
    With the calltrace as follows:
    	dump_stack+0x19/0x1b
    	netdev_master_upper_dev_get+0x61/0x70
    	i40iw_addr_resolve_neigh+0x1e8/0x220
    	i40iw_make_cm_node+0x296/0x700
    	? i40iw_find_listener.isra.10+0xcc/0x110
    	i40iw_receive_ilq+0x3d4/0x810
    	i40iw_puda_poll_completion+0x341/0x420
    	i40iw_process_ceq+0xa5/0x280
    	i40iw_ceq_dpc+0x1e/0x40
    	tasklet_action+0x83/0x140
    	__do_softirq+0x125/0x2bb
    	call_softirq+0x1c/0x30
    	do_softirq+0x65/0xa0
    	irq_exit+0x105/0x110
    	do_IRQ+0x56/0xf0
    	common_interrupt+0x16a/0x16a
    	? cpuidle_enter_state+0x57/0xd0
    	cpuidle_idle_call+0xde/0x230
    	arch_cpu_idle+0xe/0xc0
    	cpu_startup_entry+0x14a/0x1e0
    	start_secondary+0x1f7/0x270
    	start_cpu+0x5/0x14
    
    Link: https://lore.kernel.org/r/20200428131511.11049-1-den@openvz.org
    Signed-off-by: Denis V. Lunev <den@openvz.org>
    Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Denis V. Lunev authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    b84952e View commit details
    Browse the repository at this point in the history
  52. riscv: stacktrace: Fix undefined reference to `walk_stackframe'

    [ Upstream commit 0502bee ]
    
    Drop static declaration to fix following build error if FRAME_POINTER disabled,
      riscv64-linux-ld: arch/riscv/kernel/perf_callchain.o: in function `.L0':
      perf_callchain.c:(.text+0x2b8): undefined reference to `walk_stackframe'
    
    Reported-by: Hulk Robot <hulkci@huawei.com>
    Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
    Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Kefeng Wang authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    6b8c281 View commit details
    Browse the repository at this point in the history
  53. clk: ti: am33xx: fix RTC clock parent

    [ Upstream commit dc6dbd5 ]
    
    Right now, trying to use RTC purely with the ti-sysc / clkctrl framework
    fails to enable the RTC module properly. Based on experimentation, this
    appears to be because RTC is sourced from the clkdiv32k optional clock.
    TRM is not very clear on this topic, but fix the RTC to use the proper
    source clock nevertheless.
    
    Reported-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Tero Kristo <t-kristo@ti.com>
    Link: https://lkml.kernel.org/r/20200424152301.4018-1-t-kristo@ti.com
    Acked-by: Tony Lindgren <tony@atomide.com>
    Signed-off-by: Stephen Boyd <sboyd@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Tero Kristo authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    e104bd8 View commit details
    Browse the repository at this point in the history
  54. csky: Fixup msa highest 3 bits mask

    [ Upstream commit 165f2d2 ]
    
    Just as comment mentioned, the msa format:
    
     cr<30/31, 15> MSA register format:
     31 - 29 | 28 - 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0
       BA     Reserved  SH  WA  B   SO SEC  C   D   V
    
    So we should shift 29 bits not 28 bits for mask
    
    Signed-off-by: Liu Yibin <jiulong@linux.alibaba.com>
    Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Liu Yibin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    f3f23f4 View commit details
    Browse the repository at this point in the history
  55. csky: Fixup perf callchain unwind

    [ Upstream commit 229a0dd ]
    
     [ 5221.974084] Unable to handle kernel paging request at virtual address 0xfffff000, pc: 0x8002c18e
     [ 5221.985929] Oops: 00000000
     [ 5221.989488]
     [ 5221.989488] CURRENT PROCESS:
     [ 5221.989488]
     [ 5221.992877] COMM=callchain_test PID=11962
     [ 5221.995213] TEXT=00008000-000087e0 DATA=00009f1c-0000a018 BSS=0000a018-0000b000
     [ 5221.999037] USER-STACK=7fc18e20  KERNEL-STACK=be204680
     [ 5221.999037]
     [ 5222.003292] PC: 0x8002c18e (perf_callchain_kernel+0x3e/0xd4)
     [ 5222.007957] LR: 0x8002c198 (perf_callchain_kernel+0x48/0xd4)
     [ 5222.074873] Call Trace:
     [ 5222.074873] [<800a248e>] get_perf_callchain+0x20a/0x29c
     [ 5222.074873] [<8009d964>] perf_callchain+0x64/0x80
     [ 5222.074873] [<8009dc1c>] perf_prepare_sample+0x29c/0x4b8
     [ 5222.074873] [<8009de6e>] perf_event_output_forward+0x36/0x98
     [ 5222.074873] [<800497e0>] search_exception_tables+0x20/0x44
     [ 5222.074873] [<8002cbb6>] do_page_fault+0x92/0x378
     [ 5222.074873] [<80098608>] __perf_event_overflow+0x54/0xdc
     [ 5222.074873] [<80098778>] perf_swevent_hrtimer+0xe8/0x164
     [ 5222.074873] [<8002ddd0>] update_mmu_cache+0x0/0xd8
     [ 5222.074873] [<8002c014>] user_backtrace+0x58/0xc4
     [ 5222.074873] [<8002c0b4>] perf_callchain_user+0x34/0xd0
     [ 5222.074873] [<800a2442>] get_perf_callchain+0x1be/0x29c
     [ 5222.074873] [<8009d964>] perf_callchain+0x64/0x80
     [ 5222.074873] [<8009d834>] perf_output_sample+0x78c/0x858
     [ 5222.074873] [<8009dc1c>] perf_prepare_sample+0x29c/0x4b8
     [ 5222.074873] [<8009de94>] perf_event_output_forward+0x5c/0x98
     [ 5222.097846]
     [ 5222.097846] [<800a0300>] perf_event_exit_task+0x58/0x43c
     [ 5222.097846] [<8006c874>] hrtimer_interrupt+0x104/0x2ec
     [ 5222.097846] [<800a0300>] perf_event_exit_task+0x58/0x43c
     [ 5222.097846] [<80437bb6>] dw_apb_clockevent_irq+0x2a/0x4c
     [ 5222.097846] [<8006c770>] hrtimer_interrupt+0x0/0x2ec
     [ 5222.097846] [<8005f2e4>] __handle_irq_event_percpu+0xac/0x19c
     [ 5222.097846] [<80437bb6>] dw_apb_clockevent_irq+0x2a/0x4c
     [ 5222.097846] [<8005f408>] handle_irq_event_percpu+0x34/0x88
     [ 5222.097846] [<8005f480>] handle_irq_event+0x24/0x64
     [ 5222.097846] [<8006218c>] handle_level_irq+0x68/0xdc
     [ 5222.097846] [<8005ec76>] __handle_domain_irq+0x56/0xa8
     [ 5222.097846] [<80450e90>] ck_irq_handler+0xac/0xe4
     [ 5222.097846] [<80029012>] csky_do_IRQ+0x12/0x24
     [ 5222.097846] [<8002a3a0>] csky_irq+0x70/0x80
     [ 5222.097846] [<800ca612>] alloc_set_pte+0xd2/0x238
     [ 5222.097846] [<8002ddd0>] update_mmu_cache+0x0/0xd8
     [ 5222.097846] [<800a0340>] perf_event_exit_task+0x98/0x43c
    
    The original fp check doesn't base on the real kernal stack region.
    Invalid fp address may cause kernel panic.
    
    Signed-off-by: Mao Han <han_mao@linux.alibaba.com>
    Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    MaoHan002 authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    99bd434 View commit details
    Browse the repository at this point in the history
  56. csky: Fixup remove duplicate irq_disable

    [ Upstream commit 6633a5a ]
    
    Interrupt has been disabled in __schedule() with local_irq_disable()
    and enabled in finish_task_switch->finish_lock_switch() with
    local_irq_enabled(), So needn't to disable irq here.
    
    Signed-off-by: Liu Yibin <jiulong@linux.alibaba.com>
    Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Liu Yibin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    68d7232 View commit details
    Browse the repository at this point in the history
  57. hwmon: (nct7904) Fix incorrect range of temperature limit registers

    [ Upstream commit 7b2fd27 ]
    
    The format of temperature limitation registers are 8-bit 2's complement
    and the range is -128~127.
    Converts the reading value to signed char to fix the incorrect range
    of temperature limitation registers.
    
    Signed-off-by: Amy Shih <amy.shih@advantech.com.tw>
    Signed-off-by: Guenter Roeck <linux@roeck-us.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ChiaYuShih authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    ce1ef28 View commit details
    Browse the repository at this point in the history
  58. cifs: Fix null pointer check in cifs_read

    [ Upstream commit 9bd21d4 ]
    
    Coverity scan noted a redundant null check
    
    Coverity-id: 728517
    Reported-by: Coverity <scan-admin@coverity.com>
    Signed-off-by: Steve French <stfrench@microsoft.com>
    Reviewed-by: Shyam Prasad N <nspmangalore@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Steve French authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    2fa8032 View commit details
    Browse the repository at this point in the history
  59. csky: Fixup raw_copy_from_user()

    [ Upstream commit 51bb38c ]
    
    If raw_copy_from_user(to, from, N) returns K, callers expect
    the first N - K bytes starting at to to have been replaced with
    the contents of corresponding area starting at from and the last
    K bytes of destination *left* *unmodified*.
    
    What arch/sky/lib/usercopy.c is doing is broken - it can lead to e.g.
    data corruption on write(2).
    
    raw_copy_to_user() is inaccurate about return value, which is a bug,
    but consequences are less drastic than for raw_copy_from_user().
    And just what are those access_ok() doing in there?  I mean, look into
    linux/uaccess.h; that's where we do that check (as well as zero tail
    on failure in the callers that need zeroing).
    
    AFAICS, all of that shouldn't be hard to fix; something like a patch
    below might make a useful starting point.
    
    I would suggest moving these macros into usercopy.c (they are never
    used anywhere else) and possibly expanding them there; if you leave
    them alive, please at least rename __copy_user_zeroing(). Again,
    it must not zero anything on failed read.
    
    Said that, I'm not sure we won't be better off simply turning
    usercopy.c into usercopy.S - all that is left there is a couple of
    functions, each consisting only of inline asm.
    
    Guo Ren reply:
    
    Yes, raw_copy_from_user is wrong, it's no need zeroing code.
    
    unsigned long _copy_from_user(void *to, const void __user *from,
    unsigned long n)
    {
            unsigned long res = n;
            might_fault();
            if (likely(access_ok(from, n))) {
                    kasan_check_write(to, n);
                    res = raw_copy_from_user(to, from, n);
            }
            if (unlikely(res))
                    memset(to + (n - res), 0, res);
            return res;
    }
    EXPORT_SYMBOL(_copy_from_user);
    
    You are right and access_ok() should be removed.
    
    but, how about:
    do {
    ...
            "2:     stw     %3, (%1, 0)     \n"             \
    +       "       subi    %0, 4          \n"               \
            "9:     stw     %4, (%1, 4)     \n"             \
    +       "       subi    %0, 4          \n"               \
            "10:    stw     %5, (%1, 8)     \n"             \
    +       "       subi    %0, 4          \n"               \
            "11:    stw     %6, (%1, 12)    \n"             \
    +       "       subi    %0, 4          \n"               \
            "       addi    %2, 16          \n"             \
            "       addi    %1, 16          \n"             \
    
    Don't expand __ex_table
    
    AI Viro reply:
    
    Hey, I've no idea about the instruction scheduling on csky -
    if that doesn't slow the things down, all the better.  It's just
    that copy_to_user() and friends are on fairly hot codepaths,
    and in quite a few situations they will dominate the speed of
    e.g. read(2).  So I tried to keep the fast path unchanged.
    Up to the architecture maintainers, obviously.  Which would be
    you...
    
    As for the fixups size increase (__ex_table size is unchanged)...
    You have each of those macros expanded exactly once.
    So the size is not a serious argument, IMO - useless complexity
    would be, if it is, in fact, useless; the size... not really,
    especially since those extra subi will at least offset it.
    
    Again, up to you - asm optimizations of (essentially)
    memcpy()-style loops are tricky and can depend upon the
    fairly subtle details of architecture.  So even on something
    I know reasonably well I would resort to direct experiments
    if I can't pass the buck to architecture maintainers.
    
    It *is* worth optimizing - this is where read() from a file
    that is already in page cache spends most of the time, etc.
    
    Guo Ren reply:
    
    Thx, after fixup some typo “sub %0, 4”, apply the patch.
    
    TODO:
     - user copy/from codes are still need optimizing.
    
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Al Viro authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    70bf0fd View commit details
    Browse the repository at this point in the history
  60. samples: bpf: Fix build error

    [ Upstream commit 23ad046 ]
    
    GCC 10 is very strict about symbol clash, and lwt_len_hist_user contains
    a symbol which clashes with libbpf:
    
    /usr/bin/ld: samples/bpf/lwt_len_hist_user.o:(.bss+0x0): multiple definition of `bpf_log_buf'; samples/bpf/bpf_load.o:(.bss+0x8c0): first defined here
    collect2: error: ld returned 1 exit status
    
    bpf_log_buf here seems to be a leftover, so removing it.
    
    Signed-off-by: Matteo Croce <mcroce@redhat.com>
    Signed-off-by: Alexei Starovoitov <ast@kernel.org>
    Acked-by: Yonghong Song <yhs@fb.com>
    Link: https://lore.kernel.org/bpf/20200511113234.80722-1-mcroce@redhat.com
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    teknoraver authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    dfe417b View commit details
    Browse the repository at this point in the history
  61. drivers: net: hamradio: Fix suspicious RCU usage warning in bpqether.c

    [ Upstream commit 95f59bf ]
    
    This patch fixes the following warning:
    =============================
    WARNING: suspicious RCU usage
    5.7.0-rc5-next-20200514-syzkaller #0 Not tainted
    -----------------------------
    drivers/net/hamradio/bpqether.c:149 RCU-list traversed in non-reader section!!
    
    Since rtnl lock is held, pass this cond in list_for_each_entry_rcu().
    
    Reported-by: syzbot+bb82cafc737c002d11ca@syzkaller.appspotmail.com
    Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Madhuparna Bhowmik authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    b66de2d View commit details
    Browse the repository at this point in the history
  62. Input: usbtouchscreen - add support for BonXeon TP

    [ Upstream commit e3b4f94 ]
    
    Based on available information this uses the singletouch irtouch
    protocol. This is tested and confirmed to be fully functional on
    the BonXeon TP hardware I have.
    
    Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
    Link: https://lore.kernel.org/r/20200413184217.55700-1-james.hilliard1@gmail.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    jameshilliard authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    5a273fa View commit details
    Browse the repository at this point in the history
  63. Input: evdev - call input_flush_device() on release(), not flush()

    [ Upstream commit 0926409 ]
    
    input_flush_device() should only be called once the struct file is being
    released and no open descriptors remain, but evdev_flush() was calling
    it whenever a file descriptor was closed.
    
    This caused uploaded force-feedback effects to be erased when a process
    did a dup()/close() on the event FD, called system(), etc.
    
    Call input_flush_device() from evdev_release() instead.
    
    Reported-by: Mathieu Maret <mathieu.maret@gmail.com>
    Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
    Link: https://lore.kernel.org/r/20200421231003.7935-1-bshanks@codeweavers.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    mrpippy authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    9abf040 View commit details
    Browse the repository at this point in the history
  64. Input: xpad - add custom init packet for Xbox One S controllers

    [ Upstream commit 764f7f9 ]
    
    Sending [ 0x05, 0x20, 0x00, 0x0f, 0x06 ] packet for Xbox One S controllers
    fixes an issue where controller is stuck in Bluetooth mode and not sending
    any inputs.
    
    Signed-off-by: Łukasz Patron <priv.luk@gmail.com>
    Reviewed-by: Cameron Gutman <aicommander@gmail.com>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200422075206.18229-1-priv.luk@gmail.com
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    luk1337 authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    d9d50cb View commit details
    Browse the repository at this point in the history
  65. Input: dlink-dir685-touchkeys - fix a typo in driver name

    [ Upstream commit 3834737 ]
    
    According to the file name and Kconfig, a 'k' is missing in this driver
    name. It should be "dlink-dir685-touchkeys".
    
    Fixes: 131b3de ("Input: add D-Link DIR-685 touchkeys driver")
    Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
    Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
    Link: https://lore.kernel.org/r/20200412213937.5287-1-christophe.jaillet@wanadoo.fr
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    tititiou36 authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    a63a679 View commit details
    Browse the repository at this point in the history
  66. Input: i8042 - add ThinkPad S230u to i8042 reset list

    [ Upstream commit 2712c91 ]
    
    On the Lenovo ThinkPad Twist S230u (3347-4HU) with BIOS version
    "GDETC1WW (1.81 ) 06/27/2019", the keyboard, Synaptics TouchPad, and
    TrackPoint either do not function or stop functioning a few minutes
    after boot.  This problem has been noted before, perhaps only occurring
    with BIOS 1.57 and later.[1][2][3][4][5]
    
    Odds of a BIOS fix appear to be low: 1.57 was released over 6 years ago
    and although the [BIOS changelog] notes "Fixed an issue of UEFI
    touchpad/trackpoint/keyboard/touchscreen" in 1.58, it appears to be
    insufficient.
    
    Setting i8042.reset=1 or adding 33474HU to the reset list avoids the
    issue on my system from either warm or cold boot.
    
    [1]: https://bugs.launchpad.net/bugs/1210748
    [2]: https://bbs.archlinux.org/viewtopic.php?pid=1360425
    [3]: https://forums.linuxmint.com/viewtopic.php?f=46&t=41200
    [4]: https://forums.linuxmint.com/viewtopic.php?f=49&t=157115
    [5]: https://forums.lenovo.com/topic/findpost/27/1337119
    [BIOS changelog]: https://download.lenovo.com/pccbbs/mobiles/gduj33uc.txt
    
    Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/94f384b0f75f90f71425d7dce7ac82c59ddb87a8.1587702636.git.kevin@kevinlocke.name
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    kevinoid authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    7016d24 View commit details
    Browse the repository at this point in the history
  67. Input: synaptics-rmi4 - really fix attn_data use-after-free

    [ Upstream commit d5a5e5b ]
    
    Fix a use-after-free noticed by running with KASAN enabled. If
    rmi_irq_fn() is run twice in a row, then rmi_f11_attention() (among
    others) will end up reading from drvdata->attn_data.data, which was
    freed and left dangling in rmi_irq_fn().
    
    Commit 55edde9 ("Input: synaptics-rmi4 - prevent UAF reported by
    KASAN") correctly identified and analyzed this bug. However the attempted
    fix only NULLed out a local variable, missing the fact that
    drvdata->attn_data is a struct, not a pointer.
    
    NULL out the correct pointer in the driver data to prevent the attention
    functions from copying from it.
    
    Fixes: 55edde9 ("Input: synaptics-rmi4 - prevent UAF reported by KASAN")
    Fixes: b908d3c ("Input: synaptics-rmi4 - allow to add attention data")
    Signed-off-by: Evan Green <evgreen@chromium.org>
    Cc: stable@vger.kernel.org
    Link: https://lore.kernel.org/r/20200427145537.1.Ic8f898e0147beeee2c005ee7b20f1aebdef1e7eb@changeid
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Evan Green authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    176dbb9 View commit details
    Browse the repository at this point in the history
  68. Input: synaptics-rmi4 - fix error return code in rmi_driver_probe()

    [ Upstream commit 5caab2d ]
    
    Fix to return a negative error code from the input_register_device()
    error handling case instead of 0, as done elsewhere in this function.
    
    Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
    Link: https://lore.kernel.org/r/20200428134948.78343-1-weiyongjun1@huawei.com
    Cc: stable@vger.kernel.org
    Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Wei Yongjun authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    4aa75ce View commit details
    Browse the repository at this point in the history
  69. ARM: 8970/1: decompressor: increase tag size

    [ Upstream commit 2c96236 ]
    
    The size field of the tag header structure is supposed to be set to the
    size of a tag structure including the header.
    
    Fixes: c772568 ("ARM: add additional table to compressed kernel")
    Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Łukasz Stelmach authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    f175897 View commit details
    Browse the repository at this point in the history
  70. ARM: uaccess: consolidate uaccess asm to asm/uaccess-asm.h

    [ Upstream commit 747ffc2 ]
    
    Consolidate the user access assembly code to asm/uaccess-asm.h.  This
    moves the csdb, check_uaccess, uaccess_mask_range_ptr, uaccess_enable,
    uaccess_disable, uaccess_save, uaccess_restore macros, and creates two
    new ones for exception entry and exit - uaccess_entry and uaccess_exit.
    
    This makes the uaccess_save and uaccess_restore macros private to
    asm/uaccess-asm.h.
    
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Russell King authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    96e2df4 View commit details
    Browse the repository at this point in the history
  71. ARM: uaccess: integrate uaccess_save and uaccess_restore

    [ Upstream commit 8ede890 ]
    
    Integrate uaccess_save / uaccess_restore macros into the new
    uaccess_entry / uaccess_exit macros respectively.
    
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Russell King authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    d9c318f View commit details
    Browse the repository at this point in the history
  72. ARM: uaccess: fix DACR mismatch with nested exceptions

    [ Upstream commit 71f8af1 ]
    
    Tomas Paukrt reports that his SAM9X60 based system (ARM926, ARMv5TJ)
    fails to fix up alignment faults, eventually resulting in a kernel
    oops.
    
    The problem occurs when using CONFIG_CPU_USE_DOMAINS with commit
    e6978e4 ("ARM: save and reset the address limit when entering an
    exception").  This is because the address limit is set back to
    TASK_SIZE on exception entry, and, although it is restored on exception
    exit, the domain register is not.
    
    Hence, this sequence can occur:
    
      interrupt
        pt_regs->addr_limit = addr_limit		// USER_DS
        addr_limit = USER_DS
        alignment exception
        __probe_kernel_read()
          old_fs = get_fs()				// USER_DS
          set_fs(KERNEL_DS)
            addr_limit = KERNEL_DS
            dacr.kernel = DOMAIN_MANAGER
            interrupt
              pt_regs->addr_limit = addr_limit	// KERNEL_DS
              addr_limit = USER_DS
              alignment exception
              __probe_kernel_read()
                old_fs = get_fs()			// USER_DS
                set_fs(KERNEL_DS)
                  addr_limit = KERNEL_DS
                  dacr.kernel = DOMAIN_MANAGER
                ...
                set_fs(old_fs)
                  addr_limit = USER_DS
                  dacr.kernel = DOMAIN_CLIENT
              ...
              addr_limit = pt_regs->addr_limit	// KERNEL_DS
            interrupt returns
    
    At this point, addr_limit is correctly restored to KERNEL_DS for
    __probe_kernel_read() to continue execution, but dacr.kernel is not,
    it has been reset by the set_fs(old_fs) to DOMAIN_CLIENT.
    
    This would not have happened prior to the mentioned commit, because
    addr_limit would remain KERNEL_DS, so get_fs() would have returned
    KERNEL_DS, and so would correctly nest.
    
    This commit fixes the problem by also saving the DACR on exception
    entry if either CONFIG_CPU_SW_DOMAIN_PAN or CONFIG_CPU_USE_DOMAINS are
    enabled, and resetting the DACR appropriately on exception entry to
    match addr_limit and PAN settings.
    
    Fixes: e6978e4 ("ARM: save and reset the address limit when entering an exception")
    Reported-by: Tomas Paukrt <tomas.paukrt@advantech.cz>
    Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Russell King authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    5242e38 View commit details
    Browse the repository at this point in the history
  73. gpio: exar: Fix bad handling for ida_simple_get error path

    [ Upstream commit 333830a ]
    
    The commit 7ecced0 ("gpio: exar: add a check for the return value
    of ida_simple_get fails") added a goto jump to the common error
    handler for ida_simple_get() error, but this is wrong in two ways:
    it doesn't set the proper return code and, more badly, it invokes
    ida_simple_remove() with a negative index that shall lead to a kernel
    panic via BUG_ON().
    
    This patch addresses those two issues.
    
    Fixes: 7ecced0 ("gpio: exar: add a check for the return value of ida_simple_get fails")
    Cc: <stable@vger.kernel.org>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    tiwai authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    750f47a View commit details
    Browse the repository at this point in the history
  74. arm64: dts: mt8173: fix vcodec-enc clock

    [ Upstream commit 3b1f6c5 ]
    
    Fix the assigned-clock-parents to higher frequency clock to avoid h264
    encode timeout:
    
    [  134.763465] mtk_vpu 10020000.vpu: vpu ipi 4 ack time out !
    [  134.769008] [MTK_VCODEC][ERROR][18]: vpu_enc_send_msg() vpu_ipi_send msg_id c002 len 32 fail -5
    [  134.777707] [MTK_VCODEC][ERROR][18]: vpu_enc_encode() AP_IPIMSG_ENC_ENCODE 0 fail
    
    venc_sel is the clock used by h264 encoder, and venclt_sel is the clock
    used by vp8 encoder. Assign venc_sel to vcodecpll_ck and venclt_sel to
    vcodecpll_370p5.
    
        vcodecpll                         1482000000
           vcodecpll_ck                    494000000
              venc_sel                     494000000
    ...
           vcodecpll_370p5                 370500000
              venclt_sel                   370500000
    
    Fixes: fbbad02 ("arm64: dts: Using standard CCF interface to set vcodec clk")
    Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
    Link: https://lore.kernel.org/r/20200504124442.208004-1-hsinyi@chromium.org
    Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    hsinyi527 authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    56e7873 View commit details
    Browse the repository at this point in the history
  75. soc: mediatek: cmdq: return send msg error code

    [ Upstream commit 34c4e40 ]
    
    Return error code to client if send message fail,
    so that client has chance to error handling.
    
    Fixes: 576f1b4 ("soc: mediatek: Add Mediatek CMDQ helper")
    Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
    Reviewed-by: CK Hu <ck.hu@mediatek.com>
    Link: https://lore.kernel.org/r/1583664775-19382-6-git-send-email-dennis-yc.hsieh@mediatek.com
    Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Dennis YC Hsieh authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    707f507 View commit details
    Browse the repository at this point in the history
  76. gpu/drm: Ingenic: Fix opaque pointer casted to wrong type

    [ Upstream commit abf56fa ]
    
    The opaque pointer passed to the IRQ handler is a pointer to the
    drm_device, not a pointer to our ingenic_drm structure.
    
    It still worked, because our ingenic_drm structure contains the
    drm_device as its first field, so the pointer received had the same
    value, but this was not semantically correct.
    
    Cc: stable@vger.kernel.org # v5.3
    Fixes: 90b86fc ("DRM: Add KMS driver for the Ingenic JZ47xx SoCs")
    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    Link: https://patchwork.freedesktop.org/patch/msgid/20200516215057.392609-5-paul@crapouillou.net
    Acked-by: Sam Ravnborg <sam@ravnborg.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    pcercuei authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    820be34 View commit details
    Browse the repository at this point in the history
  77. IB/qib: Call kobject_put() when kobject_init_and_add() fails

    [ Upstream commit a35cd64 ]
    
    When kobject_init_and_add() returns an error in the function
    qib_create_port_files(), the function kobject_put() is not called for the
    corresponding kobject, which potentially leads to memory leak.
    
    This patch fixes the issue by calling kobject_put() even if
    kobject_init_and_add() fails. In addition, the ppd->diagc_kobj is released
    along with other kobjects when the sysfs is unregistered.
    
    Fixes: f931551 ("IB/qib: Add new qib driver for QLogic PCIe InfiniBand adapters")
    Link: https://lore.kernel.org/r/20200512031328.189865.48627.stgit@awfm-01.aw.intel.com
    Cc: <stable@vger.kernel.org>
    Suggested-by: Lin Yi <teroincn@gmail.com>
    Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
    Signed-off-by: Kaike Wan <kaike.wan@intel.com>
    Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
    Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    kwan-intc authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    a38a75c View commit details
    Browse the repository at this point in the history
  78. ARM: dts/imx6q-bx50v3: Set display interface clock parents

    [ Upstream commit 665e7c7 ]
    
    Avoid LDB and IPU DI clocks both using the same parent. LDB requires
    pasthrough clock to avoid breaking timing while IPU DI does not.
    
    Force IPU DI clocks to use IMX6QDL_CLK_PLL2_PFD0_352M as parent
    and LDB to use IMX6QDL_CLK_PLL5_VIDEO_DIV.
    
    This fixes an issue where attempting atomic modeset while using
    HDMI and display port at the same time causes LDB clock programming
    to destroy the programming of HDMI that was done during the same
    modeset.
    
    Cc: stable@vger.kernel.org
    Signed-off-by: Robert Beckett <bob.beckett@collabora.com>
    [Use IMX6QDL_CLK_PLL2_PFD0_352M instead of IMX6QDL_CLK_PLL2_PFD2_396M
     originally chosen by Robert Beckett to avoid affecting eMMC clock
     by DRM atomic updates]
    Signed-off-by: Ian Ray <ian.ray@ge.com>
    [Squash Robert's and Ian's commits for bisectability, update patch
     description and add stable tag]
    Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
    Signed-off-by: Shawn Guo <shawnguo@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    BobBeckett authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    485bd94 View commit details
    Browse the repository at this point in the history
  79. ARM: dts: bcm2835-rpi-zero-w: Fix led polarity

    [ Upstream commit 58bb90a ]
    
    The status "ACT" led on the Raspberry Pi Zero W is on when GPIO 47 is low.
    
    This has been verified on a board and somewhat confirmed by both the GPIO
    name ("STATUS_LED_N") and the reduced schematics [1].
    
    [1]: https://www.raspberrypi.org/documentation/hardware/raspberrypi/schematics/rpi_SCH_ZeroW_1p1_reduced.pdf
    
    Fixes: 2c7c040 ("ARM: dts: bcm2835: Add Raspberry Pi Zero W")
    Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
    Cc: Stefan Wahren <stefan.wahren@i2se.com>
    Cc: Florian Fainelli <f.fainelli@gmail.com>
    Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    vstehle authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    f8b161c View commit details
    Browse the repository at this point in the history
  80. ARM: dts: bcm: HR2: Fix PPI interrupt types

    [ Upstream commit be0ec06 ]
    
    These error messages are output when booting on a BCM HR2 system:
        GIC: PPI11 is secure or misconfigured
        GIC: PPI13 is secure or misconfigured
    
    Per ARM documentation these interrupts are triggered on a rising edge.
    See ARM Cortex A-9 MPCore Technical Reference Manual, Revision r4p1,
    Section 3.3.8 Interrupt Configuration Registers.
    
    The same issue was resolved for NSP systems in commit 5f1aa51
    ("ARM: dts: NSP: Fix PPI interrupt types").
    
    Fixes: b9099ec ("ARM: dts: Add Broadcom Hurricane 2 DTS include file")
    Signed-off-by: Hamish Martin <hamish.martin@alliedtelesis.co.nz>
    Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Hamish Martin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    2de6df8 View commit details
    Browse the repository at this point in the history
  81. mmc: block: Fix use-after-free issue for rpmb

    [ Upstream commit 202500d ]
    
    The data structure member “rpmb->md” was passed to a call of the function
    “mmc_blk_put” after a call of the function “put_device”. Reorder these
    function calls to keep the data accesses consistent.
    
    Fixes: 1c87f73 ("mmc: block: Fix bug when removing RPMB chardev ")
    Signed-off-by: Peng Hao <richard.peng@oppo.com>
    Cc: stable@vger.kernel.org
    [Uffe: Fixed up mangled patch and updated commit message]
    Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Peng Hao authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    a971f71 View commit details
    Browse the repository at this point in the history
  82. gpio: pxa: Fix return value of pxa_gpio_probe()

    [ Upstream commit 558ab2e ]
    
    When call function devm_platform_ioremap_resource(), we should use IS_ERR()
    to check the return value and return PTR_ERR() if failed.
    
    Fixes: 542c25b ("drivers: gpio: pxa: use devm_platform_ioremap_resource()")
    Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
    Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Tiezhu Yang authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    d6d0708 View commit details
    Browse the repository at this point in the history
  83. gpio: bcm-kona: Fix return value of bcm_kona_gpio_probe()

    [ Upstream commit 98f7d1b ]
    
    Propagate the error code returned by devm_platform_ioremap_resource()
    out of probe() instead of overwriting it.
    
    Fixes: 72d8cb7 ("drivers: gpio: bcm-kona: use devm_platform_ioremap_resource()")
    Signed-off-by: Tiezhu Yang <yangtiezhu@loongson.cn>
    [Bartosz: tweaked the commit message]
    Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Tiezhu Yang authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    b191e3e View commit details
    Browse the repository at this point in the history
  84. RDMA/pvrdma: Fix missing pci disable in pvrdma_pci_probe()

    [ Upstream commit db857e6 ]
    
    In function pvrdma_pci_probe(), pdev was not disabled in one error
    path. Thus replace the jump target “err_free_device” by
    "err_disable_pdev".
    
    Fixes: 29c8d9e ("IB: Add vmw_pvrdma driver")
    Link: https://lore.kernel.org/r/20200523030457.16160-1-wu000273@umn.edu
    Signed-off-by: Qiushi Wu <wu000273@umn.edu>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    QiushiWu authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    a003e1f View commit details
    Browse the repository at this point in the history
  85. ALSA: hwdep: fix a left shifting 1 by 31 UB bug

    [ Upstream commit fb8cd64 ]
    
    The "info.index" variable can be 31 in "1 << info.index".
    This might trigger an undefined behavior since 1 is signed.
    
    Fix this by casting 1 to 1u just to be sure "1u << 31" is defined.
    
    Signed-off-by: Changming Liu <liu.changm@northeastern.edu>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/BL0PR06MB4548170B842CB055C9AF695DE5B00@BL0PR06MB4548.namprd06.prod.outlook.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Lawliar authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    84b0a4f View commit details
    Browse the repository at this point in the history
  86. ALSA: hda/realtek - Add a model for Thinkpad T570 without DAC workaround

    [ Upstream commit 399c01a ]
    
    We fixed the regression of the speaker volume for some Thinkpad models
    (e.g. T570) by the commit 54947cd ("ALSA: hda/realtek - Fix
    speaker output regression on Thinkpad T570").  Essentially it fixes
    the DAC / pin pairing by a static table.  It was confirmed and merged
    to stable kernel later.
    
    Now, interestingly, we got another regression report for the very same
    model (T570) about the similar problem, and the commit above was the
    culprit.  That is, by some reason, there are devices that prefer the
    DAC1, and another device DAC2!
    
    Unfortunately those have the same ID and we have no idea what can
    differentiate, in this patch, a new fixup model "tpt470-dock-fix" is
    provided, so that users with such a machine can apply it manually.
    When model=tpt470-dock-fix option is passed to snd-hda-intel module,
    it avoids the fixed DAC pairing and the DAC1 is assigned to the
    speaker like the earlier versions.
    
    Fixes: 54947cd ("ALSA: hda/realtek - Fix speaker output regression on Thinkpad T570")
    BugLink: https://apibugzilla.suse.com/show_bug.cgi?id=1172017
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20200526062406.9799-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    tiwai authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    8c71b0b View commit details
    Browse the repository at this point in the history
  87. ALSA: usb-audio: mixer: volume quirk for ESS Technology Asus USB DAC

    [ Upstream commit 4020d1c ]
    
    The Asus USB DAC is a USB type-C audio dongle for connecting to
    the headset and headphone. The volume minimum value -23040 which
    is 0xa600 in hexadecimal with the resolution value 1 indicates
    this should be endianness issue caused by the firmware bug. Add
    a volume quirk to fix the volume control problem.
    
    Also fixes this warning:
      Warning! Unlikely big volume range (=23040), cval->res is probably wrong.
      [5] FU [Headset Capture Volume] ch = 1, val = -23040/0/1
      Warning! Unlikely big volume range (=23040), cval->res is probably wrong.
      [7] FU [Headset Playback Volume] ch = 1, val = -23040/0/1
    
    Signed-off-by: Chris Chiu <chiu@endlessm.com>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20200526062613.55401-1-chiu@endlessm.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Chris Chiu authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    4adcf88 View commit details
    Browse the repository at this point in the history
  88. exec: Always set cap_ambient in cap_bprm_set_creds

    [ Upstream commit a4ae32c ]
    
    An invariant of cap_bprm_set_creds is that every field in the new cred
    structure that cap_bprm_set_creds might set, needs to be set every
    time to ensure the fields does not get a stale value.
    
    The field cap_ambient is not set every time cap_bprm_set_creds is
    called, which means that if there is a suid or sgid script with an
    interpreter that has neither the suid nor the sgid bits set the
    interpreter should be able to accept ambient credentials.
    Unfortuantely because cap_ambient is not reset to it's original value
    the interpreter can not accept ambient credentials.
    
    Given that the ambient capability set is expected to be controlled by
    the caller, I don't think this is particularly serious.  But it is
    definitely worth fixing so the code works correctly.
    
    I have tested to verify my reading of the code is correct and the
    interpreter of a sgid can receive ambient capabilities with this
    change and cannot receive ambient capabilities without this change.
    
    Cc: stable@vger.kernel.org
    Cc: Andy Lutomirski <luto@kernel.org>
    Fixes: 5831905 ("capabilities: ambient capabilities")
    Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ebiederm authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    68fe063 View commit details
    Browse the repository at this point in the history
  89. clk: qcom: gcc: Fix parent for gpll0_out_even

    [ Upstream commit a76f274 ]
    
    Documentation says that gpll0 is parent of gpll0_out_even, somehow
    driver coded that as bi_tcxo, so fix it
    
    Fixes: 2a1d7eb ("clk: qcom: gcc: Add global clock controller driver for SM8150")
    Reported-by: Jonathan Marek <jonathan@marek.ca>
    Signed-off-by: Vinod Koul <vkoul@kernel.org>
    Link: https://lkml.kernel.org/r/20200521052728.2141377-1-vkoul@kernel.org
    Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: Stephen Boyd <sboyd@kernel.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    vinodkoul authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    8fc8674 View commit details
    Browse the repository at this point in the history
  90. ALSA: usb-audio: Quirks for Gigabyte TRX40 Aorus Master onboard audio

    [ Upstream commit 7f5ad9c ]
    
    Gigabyte TRX40 Aorus Master is equipped with two USB-audio devices,
    a Realtek ALC1220-VB codec (USB ID 0414:a001) and an ESS SABRE9218 DAC
    (USB ID 0414:a000).  The latter serves solely for the headphone output
    on the front panel while the former serves for the rest I/Os (mostly
    for the I/Os in the rear panel but also including the front mic).
    
    Both chips do work more or less with the unmodified USB-audio driver,
    but there are a few glitches.  The ALC1220-VB returns an error for an
    inquiry to some jacks, as already seen on other TRX40-based mobos.
    However this machine has a slightly incompatible configuration, hence
    the existing mapping cannot be used as is.
    
    Meanwhile the ESS chip seems working without any quirk.  But since
    both audio devices don't provide any specific names, both cards appear
    as "USB-Audio", and it's quite confusing for users.
    
    This patch is an attempt to overcome those issues:
    
    - The specific mapping table for ALC1220-VB is provided, reducing the
      non-working nodes and renaming the badly chosen controls.
      The connector map isn't needed here unlike other TRX40 quirks.
    
    - For both USB IDs (0414:a000 and 0414:a001), provide specific card
      name strings, so that user-space can identify more easily; and more
      importantly, UCM profile can be applied to each.
    
    Reported-by: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/20200526082810.29506-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    tiwai authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    c33bf20 View commit details
    Browse the repository at this point in the history
  91. ALSA: hda/realtek - Add new codec supported for ALC287

    [ Upstream commit 630e361 ]
    
    Enable new codec supported for ALC287.
    
    Signed-off-by: Kailang Yang <kailang@realtek.com>
    Cc: <stable@vger.kernel.org>
    Link: https://lore.kernel.org/r/dcf5ce5507104d0589a917cbb71dc3c6@realtek.com
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    kailangyang authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    d162b9e View commit details
    Browse the repository at this point in the history
  92. libceph: ignore pool overlay and cache logic on redirects

    [ Upstream commit 890bd0f ]
    
    OSD client should ignore cache/overlay flag if got redirect reply.
    Otherwise, the client hangs when the cache tier is in forward mode.
    
    [ idryomov: Redirects are effectively deprecated and no longer
      used or tested.  The original tiering modes based on redirects
      are inherently flawed because redirects can race and reorder,
      potentially resulting in data corruption.  The new proxy and
      readproxy tiering modes should be used instead of forward and
      readforward.  Still marking for stable as obviously correct,
      though. ]
    
    Cc: stable@vger.kernel.org
    URL: https://tracker.ceph.com/issues/23296
    URL: https://tracker.ceph.com/issues/36406
    Signed-off-by: Jerry Lee <leisurelysw24@gmail.com>
    Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    swinds24 authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    4d145e4 View commit details
    Browse the repository at this point in the history
  93. ceph: flush release queue when handling caps for unknown inode

    [ Upstream commit fb33c11 ]
    
    It's possible for the VFS to completely forget about an inode, but for
    it to still be sitting on the cap release queue. If the MDS sends the
    client a cap message for such an inode, it just ignores it today, which
    can lead to a stall of up to 5s until the cap release queue is flushed.
    
    If we get a cap message for an inode that can't be located, then go
    ahead and flush the cap release queue.
    
    Cc: stable@vger.kernel.org
    URL: https://tracker.ceph.com/issues/45532
    Fixes: 1e9c2eb ("ceph: delete stale dentry when last reference is dropped")
    Reported-and-Tested-by: Andrej Filipčič <andrej.filipcic@ijs.si>
    Suggested-by: Yan, Zheng <zyan@redhat.com>
    Signed-off-by: Jeff Layton <jlayton@kernel.org>
    Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    jtlayton authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    6b292d7 View commit details
    Browse the repository at this point in the history
  94. RDMA/core: Fix double destruction of uobject

    [ Upstream commit c85f4ab ]
    
    Fix use after free when user user space request uobject concurrently for
    the same object, within the RCU grace period.
    
    In that case, remove_handle_idr_uobject() is called twice and we will have
    an extra put on the uobject which cause use after free.  Fix it by leaving
    the uobject write locked after it was removed from the idr.
    
    Call to rdma_lookup_put_uobject with UVERBS_LOOKUP_DESTROY instead of
    UVERBS_LOOKUP_WRITE will do the work.
    
      refcount_t: underflow; use-after-free.
      WARNING: CPU: 0 PID: 1381 at lib/refcount.c:28 refcount_warn_saturate+0xfe/0x1a0
      Kernel panic - not syncing: panic_on_warn set ...
      CPU: 0 PID: 1381 Comm: syz-executor.0 Not tainted 5.5.0-rc3 Freescale#8
      Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
      Call Trace:
       dump_stack+0x94/0xce
       panic+0x234/0x56f
       __warn+0x1cc/0x1e1
       report_bug+0x200/0x310
       fixup_bug.part.11+0x32/0x80
       do_error_trap+0xd3/0x100
       do_invalid_op+0x31/0x40
       invalid_op+0x1e/0x30
      RIP: 0010:refcount_warn_saturate+0xfe/0x1a0
      Code: 0f 0b eb 9b e8 23 f6 6d ff 80 3d 6c d4 19 03 00 75 8d e8 15 f6 6d ff 48 c7 c7 c0 02 55 bd c6 05 57 d4 19 03 01 e8 a2 58 49 ff <0f> 0b e9 6e ff ff ff e8 f6 f5 6d ff 80 3d 42 d4 19 03 00 0f 85 5c
      RSP: 0018:ffffc90002df7b98 EFLAGS: 00010282
      RAX: 0000000000000000 RBX: ffff88810f6a193c RCX: ffffffffba649009
      RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff88811b0283cc
      RBP: 0000000000000003 R08: ffffed10236060e3 R09: ffffed10236060e3
      R10: 0000000000000001 R11: ffffed10236060e2 R12: ffff88810f6a193c
      R13: ffffc90002df7d60 R14: 0000000000000000 R15: ffff888116ae6a08
       uverbs_uobject_put+0xfd/0x140
       __uobj_perform_destroy+0x3d/0x60
       ib_uverbs_close_xrcd+0x148/0x170
       ib_uverbs_write+0xaa5/0xdf0
       __vfs_write+0x7c/0x100
       vfs_write+0x168/0x4a0
       ksys_write+0xc8/0x200
       do_syscall_64+0x9c/0x390
       entry_SYSCALL_64_after_hwframe+0x44/0xa9
      RIP: 0033:0x465b49
      Code: f7 d8 64 89 02 b8 ff ff ff ff c3 66 0f 1f 44 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
      RSP: 002b:00007f759d122c58 EFLAGS: 00000246 ORIG_RAX: 0000000000000001
      RAX: ffffffffffffffda RBX: 000000000073bfa8 RCX: 0000000000465b49
      RDX: 000000000000000c RSI: 0000000020000080 RDI: 0000000000000003
      RBP: 0000000000000003 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000246 R12: 00007f759d1236bc
      R13: 00000000004ca27c R14: 000000000070de40 R15: 00000000ffffffff
      Dumping ftrace buffer:
         (ftrace buffer empty)
      Kernel Offset: 0x39400000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
    
    Fixes: 7452a3c ("IB/uverbs: Allow RDMA_REMOVE_DESTROY to work concurrently with disassociate")
    Link: https://lore.kernel.org/r/20200527135534.482279-1-leon@kernel.org
    Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
    Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    jgunthorpe authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    b5d326a View commit details
    Browse the repository at this point in the history
  95. drm/amd/display: drop cursor position check in atomic test

    [ Upstream commit f7d5991 ]
    
    get_cursor_position already handles the case where the cursor has
    negative off-screen coordinates by not setting
    dc_cursor_position.enabled.
    
    Signed-off-by: Simon Ser <contact@emersion.fr>
    Fixes: 626bf90 ("drm/amd/display: add basic atomic check for cursor plane")
    Cc: Alex Deucher <alexander.deucher@amd.com>
    Cc: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
    Cc: stable@vger.kernel.org
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    emersion authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    5a1bd17 View commit details
    Browse the repository at this point in the history
  96. IB/ipoib: Fix double free of skb in case of multicast traffic in CM mode

    [ Upstream commit 1acba6a ]
    
    When connected mode is set, and we have connected and datagram traffic in
    parallel, ipoib might crash with double free of datagram skb.
    
    The current mechanism assumes that the order in the completion queue is
    the same as the order of sent packets for all QPs. Order is kept only for
    specific QP, in case of mixed UD and CM traffic we have few QPs (one UD and
    few CM's) in parallel.
    
    The problem:
    ----------------------------------------------------------
    
    Transmit queue:
    -----------------
    UD skb pointer kept in queue itself, CM skb kept in spearate queue and
    uses transmit queue as a placeholder to count the number of total
    transmitted packets.
    
    0   1   2   3   4  5  6  7  8   9  10  11 12 13 .........127
    ------------------------------------------------------------
    NL ud1 UD2 CM1 ud3 cm2 cm3 ud4 cm4 ud5 NL NL NL ...........
    ------------------------------------------------------------
        ^                                  ^
       tail                               head
    
    Completion queue (problematic scenario) - the order not the same as in
    the transmit queue:
    
      1  2  3  4  5  6  7  8  9
    ------------------------------------
     ud1 CM1 UD2 ud3 cm2 cm3 ud4 cm4 ud5
    ------------------------------------
    
    1. CM1 'wc' processing
       - skb freed in cm separate ring.
       - tx_tail of transmit queue increased although UD2 is not freed.
         Now driver assumes UD2 index is already freed and it could be used for
         new transmitted skb.
    
    0   1   2   3   4  5  6  7  8   9  10  11 12 13 .........127
    ------------------------------------------------------------
    NL NL  UD2 CM1 ud3 cm2 cm3 ud4 cm4 ud5 NL NL NL ...........
    ------------------------------------------------------------
            ^   ^                       ^
          (Bad)tail                    head
    (Bad - Could be used for new SKB)
    
    In this case (due to heavy load) UD2 skb pointer could be replaced by new
    transmitted packet UD_NEW, as the driver assumes its free.  At this point
    we will have to process two 'wc' with same index but we have only one
    pointer to free.
    
    During second attempt to free the same skb we will have NULL pointer
    exception.
    
    2. UD2 'wc' processing
       - skb freed according the index we got from 'wc', but it was already
         overwritten by mistake. So actually the skb that was released is the
         skb of the new transmitted packet and not the original one.
    
    3. UD_NEW 'wc' processing
       - attempt to free already freed skb. NUll pointer exception.
    
    The fix:
    -----------------------------------------------------------------------
    
    The fix is to stop using the UD ring as a placeholder for CM packets, the
    cyclic ring variables tx_head and tx_tail will manage the UD tx_ring, a
    new cyclic variables global_tx_head and global_tx_tail are introduced for
    managing and counting the overall outstanding sent packets, then the send
    queue will be stopped and waken based on these variables only.
    
    Note that no locking is needed since global_tx_head is updated in the xmit
    flow and global_tx_tail is updated in the NAPI flow only.  A previous
    attempt tried to use one variable to count the outstanding sent packets,
    but it did not work since xmit and NAPI flows can run at the same time and
    the counter will be updated wrongly. Thus, we use the same simple cyclic
    head and tail scheme that we have today for the UD tx_ring.
    
    Fixes: 2c104ea ("IB/ipoib: Get rid of the tx_outstanding variable in all modes")
    Link: https://lore.kernel.org/r/20200527134705.480068-1-leon@kernel.org
    Signed-off-by: Valentine Fatiev <valentinef@mellanox.com>
    Signed-off-by: Alaa Hleihel <alaa@mellanox.com>
    Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
    Acked-by: Doug Ledford <dledford@redhat.com>
    Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Valentine Fatiev authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    21358b3 View commit details
    Browse the repository at this point in the history
  97. mm,thp: stop leaking unreleased file pages

    [ Upstream commit 2f33a70 ]
    
    When collapse_file() calls try_to_release_page(), it has already isolated
    the page: so if releasing buffers happens to fail (as it sometimes does),
    remember to putback_lru_page(): otherwise that page is left unreclaimable
    and unfreeable, and the file extent uncollapsible.
    
    Fixes: 99cb0db ("mm,thp: add read-only THP support for (non-shmem) FS")
    Signed-off-by: Hugh Dickins <hughd@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Acked-by: Song Liu <songliubraving@fb.com>
    Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Acked-by: Johannes Weiner <hannes@cmpxchg.org>
    Cc: Rik van Riel <riel@surriel.com>
    Cc: <stable@vger.kernel.org>	[5.4+]
    Link: http://lkml.kernel.org/r/alpine.LSU.2.11.2005231837500.1766@eggly.anvils
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Hugh Dickins authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    a7ba9f2 View commit details
    Browse the repository at this point in the history
  98. mm: remove VM_BUG_ON(PageSlab()) from page_mapcount()

    [ Upstream commit 6988f31 ]
    
    Replace superfluous VM_BUG_ON() with comment about correct usage.
    
    Technically reverts commit 1d148e2 ("mm: add VM_BUG_ON_PAGE() to
    page_mapcount()"), but context lines have changed.
    
    Function isolate_migratepages_block() runs some checks out of lru_lock
    when choose pages for migration.  After checking PageLRU() it checks
    extra page references by comparing page_count() and page_mapcount().
    Between these two checks page could be removed from lru, freed and taken
    by slab.
    
    As a result this race triggers VM_BUG_ON(PageSlab()) in page_mapcount().
    Race window is tiny.  For certain workload this happens around once a
    year.
    
        page:ffffea0105ca9380 count:1 mapcount:0 mapping:ffff88ff7712c180 index:0x0 compound_mapcount: 0
        flags: 0x500000000008100(slab|head)
        raw: 0500000000008100 dead000000000100 dead000000000200 ffff88ff7712c180
        raw: 0000000000000000 0000000080200020 00000001ffffffff 0000000000000000
        page dumped because: VM_BUG_ON_PAGE(PageSlab(page))
        ------------[ cut here ]------------
        kernel BUG at ./include/linux/mm.h:628!
        invalid opcode: 0000 [Freescale#1] SMP NOPTI
        CPU: 77 PID: 504 Comm: kcompactd1 Tainted: G        W         4.19.109-27 Freescale#1
        Hardware name: Yandex T175-N41-Y3N/MY81-EX0-Y3N, BIOS R05 06/20/2019
        RIP: 0010:isolate_migratepages_block+0x986/0x9b0
    
    The code in isolate_migratepages_block() was added in commit
    119d6d5 ("mm, compaction: avoid isolating pinned pages") before
    adding VM_BUG_ON into page_mapcount().
    
    This race has been predicted in 2015 by Vlastimil Babka (see link
    below).
    
    [akpm@linux-foundation.org: comment tweaks, per Hugh]
    Fixes: 1d148e2 ("mm: add VM_BUG_ON_PAGE() to page_mapcount()")
    Signed-off-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Acked-by: Hugh Dickins <hughd@google.com>
    Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
    Acked-by: Vlastimil Babka <vbabka@suse.cz>
    Cc: David Rientjes <rientjes@google.com>
    Cc: <stable@vger.kernel.org>
    Link: http://lkml.kernel.org/r/159032779896.957378.7852761411265662220.stgit@buzz
    Link: https://lore.kernel.org/lkml/557710E1.6060103@suse.cz/
    Link: https://lore.kernel.org/linux-mm/158937872515.474360.5066096871639561424.stgit@buzz/T/ (v1)
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    koct9i authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    de482c4 View commit details
    Browse the repository at this point in the history
  99. fs/binfmt_elf.c: allocate initialized memory in fill_thread_core_info()

    [ Upstream commit 1d60541 ]
    
    KMSAN reported uninitialized data being written to disk when dumping
    core.  As a result, several kilobytes of kmalloc memory may be written
    to the core file and then read by a non-privileged user.
    
    Reported-by: sam <sunhaoyl@outlook.com>
    Signed-off-by: Alexander Potapenko <glider@google.com>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Acked-by: Kees Cook <keescook@chromium.org>
    Cc: Al Viro <viro@zeniv.linux.org.uk>
    Cc: Alexey Dobriyan <adobriyan@gmail.com>
    Cc: <stable@vger.kernel.org>
    Link: http://lkml.kernel.org/r/20200419100848.63472-1-glider@google.com
    Link: google/kmsan#76
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ramosian-glider authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    a02c130 View commit details
    Browse the repository at this point in the history
  100. include/asm-generic/topology.h: guard cpumask_of_node() macro argument

    [ Upstream commit 4377748 ]
    
    drivers/hwmon/amd_energy.c:195:15: error: invalid operands to binary expression ('void' and 'int')
                                            (channel - data->nr_cpus));
                                            ~~~~~~~~~^~~~~~~~~~~~~~~~~
    include/asm-generic/topology.h:51:42: note: expanded from macro 'cpumask_of_node'
        #define cpumask_of_node(node)       ((void)node, cpu_online_mask)
                                                   ^~~~
    include/linux/cpumask.h:618:72: note: expanded from macro 'cpumask_first_and'
     #define cpumask_first_and(src1p, src2p) cpumask_next_and(-1, (src1p), (src2p))
                                                                           ^~~~~
    
    Fixes: f0b848c ("cpumask: Introduce cpumask_of_{node,pcibus} to replace {node,pcibus}_to_cpumask")
    Fixes: 8abee95 ("hwmon: Add amd_energy driver to report energy counters")
    Signed-off-by: Arnd Bergmann <arnd@arndb.de>
    Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
    Acked-by: Guenter Roeck <linux@roeck-us.net>
    Link: http://lkml.kernel.org/r/20200527134623.930247-1-arnd@arndb.de
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    arndb authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    31f0b78 View commit details
    Browse the repository at this point in the history
  101. Revert "block: end bio with BLK_STS_AGAIN in case of non-mq devs and …

    …REQ_NOWAIT"
    
    [ Upstream commit b0beb28 ]
    
    This reverts commit c58c1f8.
    
    io_uring does do the right thing for this case, and we're still returning
    -EAGAIN to userspace for the cases we don't support. Revert this change
    to avoid doing endless spins of resubmits.
    
    Cc: stable@vger.kernel.org # v5.6
    Reported-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com>
    Signed-off-by: Jens Axboe <axboe@kernel.dk>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    axboe authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    bba91cd View commit details
    Browse the repository at this point in the history
  102. gpio: fix locking open drain IRQ lines

    [ Upstream commit e9bdf7e ]
    
    We provided the right semantics on open drain lines being
    by definition output but incidentally the irq set up function
    would only allow IRQs on lines that were "not output".
    
    Fix the semantics to allow output open drain lines to be used
    for IRQs.
    
    Reported-by: Hans Verkuil <hverkuil@xs4all.nl>
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
    Tested-by: Hans Verkuil <hverkuil@xs4all.nl>
    Cc: Russell King <linux@armlinux.org.uk>
    Cc: stable@vger.kernel.org # v5.3+
    Link: https://lore.kernel.org/r/20200527140758.162280-1-linus.walleij@linaro.org
    Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    linusw authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    b298c31 View commit details
    Browse the repository at this point in the history
  103. iommu: Fix reference count leak in iommu_group_alloc.

    [ Upstream commit 7cc3161 ]
    
    kobject_init_and_add() takes reference even when it fails.
    Thus, when kobject_init_and_add() returns an error,
    kobject_put() must be called to properly clean up the kobject.
    
    Fixes: d72e31c ("iommu: IOMMU Groups")
    Signed-off-by: Qiushi Wu <wu000273@umn.edu>
    Link: https://lore.kernel.org/r/20200527210020.6522-1-wu000273@umn.edu
    Signed-off-by: Joerg Roedel <jroedel@suse.de>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    QiushiWu authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    ca788fd View commit details
    Browse the repository at this point in the history
  104. parisc: Fix kernel panic in mem_init()

    [ Upstream commit bf71bc1 ]
    
    The Debian kernel v5.6 triggers this kernel panic:
    
     Kernel panic - not syncing: Bad Address (null pointer deref?)
     Bad Address (null pointer deref?): Code=26 (Data memory access rights trap) at addr 0000000000000000
     CPU: 0 PID: 0 Comm: swapper Not tainted 5.6.0-2-parisc64 Freescale#1 Debian 5.6.14-1
      IAOQ[0]: mem_init+0xb0/0x150
      IAOQ[1]: mem_init+0xb4/0x150
      RP(r2): start_kernel+0x6c8/0x1190
     Backtrace:
      [<0000000040101ab4>] start_kernel+0x6c8/0x1190
      [<0000000040108574>] start_parisc+0x158/0x1b8
    
    on a HP-PARISC rp3440 machine with this memory layout:
     Memory Ranges:
      0) Start 0x0000000000000000 End 0x000000003fffffff Size   1024 MB
      1) Start 0x0000004040000000 End 0x00000040ffdfffff Size   3070 MB
    
    Fix the crash by avoiding virt_to_page() and similar functions in
    mem_init() until the memory zones have been fully set up.
    
    Signed-off-by: Helge Deller <deller@gmx.de>
    Cc: stable@vger.kernel.org # v5.0+
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    hdeller authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    f9cd0c8 View commit details
    Browse the repository at this point in the history
  105. cfg80211: fix debugfs rename crash

    commit 0bbab5f upstream.
    
    Removing the "if (IS_ERR(dir)) dir = NULL;" check only works
    if we adjust the remaining code to not rely on it being NULL.
    Check IS_ERR_OR_NULL() before attempting to dereference it.
    
    I'm not actually entirely sure this fixes the syzbot crash as
    the kernel config indicates that they do have DEBUG_FS in the
    kernel, but this is what I found when looking there.
    
    Cc: stable@vger.kernel.org
    Fixes: d82574a ("cfg80211: no need to check return value of debugfs_create functions")
    Reported-by: syzbot+fd5332e429401bf42d18@syzkaller.appspotmail.com
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/20200525113816.fc4da3ec3d4b.Ica63a110679819eaa9fb3bc1b7437d96b1fd187d@changeid
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    jmberg-intel authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    8c1bfa7 View commit details
    Browse the repository at this point in the history
  106. x86/syscalls: Revert "x86/syscalls: Make __X32_SYSCALL_BIT be unsigne…

    …d long"
    
    commit 700d3a5 upstream.
    
    Revert
    
      45e29d1 ("x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long")
    
    and add a comment to discourage someone else from making the same
    mistake again.
    
    It turns out that some user code fails to compile if __X32_SYSCALL_BIT
    is unsigned long. See, for example [1] below.
    
     [ bp: Massage and do the same thing in the respective tools/ header. ]
    
    Fixes: 45e29d1 ("x86/syscalls: Make __X32_SYSCALL_BIT be unsigned long")
    Reported-by: Thorsten Glaser <t.glaser@tarent.de>
    Signed-off-by: Andy Lutomirski <luto@kernel.org>
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Cc: stable@kernel.org
    Link: [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954294
    Link: https://lkml.kernel.org/r/92e55442b744a5951fdc9cfee10badd0a5f7f828.1588983892.git.luto@kernel.org
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    amluto authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    2f08516 View commit details
    Browse the repository at this point in the history
  107. mac80211: mesh: fix discovery timer re-arming issue / crash

    commit e2d4a80 upstream.
    
    On a non-forwarding 802.11s link between two fairly busy
    neighboring nodes (iperf with -P 16 at ~850MBit/s TCP;
    1733.3 MBit/s VHT-MCS 9 80MHz short GI VHT-NSS 4), so with
    frequent PREQ retries, usually after around 30-40 seconds the
    following crash would occur:
    
    [ 1110.822428] Unable to handle kernel read from unreadable memory at virtual address 00000000
    [ 1110.830786] Mem abort info:
    [ 1110.833573]   Exception class = IABT (current EL), IL = 32 bits
    [ 1110.839494]   SET = 0, FnV = 0
    [ 1110.842546]   EA = 0, S1PTW = 0
    [ 1110.845678] user pgtable: 4k pages, 48-bit VAs, pgd = ffff800076386000
    [ 1110.852204] [0000000000000000] *pgd=00000000f6322003, *pud=00000000f62de003, *pmd=0000000000000000
    [ 1110.861167] Internal error: Oops: 86000004 [Freescale#1] PREEMPT SMP
    [ 1110.866730] Modules linked in: pppoe ppp_async batman_adv ath10k_pci ath10k_core ath pppox ppp_generic nf_conntrack_ipv6 mac80211 iptable_nat ipt_REJECT ipt_MASQUERADE cfg80211 xt_time xt_tcpudp xt_state xt_nat xt_multiport xt_mark xt_mac xt_limit xt_conntrack xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_FLOWOFFLOAD slhc nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache nf_conntrack iptable_mangle iptable_filter ip_tables crc_ccitt compat nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 usb_storage xhci_plat_hcd xhci_pci xhci_hcd dwc3 usbcore usb_common
    [ 1110.932190] Process swapper/3 (pid: 0, stack limit = 0xffff0000090c8000)
    [ 1110.938884] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 4.14.162 #0
    [ 1110.944965] Hardware name: LS1043A RGW Board (DT)
    [ 1110.949658] task: ffff8000787a81c0 task.stack: ffff0000090c8000
    [ 1110.955568] PC is at 0x0
    [ 1110.958097] LR is at call_timer_fn.isra.27+0x24/0x78
    [ 1110.963055] pc : [<0000000000000000>] lr : [<ffff0000080ff29c>] pstate: 00400145
    [ 1110.970440] sp : ffff00000801be10
    [ 1110.973744] x29: ffff00000801be10 x28: ffff000008bf7018
    [ 1110.979047] x27: ffff000008bf87c8 x26: ffff000008c160c0
    [ 1110.984352] x25: 0000000000000000 x24: 0000000000000000
    [ 1110.989657] x23: dead000000000200 x22: 0000000000000000
    [ 1110.994959] x21: 0000000000000000 x20: 0000000000000101
    [ 1111.000262] x19: ffff8000787a81c0 x18: 0000000000000000
    [ 1111.005565] x17: ffff0000089167b0 x16: 0000000000000058
    [ 1111.010868] x15: ffff0000089167b0 x14: 0000000000000000
    [ 1111.016172] x13: ffff000008916788 x12: 0000000000000040
    [ 1111.021475] x11: ffff80007fda9af0 x10: 0000000000000001
    [ 1111.026777] x9 : ffff00000801bea0 x8 : 0000000000000004
    [ 1111.032080] x7 : 0000000000000000 x6 : ffff80007fda9aa8
    [ 1111.037383] x5 : ffff00000801bea0 x4 : 0000000000000010
    [ 1111.042685] x3 : ffff00000801be98 x2 : 0000000000000614
    [ 1111.047988] x1 : 0000000000000000 x0 : 0000000000000000
    [ 1111.053290] Call trace:
    [ 1111.055728] Exception stack(0xffff00000801bcd0 to 0xffff00000801be10)
    [ 1111.062158] bcc0:                                   0000000000000000 0000000000000000
    [ 1111.069978] bce0: 0000000000000614 ffff00000801be98 0000000000000010 ffff00000801bea0
    [ 1111.077798] bd00: ffff80007fda9aa8 0000000000000000 0000000000000004 ffff00000801bea0
    [ 1111.085618] bd20: 0000000000000001 ffff80007fda9af0 0000000000000040 ffff000008916788
    [ 1111.093437] bd40: 0000000000000000 ffff0000089167b0 0000000000000058 ffff0000089167b0
    [ 1111.101256] bd60: 0000000000000000 ffff8000787a81c0 0000000000000101 0000000000000000
    [ 1111.109075] bd80: 0000000000000000 dead000000000200 0000000000000000 0000000000000000
    [ 1111.116895] bda0: ffff000008c160c0 ffff000008bf87c8 ffff000008bf7018 ffff00000801be10
    [ 1111.124715] bdc0: ffff0000080ff29c ffff00000801be10 0000000000000000 0000000000400145
    [ 1111.132534] bde0: ffff8000787a81c0 ffff00000801bde8 0000ffffffffffff 000001029eb19be8
    [ 1111.140353] be00: ffff00000801be10 0000000000000000
    [ 1111.145220] [<          (null)>]           (null)
    [ 1111.149917] [<ffff0000080ff77c>] run_timer_softirq+0x184/0x398
    [ 1111.155741] [<ffff000008081938>] __do_softirq+0x100/0x1fc
    [ 1111.161130] [<ffff0000080a2e28>] irq_exit+0x80/0xd8
    [ 1111.166002] [<ffff0000080ea708>] __handle_domain_irq+0x88/0xb0
    [ 1111.171825] [<ffff000008081678>] gic_handle_irq+0x68/0xb0
    [ 1111.177213] Exception stack(0xffff0000090cbe30 to 0xffff0000090cbf70)
    [ 1111.183642] be20:                                   0000000000000020 0000000000000000
    [ 1111.191461] be40: 0000000000000001 0000000000000000 00008000771af000 0000000000000000
    [ 1111.199281] be60: ffff000008c95180 0000000000000000 ffff000008c19360 ffff0000090cbef0
    [ 1111.207101] be80: 0000000000000810 0000000000000400 0000000000000098 ffff000000000000
    [ 1111.214920] bea0: 0000000000000001 ffff0000089167b0 0000000000000000 ffff0000089167b0
    [ 1111.222740] bec0: 0000000000000000 ffff000008c198e8 ffff000008bf7018 ffff000008c19000
    [ 1111.230559] bee0: 0000000000000000 0000000000000000 ffff8000787a81c0 ffff000008018000
    [ 1111.238380] bf00: ffff00000801c000 ffff00000913ba34 ffff8000787a81c0 ffff0000090cbf70
    [ 1111.246199] bf20: ffff0000080857cc ffff0000090cbf70 ffff0000080857d0 0000000000400145
    [ 1111.254020] bf40: ffff000008018000 ffff00000801c000 ffffffffffffffff ffff0000080fa574
    [ 1111.261838] bf60: ffff0000090cbf70 ffff0000080857d0
    [ 1111.266706] [<ffff0000080832e8>] el1_irq+0xe8/0x18c
    [ 1111.271576] [<ffff0000080857d0>] arch_cpu_idle+0x10/0x18
    [ 1111.276880] [<ffff0000080d7de4>] do_idle+0xec/0x1b8
    [ 1111.281748] [<ffff0000080d8020>] cpu_startup_entry+0x20/0x28
    [ 1111.287399] [<ffff00000808f81c>] secondary_start_kernel+0x104/0x110
    [ 1111.293662] Code: bad PC value
    [ 1111.296710] ---[ end trace 555b6ca4363c3edd ]---
    [ 1111.301318] Kernel panic - not syncing: Fatal exception in interrupt
    [ 1111.307661] SMP: stopping secondary CPUs
    [ 1111.311574] Kernel Offset: disabled
    [ 1111.315053] CPU features: 0x0002000
    [ 1111.318530] Memory Limit: none
    [ 1111.321575] Rebooting in 3 seconds..
    
    With some added debug output / delays we were able to push the crash from
    the timer callback runner into the callback function and by that shedding
    some light on which object holding the timer gets corrupted:
    
    [  401.720899] Unable to handle kernel read from unreadable memory at virtual address 00000868
    [...]
    [  402.335836] [<ffff0000088fafa4>] _raw_spin_lock_bh+0x14/0x48
    [  402.341548] [<ffff000000dbe684>] mesh_path_timer+0x10c/0x248 [mac80211]
    [  402.348154] [<ffff0000080ff29c>] call_timer_fn.isra.27+0x24/0x78
    [  402.354150] [<ffff0000080ff77c>] run_timer_softirq+0x184/0x398
    [  402.359974] [<ffff000008081938>] __do_softirq+0x100/0x1fc
    [  402.365362] [<ffff0000080a2e28>] irq_exit+0x80/0xd8
    [  402.370231] [<ffff0000080ea708>] __handle_domain_irq+0x88/0xb0
    [  402.376053] [<ffff000008081678>] gic_handle_irq+0x68/0xb0
    
    The issue happens due to the following sequence of events:
    
    1) mesh_path_start_discovery():
    -> spin_unlock_bh(&mpath->state_lock) before mesh_path_sel_frame_tx()
    
    2) mesh_path_free_rcu()
    -> del_timer_sync(&mpath->timer)
       [...]
    -> kfree_rcu(mpath)
    
    3) mesh_path_start_discovery():
    -> mod_timer(&mpath->timer, ...)
       [...]
    -> rcu_read_unlock()
    
    4) mesh_path_free_rcu()'s kfree_rcu():
    -> kfree(mpath)
    
    5) mesh_path_timer() starts after timeout, using freed mpath object
    
    So a use-after-free issue due to a timer re-arming bug caused by an
    early spin-unlocking.
    
    This patch fixes this issue by re-checking if mpath is about to be
    free'd and if so bails out of re-arming the timer.
    
    Cc: stable@vger.kernel.org
    Fixes: 050ac52 ("mac80211: code for on-demand Hybrid Wireless Mesh Protocol")
    Cc: Simon Wunderlich <sw@simonwunderlich.de>
    Signed-off-by: Linus Lüssing <ll@simonwunderlich.de>
    Link: https://lore.kernel.org/r/20200522170413.14973-1-linus.luessing@c0d3.blue
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    T-X authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    e980f9c View commit details
    Browse the repository at this point in the history
  108. x86/dma: Fix max PFN arithmetic overflow on 32 bit systems

    commit 8874347 upstream.
    
    The intermediate result of the old term (4UL * 1024 * 1024 * 1024) is
    4 294 967 296 or 0x100000000 which is no problem on 64 bit systems.
    The patch does not change the later overall result of 0x100000 for
    MAX_DMA32_PFN (after it has been shifted by PAGE_SHIFT). The new
    calculation yields the same result, but does not require 64 bit
    arithmetic.
    
    On 32 bit systems the old calculation suffers from an arithmetic
    overflow in that intermediate term in braces: 4UL aka unsigned long int
    is 4 byte wide and an arithmetic overflow happens (the 0x100000000 does
    not fit in 4 bytes), the in braces result is truncated to zero, the
    following right shift does not alter that, so MAX_DMA32_PFN evaluates to
    0 on 32 bit systems.
    
    That wrong value is a problem in a comparision against MAX_DMA32_PFN in
    the init code for swiotlb in pci_swiotlb_detect_4gb() to decide if
    swiotlb should be active.  That comparison yields the opposite result,
    when compiling on 32 bit systems.
    
    This was not possible before
    
      1b7e03e ("x86, NUMA: Enable emulation on 32bit too")
    
    when that MAX_DMA32_PFN was first made visible to x86_32 (and which
    landed in v3.0).
    
    In practice this wasn't a problem, unless CONFIG_SWIOTLB is active on
    x86-32.
    
    However if one has set CONFIG_IOMMU_INTEL, since
    
      c5a5dc4 ("iommu/vt-d: Don't switch off swiotlb if bounce page is used")
    
    there's a dependency on CONFIG_SWIOTLB, which was not necessarily
    active before. That landed in v5.4, where we noticed it in the fli4l
    Linux distribution. We have CONFIG_IOMMU_INTEL active on both 32 and 64
    bit kernel configs there (I could not find out why, so let's just say
    historical reasons).
    
    The effect is at boot time 64 MiB (default size) were allocated for
    bounce buffers now, which is a noticeable amount of memory on small
    systems like pcengines ALIX 2D3 with 256 MiB memory, which are still
    frequently used as home routers.
    
    We noticed this effect when migrating from kernel v4.19 (LTS) to v5.4
    (LTS) in fli4l and got that kernel messages for example:
    
      Linux version 5.4.22 (buildroot@buildroot) (gcc version 7.3.0 (Buildroot 2018.02.8)) Freescale#1 SMP Mon Nov 26 23:40:00 CET 2018
      …
      Memory: 183484K/261756K available (4594K kernel code, 393K rwdata, 1660K rodata, 536K init, 456K bss , 78272K reserved, 0K cma-reserved, 0K highmem)
      …
      PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
      software IO TLB: mapped [mem 0x0bb78000-0x0fb78000] (64MB)
    
    The initial analysis and the suggested fix was done by user 'sourcejedi'
    at stackoverflow and explicitly marked as GPLv2 for inclusion in the
    Linux kernel:
    
      https://unix.stackexchange.com/a/520525/50007
    
    The new calculation, which does not suffer from that overflow, is the
    same as for arch/mips now as suggested by Robin Murphy.
    
    The fix was tested by fli4l users on round about two dozen different
    systems, including both 32 and 64 bit archs, bare metal and virtualized
    machines.
    
     [ bp: Massage commit message. ]
    
    Fixes: 1b7e03e ("x86, NUMA: Enable emulation on 32bit too")
    Reported-by: Alan Jenkins <alan.christopher.jenkins@gmail.com>
    Suggested-by: Robin Murphy <robin.murphy@arm.com>
    Signed-off-by: Alexander Dahl <post@lespocky.de>
    Signed-off-by: Borislav Petkov <bp@suse.de>
    Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Cc: stable@vger.kernel.org
    Link: https://unix.stackexchange.com/q/520065/50007
    Link: https://web.nettworks.org/bugs/browse/FFL-2560
    Link: https://lkml.kernel.org/r/20200526175749.20742-1-post@lespocky.de
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    LeSpocky authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    94690ca View commit details
    Browse the repository at this point in the history
  109. copy_xstate_to_kernel(): don't leave parts of destination uninitialized

    commit 9e46365 upstream.
    
    copy the corresponding pieces of init_fpstate into the gaps instead.
    
    Cc: stable@kernel.org
    Tested-by: Alexander Potapenko <glider@google.com>
    Acked-by: Borislav Petkov <bp@suse.de>
    Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Al Viro authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    47dc81c View commit details
    Browse the repository at this point in the history
  110. xfrm: allow to accept packets with ipv6 NEXTHDR_HOP in xfrm_input

    commit afcaf61 upstream.
    
    For beet mode, when it's ipv6 inner address with nexthdrs set,
    the packet format might be:
    
        ----------------------------------------------------
        | outer  |     | dest |     |      |  ESP    | ESP |
        | IP hdr | ESP | opts.| TCP | Data | Trailer | ICV |
        ----------------------------------------------------
    
    The nexthdr from ESP could be NEXTHDR_HOP(0), so it should
    continue processing the packet when nexthdr returns 0 in
    xfrm_input(). Otherwise, when ipv6 nexthdr is set, the
    packet will be dropped.
    
    I don't see any error cases that nexthdr may return 0. So
    fix it by removing the check for nexthdr == 0.
    
    Fixes: 1da177e ("Linux-2.6.12-rc2")
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    lxin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    14a1c1d View commit details
    Browse the repository at this point in the history
  111. xfrm: do pskb_pull properly in __xfrm_transport_prep

    commit 06a0afc upstream.
    
    For transport mode, when ipv6 nexthdr is set, the packet format might
    be like:
    
        ----------------------------------------------------
        |        | dest |     |     |      |  ESP    | ESP |
        | IP6 hdr| opts.| ESP | TCP | Data | Trailer | ICV |
        ----------------------------------------------------
    
    and in __xfrm_transport_prep():
    
      pskb_pull(skb, skb->mac_len + sizeof(ip6hdr) + x->props.header_len);
    
    it will pull the data pointer to the wrong position, as it missed the
    nexthdrs/dest opts.
    
    This patch is to fix it by using:
    
      pskb_pull(skb, skb_transport_offset(skb) + x->props.header_len);
    
    as we can be sure transport_header points to ESP header at that moment.
    
    It also fixes a panic when packets with ipv6 nexthdr are sent over
    esp6 transport mode:
    
      [  100.473845] kernel BUG at net/core/skbuff.c:4325!
      [  100.478517] RIP: 0010:__skb_to_sgvec+0x252/0x260
      [  100.494355] Call Trace:
      [  100.494829]  skb_to_sgvec+0x11/0x40
      [  100.495492]  esp6_output_tail+0x12e/0x550 [esp6]
      [  100.496358]  esp6_xmit+0x1d5/0x260 [esp6_offload]
      [  100.498029]  validate_xmit_xfrm+0x22f/0x2e0
      [  100.499604]  __dev_queue_xmit+0x589/0x910
      [  100.502928]  ip6_finish_output2+0x2a5/0x5a0
      [  100.503718]  ip6_output+0x6c/0x120
      [  100.505198]  xfrm_output_resume+0x4bf/0x530
      [  100.508683]  xfrm6_output+0x3a/0xc0
      [  100.513446]  inet6_csk_xmit+0xa1/0xf0
      [  100.517335]  tcp_sendmsg+0x27/0x40
      [  100.517977]  sock_sendmsg+0x3e/0x60
      [  100.518648]  __sys_sendto+0xee/0x160
    
    Fixes: c35fe41 ("xfrm: Add mode handlers for IPsec on layer 2")
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    lxin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    cd7031e View commit details
    Browse the repository at this point in the history
  112. xfrm: remove the xfrm_state_put call becofe going to out_reset

    commit db87668 upstream.
    
    This xfrm_state_put call in esp4/6_gro_receive() will cause
    double put for state, as in out_reset path secpath_reset()
    will put all states set in skb sec_path.
    
    So fix it by simply remove the xfrm_state_put call.
    
    Fixes: 6ed6918 ("xfrm: Reset secpath in xfrm failure")
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    lxin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    edd79cf View commit details
    Browse the repository at this point in the history
  113. xfrm: call xfrm_output_gso when inner_protocol is set in xfrm_output

    commit a204aef upstream.
    
    An use-after-free crash can be triggered when sending big packets over
    vxlan over esp with esp offload enabled:
    
      [] BUG: KASAN: use-after-free in ipv6_gso_pull_exthdrs.part.8+0x32c/0x4e0
      [] Call Trace:
      []  dump_stack+0x75/0xa0
      []  kasan_report+0x37/0x50
      []  ipv6_gso_pull_exthdrs.part.8+0x32c/0x4e0
      []  ipv6_gso_segment+0x2c8/0x13c0
      []  skb_mac_gso_segment+0x1cb/0x420
      []  skb_udp_tunnel_segment+0x6b5/0x1c90
      []  inet_gso_segment+0x440/0x1380
      []  skb_mac_gso_segment+0x1cb/0x420
      []  esp4_gso_segment+0xae8/0x1709 [esp4_offload]
      []  inet_gso_segment+0x440/0x1380
      []  skb_mac_gso_segment+0x1cb/0x420
      []  __skb_gso_segment+0x2d7/0x5f0
      []  validate_xmit_skb+0x527/0xb10
      []  __dev_queue_xmit+0x10f8/0x2320 <---
      []  ip_finish_output2+0xa2e/0x1b50
      []  ip_output+0x1a8/0x2f0
      []  xfrm_output_resume+0x110e/0x15f0
      []  __xfrm4_output+0xe1/0x1b0
      []  xfrm4_output+0xa0/0x200
      []  iptunnel_xmit+0x5a7/0x920
      []  vxlan_xmit_one+0x1658/0x37a0 [vxlan]
      []  vxlan_xmit+0x5e4/0x3ec8 [vxlan]
      []  dev_hard_start_xmit+0x125/0x540
      []  __dev_queue_xmit+0x17bd/0x2320  <---
      []  ip6_finish_output2+0xb20/0x1b80
      []  ip6_output+0x1b3/0x390
      []  ip6_xmit+0xb82/0x17e0
      []  inet6_csk_xmit+0x225/0x3d0
      []  __tcp_transmit_skb+0x1763/0x3520
      []  tcp_write_xmit+0xd64/0x5fe0
      []  __tcp_push_pending_frames+0x8c/0x320
      []  tcp_sendmsg_locked+0x2245/0x3500
      []  tcp_sendmsg+0x27/0x40
    
    As on the tx path of vxlan over esp, skb->inner_network_header would be
    set on vxlan_xmit() and xfrm4_tunnel_encap_add(), and the later one can
    overwrite the former one. It causes skb_udp_tunnel_segment() to use a
    wrong skb->inner_network_header, then the issue occurs.
    
    This patch is to fix it by calling xfrm_output_gso() instead when the
    inner_protocol is set, in which gso_segment of inner_protocol will be
    done first.
    
    While at it, also improve some code around.
    
    Fixes: 7862b40 ("esp: Add gso handlers for esp4 and esp6")
    Reported-by: Xiumei Mu <xmu@redhat.com>
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    lxin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    de4a187 View commit details
    Browse the repository at this point in the history
  114. xfrm interface: fix oops when deleting a x-netns interface

    commit c95c5f5 upstream.
    
    Here is the steps to reproduce the problem:
    ip netns add foo
    ip netns add bar
    ip -n foo link add xfrmi0 type xfrm dev lo if_id 42
    ip -n foo link set xfrmi0 netns bar
    ip netns del foo
    ip netns del bar
    
    Which results to:
    [  186.686395] general protection fault, probably for non-canonical address 0x6b6b6b6b6b6b6bd3: 0000 [Freescale#1] SMP PTI
    [  186.687665] CPU: 7 PID: 232 Comm: kworker/u16:2 Not tainted 5.6.0+ Freescale#1
    [  186.688430] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.12.0-1 04/01/2014
    [  186.689420] Workqueue: netns cleanup_net
    [  186.689903] RIP: 0010:xfrmi_dev_uninit+0x1b/0x4b [xfrm_interface]
    [  186.690657] Code: 44 f6 ff ff 31 c0 5b 5d 41 5c 41 5d 41 5e c3 48 8d 8f c0 08 00 00 8b 05 ce 14 00 00 48 8b 97 d0 08 00 00 48 8b 92 c0 0e 00 00 <48> 8b 14 c2 48 8b 02 48 85 c0 74 19 48 39 c1 75 0c 48 8b 87 c0 08
    [  186.692838] RSP: 0018:ffffc900003b7d68 EFLAGS: 00010286
    [  186.693435] RAX: 000000000000000d RBX: ffff8881b0f31000 RCX: ffff8881b0f318c0
    [  186.694334] RDX: 6b6b6b6b6b6b6b6b RSI: 0000000000000246 RDI: ffff8881b0f31000
    [  186.695190] RBP: ffffc900003b7df0 R08: ffff888236c07740 R09: 0000000000000040
    [  186.696024] R10: ffffffff81fce1b8 R11: 0000000000000002 R12: ffffc900003b7d80
    [  186.696859] R13: ffff8881edcc6a40 R14: ffff8881a1b6e780 R15: ffffffff81ed47c8
    [  186.697738] FS:  0000000000000000(0000) GS:ffff888237dc0000(0000) knlGS:0000000000000000
    [  186.698705] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    [  186.699408] CR2: 00007f2129e93148 CR3: 0000000001e0a000 CR4: 00000000000006e0
    [  186.700221] Call Trace:
    [  186.700508]  rollback_registered_many+0x32b/0x3fd
    [  186.701058]  ? __rtnl_unlock+0x20/0x3d
    [  186.701494]  ? arch_local_irq_save+0x11/0x17
    [  186.702012]  unregister_netdevice_many+0x12/0x55
    [  186.702594]  default_device_exit_batch+0x12b/0x150
    [  186.703160]  ? prepare_to_wait_exclusive+0x60/0x60
    [  186.703719]  cleanup_net+0x17d/0x234
    [  186.704138]  process_one_work+0x196/0x2e8
    [  186.704652]  worker_thread+0x1a4/0x249
    [  186.705087]  ? cancel_delayed_work+0x92/0x92
    [  186.705620]  kthread+0x105/0x10f
    [  186.706000]  ? __kthread_bind_mask+0x57/0x57
    [  186.706501]  ret_from_fork+0x35/0x40
    [  186.706978] Modules linked in: xfrm_interface nfsv3 nfs_acl auth_rpcgss nfsv4 nfs lockd grace fscache sunrpc button parport_pc parport serio_raw evdev pcspkr loop ext4 crc16 mbcache jbd2 crc32c_generic 8139too ide_cd_mod cdrom ide_gd_mod ata_generic ata_piix libata scsi_mod piix psmouse i2c_piix4 ide_core 8139cp i2c_core mii floppy
    [  186.710423] ---[ end trace 463bba18105537e5 ]---
    
    The problem is that x-netns xfrm interface are not removed when the link
    netns is removed. This causes later this oops when thoses interfaces are
    removed.
    
    Let's add a handler to remove all interfaces related to a netns when this
    netns is removed.
    
    Fixes: f203b76 ("xfrm: Add virtual xfrm interfaces")
    Reported-by: Christophe Gouault <christophe.gouault@6wind.com>
    Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    NicolasDichtel authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    d9710d6 View commit details
    Browse the repository at this point in the history
  115. xfrm: fix a warning in xfrm_policy_insert_list

    commit ed17b8d upstream.
    
    This waring can be triggered simply by:
    
      # ip xfrm policy update src 192.168.1.1/24 dst 192.168.1.2/24 dir in \
        priority 1 mark 0 mask 0x10  #[1]
      # ip xfrm policy update src 192.168.1.1/24 dst 192.168.1.2/24 dir in \
        priority 2 mark 0 mask 0x1   #[2]
      # ip xfrm policy update src 192.168.1.1/24 dst 192.168.1.2/24 dir in \
        priority 2 mark 0 mask 0x10  #[3]
    
    Then dmesg shows:
    
      [ ] WARNING: CPU: 1 PID: 7265 at net/xfrm/xfrm_policy.c:1548
      [ ] RIP: 0010:xfrm_policy_insert_list+0x2f2/0x1030
      [ ] Call Trace:
      [ ]  xfrm_policy_inexact_insert+0x85/0xe50
      [ ]  xfrm_policy_insert+0x4ba/0x680
      [ ]  xfrm_add_policy+0x246/0x4d0
      [ ]  xfrm_user_rcv_msg+0x331/0x5c0
      [ ]  netlink_rcv_skb+0x121/0x350
      [ ]  xfrm_netlink_rcv+0x66/0x80
      [ ]  netlink_unicast+0x439/0x630
      [ ]  netlink_sendmsg+0x714/0xbf0
      [ ]  sock_sendmsg+0xe2/0x110
    
    The issue was introduced by Commit 7cb8a93 ("xfrm: Allow inserting
    policies with matching mark and different priorities"). After that, the
    policies [1] and [2] would be able to be added with different priorities.
    
    However, policy [3] will actually match both [1] and [2]. Policy [1]
    was matched due to the 1st 'return true' in xfrm_policy_mark_match(),
    and policy [2] was matched due to the 2nd 'return true' in there. It
    caused WARN_ON() in xfrm_policy_insert_list().
    
    This patch is to fix it by only (the same value and priority) as the
    same policy in xfrm_policy_mark_match().
    
    Thanks to Yuehaibing, we could make this fix better.
    
    v1->v2:
      - check policy->mark.v == pol->mark.v only without mask.
    
    Fixes: 7cb8a93 ("xfrm: Allow inserting policies with matching mark and different priorities")
    Reported-by: Xiumei Mu <xmu@redhat.com>
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    lxin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    2561358 View commit details
    Browse the repository at this point in the history
  116. xfrm: fix a NULL-ptr deref in xfrm_local_error

    commit f6a23d8 upstream.
    
    This patch is to fix a crash:
    
      [ ] kasan: GPF could be caused by NULL-ptr deref or user memory access
      [ ] general protection fault: 0000 [Freescale#1] SMP KASAN PTI
      [ ] RIP: 0010:ipv6_local_error+0xac/0x7a0
      [ ] Call Trace:
      [ ]  xfrm6_local_error+0x1eb/0x300
      [ ]  xfrm_local_error+0x95/0x130
      [ ]  __xfrm6_output+0x65f/0xb50
      [ ]  xfrm6_output+0x106/0x46f
      [ ]  udp_tunnel6_xmit_skb+0x618/0xbf0 [ip6_udp_tunnel]
      [ ]  vxlan_xmit_one+0xbc6/0x2c60 [vxlan]
      [ ]  vxlan_xmit+0x6a0/0x4276 [vxlan]
      [ ]  dev_hard_start_xmit+0x165/0x820
      [ ]  __dev_queue_xmit+0x1ff0/0x2b90
      [ ]  ip_finish_output2+0xd3e/0x1480
      [ ]  ip_do_fragment+0x182d/0x2210
      [ ]  ip_output+0x1d0/0x510
      [ ]  ip_send_skb+0x37/0xa0
      [ ]  raw_sendmsg+0x1b4c/0x2b80
      [ ]  sock_sendmsg+0xc0/0x110
    
    This occurred when sending a v4 skb over vxlan6 over ipsec, in which case
    skb->protocol == htons(ETH_P_IPV6) while skb->sk->sk_family == AF_INET in
    xfrm_local_error(). Then it will go to xfrm6_local_error() where it tries
    to get ipv6 info from a ipv4 sk.
    
    This issue was actually fixed by Commit 628e341 ("xfrm: make local
    error reporting more robust"), but brought back by Commit 844d487
    ("xfrm: choose protocol family by skb protocol").
    
    So to fix it, we should call xfrm6_local_error() only when skb->protocol
    is htons(ETH_P_IPV6) and skb->sk->sk_family is AF_INET6.
    
    Fixes: 844d487 ("xfrm: choose protocol family by skb protocol")
    Reported-by: Xiumei Mu <xmu@redhat.com>
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    lxin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    f5dc87e View commit details
    Browse the repository at this point in the history
  117. xfrm: fix error in comment

    commit 29e4276 upstream.
    
    s/xfrm_state_offload/xfrm_user_offload/
    
    Fixes: d77e38e ("xfrm: Add an IPsec hardware offloading API")
    Signed-off-by: Antony Antony <antony@phenome.org>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    antonyantony authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    0de9bed View commit details
    Browse the repository at this point in the history
  118. ip_vti: receive ipip packet by calling ip_tunnel_rcv

    commit 976eba8 upstream.
    
    In Commit dd9ee34 ("vti4: Fix a ipip packet processing bug in
    'IPCOMP' virtual tunnel"), it tries to receive IPIP packets in vti
    by calling xfrm_input(). This case happens when a small packet or
    frag sent by peer is too small to get compressed.
    
    However, xfrm_input() will still get to the IPCOMP path where skb
    sec_path is set, but never dropped while it should have been done
    in vti_ipcomp4_protocol.cb_handler(vti_rcv_cb), as it's not an
    ipcomp4 packet. This will cause that the packet can never pass
    xfrm4_policy_check() in the upper protocol rcv functions.
    
    So this patch is to call ip_tunnel_rcv() to process IPIP packets
    instead.
    
    Fixes: dd9ee34 ("vti4: Fix a ipip packet processing bug in 'IPCOMP' virtual tunnel")
    Reported-by: Xiumei Mu <xmu@redhat.com>
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    lxin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    26e28c1 View commit details
    Browse the repository at this point in the history
  119. netfilter: nft_reject_bridge: enable reject with bridge vlan

    commit e9c284e upstream.
    
    Currently, using the bridge reject target with tagged packets
    results in untagged packets being sent back.
    
    Fix this by mirroring the vlan id as well.
    
    Fixes: 85f5b30 ("netfilter: bridge: add reject support")
    Signed-off-by: Michael Braun <michael-dev@fami-braun.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    michael-dev authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    25f629a View commit details
    Browse the repository at this point in the history
  120. netfilter: ipset: Fix subcounter update skip

    commit a164b95 upstream.
    
    If IPSET_FLAG_SKIP_SUBCOUNTER_UPDATE is set, user requested to not
    update counters in sub sets. Therefore IPSET_FLAG_SKIP_COUNTER_UPDATE
    must be set, not unset.
    
    Fixes: 6e01781 ("netfilter: ipset: set match: add support to match the counters")
    Signed-off-by: Phil Sutter <phil@nwl.cc>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Phil Sutter authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    17021d1 View commit details
    Browse the repository at this point in the history
  121. netfilter: conntrack: make conntrack userspace helpers work again

    commit ee04805 upstream.
    
    Florian Westphal says:
    
    "Problem is that after the helper hook was merged back into the confirm
    one, the queueing itself occurs from the confirm hook, i.e. we queue
    from the last netfilter callback in the hook-list.
    
    Therefore, on return, the packet bypasses the confirm action and the
    connection is never committed to the main conntrack table.
    
    To fix this there are several ways:
    1. revert the 'Fixes' commit and have a extra helper hook again.
       Works, but has the drawback of adding another indirect call for
       everyone.
    
    2. Special case this: split the hooks only when userspace helper
       gets added, so queueing occurs at a lower priority again,
       and normal enqueue reinject would eventually call the last hook.
    
    3. Extend the existing nf_queue ct update hook to allow a forced
       confirmation (plus run the seqadj code).
    
    This goes for 3)."
    
    Fixes: 827318f ("netfilter: conntrack: remove helper hook again")
    Reviewed-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ummakynes authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    7140b62 View commit details
    Browse the repository at this point in the history
  122. netfilter: nfnetlink_cthelper: unbreak userspace helper support

    commit 703acd7 upstream.
    
    Restore helper data size initialization and fix memcopy of the helper
    data size.
    
    Fixes: 157ffff ("netfilter: nfnetlink_cthelper: reject too large userspace allocation requests")
    Reviewed-by: Florian Westphal <fw@strlen.de>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ummakynes authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    b16287f View commit details
    Browse the repository at this point in the history
  123. netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code

    commit 4c559f1 upstream.
    
    Dan Carpenter says: "Smatch complains that the value for "cmd" comes
    from the network and can't be trusted."
    
    Add pptp_msg_name() helper function that checks for the array boundary.
    
    Fixes: f09943f ("[NETFILTER]: nf_conntrack/nf_nat: add PPTP helper port")
    Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ummakynes authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    9f57771 View commit details
    Browse the repository at this point in the history
  124. esp6: get the right proto for transport mode in esp6_gso_encap

    commit 3c96ec5 upstream.
    
    For transport mode, when ipv6 nexthdr is set, the packet format might
    be like:
    
        ----------------------------------------------------
        |        | dest |     |     |      |  ESP    | ESP |
        | IP6 hdr| opts.| ESP | TCP | Data | Trailer | ICV |
        ----------------------------------------------------
    
    What it wants to get for x-proto in esp6_gso_encap() is the proto that
    will be set in ESP nexthdr. So it should skip all ipv6 nexthdrs and
    get the real transport protocol. Othersize, the wrong proto number
    will be set into ESP nexthdr.
    
    This patch is to skip all ipv6 nexthdrs by calling ipv6_skip_exthdr()
    in esp6_gso_encap().
    
    Fixes: 7862b40 ("esp: Add gso handlers for esp4 and esp6")
    Signed-off-by: Xin Long <lucien.xin@gmail.com>
    Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    lxin authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    dda9d0e View commit details
    Browse the repository at this point in the history
  125. bnxt_en: Fix accumulation of bp->net_stats_prev.

    commit b8056e8 upstream.
    
    We have logic to maintain network counters across resets by storing
    the counters in bp->net_stats_prev before reset.  But not all resets
    will clear the counters.  Certain resets that don't need to change
    the number of rings do not clear the counters.  The current logic
    accumulates the counters before all resets, causing big jumps in
    the counters after some resets, such as ethtool -G.
    
    Fix it by only accumulating the counters during reset if the irq_re_init
    parameter is set.  The parameter signifies that all rings and interrupts
    will be reset and that means that the counters will also be reset.
    
    Reported-by: Vijayendra Suman <vijayendra.suman@oracle.com>
    Fixes: b8875ca ("bnxt_en: Save ring statistics before reset.")
    Signed-off-by: Michael Chan <michael.chan@broadcom.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Michael Chan authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    2e91cd1 View commit details
    Browse the repository at this point in the history
  126. ieee80211: Fix incorrect mask for default PE duration

    commit d031781 upstream.
    
    Fixes bitmask for HE opration's default PE duration.
    
    Fixes: daa5b83 ("mac80211: update HE operation fields to D3.0")
    Signed-off-by: Pradeep Kumar Chitrapu <pradeepc@codeaurora.org>
    Link: https://lore.kernel.org/r/20200506102430.5153-1-pradeepc@codeaurora.org
    Signed-off-by: Johannes Berg <johannes.berg@intel.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Pradeep Kumar Chitrapu authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    73c0554 View commit details
    Browse the repository at this point in the history
  127. xsk: Add overflow check for u64 division, stored into u32

    commit b16a87d upstream.
    
    The npgs member of struct xdp_umem is an u32 entity, and stores the
    number of pages the UMEM consumes. The calculation of npgs
    
      npgs = size / PAGE_SIZE
    
    can overflow.
    
    To avoid overflow scenarios, the division is now first stored in a
    u64, and the result is verified to fit into 32b.
    
    An alternative would be storing the npgs as a u64, however, this
    wastes memory and is an unrealisticly large packet area.
    
    Fixes: c0c77d8 ("xsk: add user memory registration support sockopt")
    Reported-by: "Minh Bùi Quang" <minhquangbui99@gmail.com>
    Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Acked-by: Jonathan Lemon <jonathan.lemon@gmail.com>
    Link: https://lore.kernel.org/bpf/CACtPs=GGvV-_Yj6rbpzTVnopgi5nhMoCcTkSkYrJHGQHJWFZMQ@mail.gmail.com/
    Link: https://lore.kernel.org/bpf/20200525080400.13195-1-bjorn.topel@gmail.com
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Björn Töpel authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    1c38cfc View commit details
    Browse the repository at this point in the history
  128. qlcnic: fix missing release in qlcnic_83xx_interrupt_test.

    commit 15c9738 upstream.
    
    In function qlcnic_83xx_interrupt_test(), function
    qlcnic_83xx_diag_alloc_res() is not handled by function
    qlcnic_83xx_diag_free_res() after a call of the function
    qlcnic_alloc_mbx_args() failed. Fix this issue by adding
    a jump target "fail_mbx_args", and jump to this new target
    when qlcnic_alloc_mbx_args() failed.
    
    Fixes: b6b4316 ("qlcnic: Handle qlcnic_alloc_mbx_args() failure")
    Signed-off-by: Qiushi Wu <wu000273@umn.edu>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    QiushiWu authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    a369e83 View commit details
    Browse the repository at this point in the history
  129. crypto: chelsio/chtls: properly set tp->lsndtime

    commit a4976a3 upstream.
    
    TCP tp->lsndtime unit/base is tcp_jiffies32, not tcp_time_stamp()
    
    Fixes: 36bedb3 ("crypto: chtls - Inline TLS record Tx")
    Signed-off-by: Eric Dumazet <edumazet@google.com>
    Cc: Ayush Sawal <ayush.sawal@chelsio.com>
    Cc: Vinay Kumar Yadav <vinay.yadav@chelsio.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Eric Dumazet authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    2b043af View commit details
    Browse the repository at this point in the history
  130. nexthops: Move code from remove_nexthop_from_groups to remove_nh_grp_…

    …entry
    
    commit ac21753 upstream.
    
    Move nh_grp dereference and check for removing nexthop group due to
    all members gone into remove_nh_grp_entry.
    
    Fixes: 430a049 ("nexthop: Add support for nexthop groups")
    Signed-off-by: David Ahern <dsahern@gmail.com>
    Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    dsahern authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    8398275 View commit details
    Browse the repository at this point in the history
  131. nexthops: don't modify published nexthop groups

    commit 90f33bf upstream.
    
    We must avoid modifying published nexthop groups while they might be
    in use, otherwise we might see NULL ptr dereferences. In order to do
    that we allocate 2 nexthoup group structures upon nexthop creation
    and swap between them when we have to delete an entry. The reason is
    that we can't fail nexthop group removal, so we can't handle allocation
    failure thus we move the extra allocation on creation where we can
    safely fail and return ENOMEM.
    
    Fixes: 430a049 ("nexthop: Add support for nexthop groups")
    Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Signed-off-by: David Ahern <dsahern@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    Nikolay Aleksandrov authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    88e81db View commit details
    Browse the repository at this point in the history
  132. nexthop: Expand nexthop_is_multipath in a few places

    commit 0b5e2e3 upstream.
    
    I got too fancy consolidating checks on multipath type. The result
    is that path lookups can access 2 different nh_grp structs as exposed
    by Nik's torture tests. Expand nexthop_is_multipath within nexthop.h to
    avoid multiple, nh_grp dereferences and make decisions based on the
    consistent struct.
    
    Only 2 places left using nexthop_is_multipath are within IPv6, both
    only check that the nexthop is a multipath for a branching decision
    which are acceptable.
    
    Fixes: 430a049 ("nexthop: Add support for nexthop groups")
    Signed-off-by: David Ahern <dsahern@gmail.com>
    Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    dsahern authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    568c159 View commit details
    Browse the repository at this point in the history
  133. ipv4: nexthop version of fib_info_nh_uses_dev

    commit 1fd1c76 upstream.
    
    Similar to the last path, need to fix fib_info_nh_uses_dev for
    external nexthops to avoid referencing multiple nh_grp structs.
    Move the device check in fib_info_nh_uses_dev to a helper and
    create a nexthop version that is called if the fib_info uses an
    external nexthop.
    
    Fixes: 430a049 ("nexthop: Add support for nexthop groups")
    Signed-off-by: David Ahern <dsahern@gmail.com>
    Acked-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    dsahern authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    35c0a6e View commit details
    Browse the repository at this point in the history
  134. net: dsa: declare lockless TX feature for slave ports

    commit 2b86cb8 upstream.
    
    Be there a platform with the following layout:
    
          Regular NIC
           |
           +----> DSA master for switch port
                   |
                   +----> DSA master for another switch port
    
    After changing DSA back to static lockdep class keys in commit
    1a33e10 ("net: partially revert dynamic lockdep key changes"), this
    kernel splat can be seen:
    
    [   13.361198] ============================================
    [   13.366524] WARNING: possible recursive locking detected
    [   13.371851] 5.7.0-rc4-02121-gc32a05ecd7af-dirty #988 Not tainted
    [   13.377874] --------------------------------------------
    [   13.383201] swapper/0/0 is trying to acquire lock:
    [   13.388004] ffff0000668ff298 (&dsa_slave_netdev_xmit_lock_key){+.-.}-{2:2}, at: __dev_queue_xmit+0x84c/0xbe0
    [   13.397879]
    [   13.397879] but task is already holding lock:
    [   13.403727] ffff0000661a1698 (&dsa_slave_netdev_xmit_lock_key){+.-.}-{2:2}, at: __dev_queue_xmit+0x84c/0xbe0
    [   13.413593]
    [   13.413593] other info that might help us debug this:
    [   13.420140]  Possible unsafe locking scenario:
    [   13.420140]
    [   13.426075]        CPU0
    [   13.428523]        ----
    [   13.430969]   lock(&dsa_slave_netdev_xmit_lock_key);
    [   13.435946]   lock(&dsa_slave_netdev_xmit_lock_key);
    [   13.440924]
    [   13.440924]  *** DEADLOCK ***
    [   13.440924]
    [   13.446860]  May be due to missing lock nesting notation
    [   13.446860]
    [   13.453668] 6 locks held by swapper/0/0:
    [   13.457598]  #0: ffff800010003de0 ((&idev->mc_ifc_timer)){+.-.}-{0:0}, at: call_timer_fn+0x0/0x400
    [   13.466593]  Freescale#1: ffffd4d3fb478700 (rcu_read_lock){....}-{1:2}, at: mld_sendpack+0x0/0x560
    [   13.474803]  Freescale#2: ffffd4d3fb478728 (rcu_read_lock_bh){....}-{1:2}, at: ip6_finish_output2+0x64/0xb10
    [   13.483886]  Freescale#3: ffffd4d3fb478728 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x6c/0xbe0
    [   13.492793]  Freescale#4: ffff0000661a1698 (&dsa_slave_netdev_xmit_lock_key){+.-.}-{2:2}, at: __dev_queue_xmit+0x84c/0xbe0
    [   13.503094]  Freescale#5: ffffd4d3fb478728 (rcu_read_lock_bh){....}-{1:2}, at: __dev_queue_xmit+0x6c/0xbe0
    [   13.512000]
    [   13.512000] stack backtrace:
    [   13.516369] CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.7.0-rc4-02121-gc32a05ecd7af-dirty #988
    [   13.530421] Call trace:
    [   13.532871]  dump_backtrace+0x0/0x1d8
    [   13.536539]  show_stack+0x24/0x30
    [   13.539862]  dump_stack+0xe8/0x150
    [   13.543271]  __lock_acquire+0x1030/0x1678
    [   13.547290]  lock_acquire+0xf8/0x458
    [   13.550873]  _raw_spin_lock+0x44/0x58
    [   13.554543]  __dev_queue_xmit+0x84c/0xbe0
    [   13.558562]  dev_queue_xmit+0x24/0x30
    [   13.562232]  dsa_slave_xmit+0xe0/0x128
    [   13.565988]  dev_hard_start_xmit+0xf4/0x448
    [   13.570182]  __dev_queue_xmit+0x808/0xbe0
    [   13.574200]  dev_queue_xmit+0x24/0x30
    [   13.577869]  neigh_resolve_output+0x15c/0x220
    [   13.582237]  ip6_finish_output2+0x244/0xb10
    [   13.586430]  __ip6_finish_output+0x1dc/0x298
    [   13.590709]  ip6_output+0x84/0x358
    [   13.594116]  mld_sendpack+0x2bc/0x560
    [   13.597786]  mld_ifc_timer_expire+0x210/0x390
    [   13.602153]  call_timer_fn+0xcc/0x400
    [   13.605822]  run_timer_softirq+0x588/0x6e0
    [   13.609927]  __do_softirq+0x118/0x590
    [   13.613597]  irq_exit+0x13c/0x148
    [   13.616918]  __handle_domain_irq+0x6c/0xc0
    [   13.621023]  gic_handle_irq+0x6c/0x160
    [   13.624779]  el1_irq+0xbc/0x180
    [   13.627927]  cpuidle_enter_state+0xb4/0x4d0
    [   13.632120]  cpuidle_enter+0x3c/0x50
    [   13.635703]  call_cpuidle+0x44/0x78
    [   13.639199]  do_idle+0x228/0x2c8
    [   13.642433]  cpu_startup_entry+0x2c/0x48
    [   13.646363]  rest_init+0x1ac/0x280
    [   13.649773]  arch_call_rest_init+0x14/0x1c
    [   13.653878]  start_kernel+0x490/0x4bc
    
    Lockdep keys themselves were added in commit ab92d68 ("net: core:
    add generic lockdep keys"), and it's very likely that this splat existed
    since then, but I have no real way to check, since this stacked platform
    wasn't supported by mainline back then.
    
    >From Taehee's own words:
    
      This patch was considered that all stackable devices have LLTX flag.
      But the dsa doesn't have LLTX, so this splat happened.
      After this patch, dsa shares the same lockdep class key.
      On the nested dsa interface architecture, which you illustrated,
      the same lockdep class key will be used in __dev_queue_xmit() because
      dsa doesn't have LLTX.
      So that lockdep detects deadlock because the same lockdep class key is
      used recursively although actually the different locks are used.
      There are some ways to fix this problem.
    
      1. using NETIF_F_LLTX flag.
      If possible, using the LLTX flag is a very clear way for it.
      But I'm so sorry I don't know whether the dsa could have LLTX or not.
    
      2. using dynamic lockdep again.
      It means that each interface uses a separate lockdep class key.
      So, lockdep will not detect recursive locking.
      But this way has a problem that it could consume lockdep class key
      too many.
      Currently, lockdep can have 8192 lockdep class keys.
       - you can see this number with the following command.
         cat /proc/lockdep_stats
         lock-classes:                         1251 [max: 8192]
         ...
         The [max: 8192] means that the maximum number of lockdep class keys.
      If too many lockdep class keys are registered, lockdep stops to work.
      So, using a dynamic(separated) lockdep class key should be considered
      carefully.
      In addition, updating lockdep class key routine might have to be existing.
      (lockdep_register_key(), lockdep_set_class(), lockdep_unregister_key())
    
      3. Using lockdep subclass.
      A lockdep class key could have 8 subclasses.
      The different subclass is considered different locks by lockdep
      infrastructure.
      But "lock-classes" is not counted by subclasses.
      So, it could avoid stopping lockdep infrastructure by an overflow of
      lockdep class keys.
      This approach should also have an updating lockdep class key routine.
      (lockdep_set_subclass())
    
      4. Using nonvalidate lockdep class key.
      The lockdep infrastructure supports nonvalidate lockdep class key type.
      It means this lockdep is not validated by lockdep infrastructure.
      So, the splat will not happen but lockdep couldn't detect real deadlock
      case because lockdep really doesn't validate it.
      I think this should be used for really special cases.
      (lockdep_set_novalidate_class())
    
    Further discussion here:
    https://patchwork.ozlabs.org/project/netdev/patch/20200503052220.4536-2-xiyou.wangcong@gmail.com/
    
    There appears to be no negative side-effect to declaring lockless TX for
    the DSA virtual interfaces, which means they handle their own locking.
    So that's what we do to make the splat go away.
    
    Patch tested in a wide variety of cases: unicast, multicast, PTP, etc.
    
    Fixes: ab92d68 ("net: core: add generic lockdep keys")
    Suggested-by: Taehee Yoo <ap420073@gmail.com>
    Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
    Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    vladimiroltean authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    b668b39 View commit details
    Browse the repository at this point in the history
  135. bonding: Fix reference count leak in bond_sysfs_slave_add.

    commit a068aab upstream.
    
    kobject_init_and_add() takes reference even when it fails.
    If this function returns an error, kobject_put() must be called to
    properly clean up the memory associated with the object. Previous
    commit "b8eb718348b8" fixed a similar problem.
    
    Fixes: 07699f9 ("bonding: add sysfs /slave dir for bond slave devices.")
    Signed-off-by: Qiushi Wu <wu000273@umn.edu>
    Acked-by: Jay Vosburgh <jay.vosburgh@canonical.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    QiushiWu authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    a4547f6 View commit details
    Browse the repository at this point in the history
  136. netfilter: conntrack: comparison of unsigned in cthelper confirmation

    commit 94945ad upstream.
    
    net/netfilter/nf_conntrack_core.c: In function nf_confirm_cthelper:
    net/netfilter/nf_conntrack_core.c:2117:15: warning: comparison of unsigned expression in < 0 is always false [-Wtype-limits]
     2117 |   if (protoff < 0 || (frag_off & htons(~0x7)) != 0)
          |               ^
    
    ipv6_skip_exthdr() returns a signed integer.
    
    Reported-by: Colin Ian King <colin.king@canonical.com>
    Fixes: 703acd7 ("netfilter: nfnetlink_cthelper: unbreak userspace helper support")
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ummakynes authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    987de40 View commit details
    Browse the repository at this point in the history
  137. netfilter: conntrack: Pass value of ctinfo to __nf_conntrack_update

    commit 46c1e06 upstream.
    
    Clang warns:
    
    net/netfilter/nf_conntrack_core.c:2068:21: warning: variable 'ctinfo' is
    uninitialized when used here [-Wuninitialized]
            nf_ct_set(skb, ct, ctinfo);
                               ^~~~~~
    net/netfilter/nf_conntrack_core.c:2024:2: note: variable 'ctinfo' is
    declared here
            enum ip_conntrack_info ctinfo;
            ^
    1 warning generated.
    
    nf_conntrack_update was split up into nf_conntrack_update and
    __nf_conntrack_update, where the assignment of ctinfo is in
    nf_conntrack_update but it is used in __nf_conntrack_update.
    
    Pass the value of ctinfo from nf_conntrack_update to
    __nf_conntrack_update so that uninitialized memory is not used
    and everything works properly.
    
    Fixes: ee04805 ("netfilter: conntrack: make conntrack userspace helpers work again")
    Link: ClangBuiltLinux#1039
    Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    nathanchance authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    7a07539 View commit details
    Browse the repository at this point in the history
  138. netfilter: nf_conntrack_pptp: fix compilation warning with W=1 build

    commit 4946ea5 upstream.
    
    >> include/linux/netfilter/nf_conntrack_pptp.h:13:20: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
    extern const char *const pptp_msg_name(u_int16_t msg);
    ^~~~~~
    
    Reported-by: kbuild test robot <lkp@intel.com>
    Fixes: 4c559f1 ("netfilter: nf_conntrack_pptp: prevent buffer overflows in debug code")
    Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    ummakynes authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    3f57fa8 View commit details
    Browse the repository at this point in the history
  139. perf: Make perf able to build with latest libbfd

    commit 0ada120 upstream.
    
    libbfd has changed the bfd_section_* macros to inline functions
    bfd_section_<field> since 2019-09-18. See below two commits:
      o http://www.sourceware.org/ml/gdb-cvs/2019-09/msg00064.html
      o https://www.sourceware.org/ml/gdb-cvs/2019-09/msg00072.html
    
    This fix make perf able to build with both old and new libbfd.
    
    Signed-off-by: Changbin Du <changbin.du@gmail.com>
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Link: http://lore.kernel.org/lkml/20200128152938.31413-1-changbin.du@gmail.com
    Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
    Cc: Marek Vasut <marex@denx.de>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
    changbindu authored and gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    f2a9b00 View commit details
    Browse the repository at this point in the history
  140. Linux 5.4.44

    gregkh committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    55852b3 View commit details
    Browse the repository at this point in the history
  141. Merge tag 'v5.4.44' into 5.4.x+fslc

    This is the 5.4.44 stable release
    
    Signed-off-by: Andrey Zhizhikin <andrey.zhizhikin@leica-geosystems.com>
    zandrey committed Jun 3, 2020
    Configuration menu
    Copy the full SHA
    c0219b7 View commit details
    Browse the repository at this point in the history