]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Sep 2021 12:38:13 +0000 (14:38 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 8 Sep 2021 12:38:13 +0000 (14:38 +0200)
added patches:
crypto-talitos-reduce-max-key-size-for-sec1.patch
gfs2-don-t-clear-sgid-when-inheriting-acls.patch
ipv4-icmp-l3mdev-perform-icmp-error-route-lookup-on-source-device-routing-table-v2.patch
mm-kmemleak.c-make-cond_resched-rate-limiting-more-efficient.patch
mm-page_alloc-speed-up-the-iteration-of-max_order.patch
net-ll_temac-remove-left-over-debug-message.patch
net-sched-cls_flower-use-mask-for-addr_type.patch
nvme-pci-fix-an-error-handling-path-in-nvme_probe.patch
pm-wakeirq-enable-dedicated-wakeirq-for-suspend.patch
powerpc-boot-delete-unneeded-.globl-_zimage_start.patch
powerpc-module64-fix-comment-in-r_ppc64_entry-handling.patch
s390-disassembler-correct-disassembly-lines-alignment.patch
tc358743-fix-register-i2c_rd-wr-function-fix.patch
usb-phy-isp1301-fix-build-warning-when-config_of-is-disabled.patch
usb-serial-mos7720-improve-oom-handling-in-read_mos_reg.patch

16 files changed:
queue-4.9/crypto-talitos-reduce-max-key-size-for-sec1.patch [new file with mode: 0644]
queue-4.9/gfs2-don-t-clear-sgid-when-inheriting-acls.patch [new file with mode: 0644]
queue-4.9/ipv4-icmp-l3mdev-perform-icmp-error-route-lookup-on-source-device-routing-table-v2.patch [new file with mode: 0644]
queue-4.9/mm-kmemleak.c-make-cond_resched-rate-limiting-more-efficient.patch [new file with mode: 0644]
queue-4.9/mm-page_alloc-speed-up-the-iteration-of-max_order.patch [new file with mode: 0644]
queue-4.9/net-ll_temac-remove-left-over-debug-message.patch [new file with mode: 0644]
queue-4.9/net-sched-cls_flower-use-mask-for-addr_type.patch [new file with mode: 0644]
queue-4.9/nvme-pci-fix-an-error-handling-path-in-nvme_probe.patch [new file with mode: 0644]
queue-4.9/pm-wakeirq-enable-dedicated-wakeirq-for-suspend.patch [new file with mode: 0644]
queue-4.9/powerpc-boot-delete-unneeded-.globl-_zimage_start.patch [new file with mode: 0644]
queue-4.9/powerpc-module64-fix-comment-in-r_ppc64_entry-handling.patch [new file with mode: 0644]
queue-4.9/s390-disassembler-correct-disassembly-lines-alignment.patch [new file with mode: 0644]
queue-4.9/series
queue-4.9/tc358743-fix-register-i2c_rd-wr-function-fix.patch [new file with mode: 0644]
queue-4.9/usb-phy-isp1301-fix-build-warning-when-config_of-is-disabled.patch [new file with mode: 0644]
queue-4.9/usb-serial-mos7720-improve-oom-handling-in-read_mos_reg.patch [new file with mode: 0644]

diff --git a/queue-4.9/crypto-talitos-reduce-max-key-size-for-sec1.patch b/queue-4.9/crypto-talitos-reduce-max-key-size-for-sec1.patch
new file mode 100644 (file)
index 0000000..47b38ec
--- /dev/null
@@ -0,0 +1,37 @@
+From b8fbdc2bc4e71b62646031d5df5f08aafe15d5ad Mon Sep 17 00:00:00 2001
+From: Christophe Leroy <christophe.leroy@c-s.fr>
+Date: Tue, 21 May 2019 13:34:09 +0000
+Subject: crypto: talitos - reduce max key size for SEC1
+
+From: Christophe Leroy <christophe.leroy@c-s.fr>
+
+commit b8fbdc2bc4e71b62646031d5df5f08aafe15d5ad upstream.
+
+SEC1 doesn't support SHA384/512, so it doesn't require
+longer keys.
+
+This patch reduces the max key size when the driver
+is built for SEC1 only.
+
+Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr>
+Fixes: 03d2c5114c95 ("crypto: talitos - Extend max key length for SHA384/512-HMAC and AEAD")
+Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/crypto/talitos.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/crypto/talitos.c
++++ b/drivers/crypto/talitos.c
+@@ -816,7 +816,11 @@ static void talitos_unregister_rng(struc
+  * HMAC_SNOOP_NO_AFEA (HSNA) instead of type IPSEC_ESP
+  */
+ #define TALITOS_CRA_PRIORITY_AEAD_HSNA        (TALITOS_CRA_PRIORITY - 1)
++#ifdef CONFIG_CRYPTO_DEV_TALITOS_SEC2
+ #define TALITOS_MAX_KEY_SIZE          (AES_MAX_KEY_SIZE + SHA512_BLOCK_SIZE)
++#else
++#define TALITOS_MAX_KEY_SIZE          (AES_MAX_KEY_SIZE + SHA256_BLOCK_SIZE)
++#endif
+ #define TALITOS_MAX_IV_LENGTH         16 /* max of AES_BLOCK_SIZE, DES3_EDE_BLOCK_SIZE */
+ struct talitos_ctx {
diff --git a/queue-4.9/gfs2-don-t-clear-sgid-when-inheriting-acls.patch b/queue-4.9/gfs2-don-t-clear-sgid-when-inheriting-acls.patch
new file mode 100644 (file)
index 0000000..32063a9
--- /dev/null
@@ -0,0 +1,80 @@
+From 914cea93dd89f00b41c1d8ff93f17be47356a36a Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Wed, 19 Jul 2017 10:56:42 -0500
+Subject: gfs2: Don't clear SGID when inheriting ACLs
+
+From: Jan Kara <jack@suse.cz>
+
+commit 914cea93dd89f00b41c1d8ff93f17be47356a36a upstream.
+
+When new directory 'DIR1' is created in a directory 'DIR0' with SGID bit
+set, DIR1 is expected to have SGID bit set (and owning group equal to
+the owning group of 'DIR0'). However when 'DIR0' also has some default
+ACLs that 'DIR1' inherits, setting these ACLs will result in SGID bit on
+'DIR1' to get cleared if user is not member of the owning group.
+
+Fix the problem by moving posix_acl_update_mode() out of
+__gfs2_set_acl() into gfs2_set_acl(). That way the function will not be
+called when inheriting ACLs which is what we want as it prevents SGID
+bit clearing and the mode has been properly set by posix_acl_create()
+anyway.
+
+Fixes: 073931017b49d9458aa351605b43a7e34598caef
+Signed-off-by: Jan Kara <jack@suse.cz>
+Signed-off-by: Bob Peterson <rpeterso@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/gfs2/acl.c |   27 ++++++++++++++-------------
+ 1 file changed, 14 insertions(+), 13 deletions(-)
+
+--- a/fs/gfs2/acl.c
++++ b/fs/gfs2/acl.c
+@@ -86,19 +86,6 @@ int __gfs2_set_acl(struct inode *inode,
+       char *data;
+       const char *name = gfs2_acl_name(type);
+-      if (acl && acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode)))
+-              return -E2BIG;
+-
+-      if (type == ACL_TYPE_ACCESS) {
+-              umode_t mode = inode->i_mode;
+-
+-              error = posix_acl_update_mode(inode, &inode->i_mode, &acl);
+-              if (error)
+-                      return error;
+-              if (mode != inode->i_mode)
+-                      mark_inode_dirty(inode);
+-      }
+-
+       if (acl) {
+               len = posix_acl_to_xattr(&init_user_ns, acl, NULL, 0);
+               if (len == 0)
+@@ -130,6 +117,9 @@ int gfs2_set_acl(struct inode *inode, st
+       bool need_unlock = false;
+       int ret;
++      if (acl && acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode)))
++              return -E2BIG;
++
+       ret = gfs2_rsqa_alloc(ip);
+       if (ret)
+               return ret;
+@@ -140,7 +130,18 @@ int gfs2_set_acl(struct inode *inode, st
+                       return ret;
+               need_unlock = true;
+       }
++      if (type == ACL_TYPE_ACCESS && acl) {
++              umode_t mode = inode->i_mode;
++
++              ret = posix_acl_update_mode(inode, &inode->i_mode, &acl);
++              if (ret)
++                      goto unlock;
++              if (mode != inode->i_mode)
++                      mark_inode_dirty(inode);
++      }
++
+       ret = __gfs2_set_acl(inode, acl, type);
++unlock:
+       if (need_unlock)
+               gfs2_glock_dq_uninit(&gh);
+       return ret;
diff --git a/queue-4.9/ipv4-icmp-l3mdev-perform-icmp-error-route-lookup-on-source-device-routing-table-v2.patch b/queue-4.9/ipv4-icmp-l3mdev-perform-icmp-error-route-lookup-on-source-device-routing-table-v2.patch
new file mode 100644 (file)
index 0000000..8d3c526
--- /dev/null
@@ -0,0 +1,118 @@
+From e1e84eb58eb494b77c8389fc6308b5042dcce791 Mon Sep 17 00:00:00 2001
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Date: Mon, 12 Oct 2020 10:50:14 -0400
+Subject: ipv4/icmp: l3mdev: Perform icmp error route lookup on source device routing table (v2)
+
+From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+
+commit e1e84eb58eb494b77c8389fc6308b5042dcce791 upstream.
+
+As per RFC792, ICMP errors should be sent to the source host.
+
+However, in configurations with Virtual Routing and Forwarding tables,
+looking up which routing table to use is currently done by using the
+destination net_device.
+
+commit 9d1a6c4ea43e ("net: icmp_route_lookup should use rt dev to
+determine L3 domain") changes the interface passed to
+l3mdev_master_ifindex() and inet_addr_type_dev_table() from skb_in->dev
+to skb_dst(skb_in)->dev. This effectively uses the destination device
+rather than the source device for choosing which routing table should be
+used to lookup where to send the ICMP error.
+
+Therefore, if the source and destination interfaces are within separate
+VRFs, or one in the global routing table and the other in a VRF, looking
+up the source host in the destination interface's routing table will
+fail if the destination interface's routing table contains no route to
+the source host.
+
+One observable effect of this issue is that traceroute does not work in
+the following cases:
+
+- Route leaking between global routing table and VRF
+- Route leaking between VRFs
+
+Preferably use the source device routing table when sending ICMP error
+messages. If no source device is set, fall-back on the destination
+device routing table. Else, use the main routing table (index 0).
+
+[ It has been pointed out that a similar issue may exist with ICMP
+  errors triggered when forwarding between network namespaces. It would
+  be worthwhile to investigate, but is outside of the scope of this
+  investigation. ]
+
+[ It has also been pointed out that a similar issue exists with
+  unreachable / fragmentation needed messages, which can be triggered by
+  changing the MTU of eth1 in r1 to 1400 and running:
+
+  ip netns exec h1 ping -s 1450 -Mdo -c1 172.16.2.2
+
+  Some investigation points to raw_icmp_error() and raw_err() as being
+  involved in this last scenario. The focus of this patch is TTL expired
+  ICMP messages, which go through icmp_route_lookup.
+  Investigation of failure modes related to raw_icmp_error() is beyond
+  this investigation's scope. ]
+
+Fixes: 9d1a6c4ea43e ("net: icmp_route_lookup should use rt dev to determine L3 domain")
+Link: https://tools.ietf.org/html/rfc792
+Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
+Reviewed-by: David Ahern <dsahern@gmail.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/ipv4/icmp.c |   23 +++++++++++++++++++++--
+ 1 file changed, 21 insertions(+), 2 deletions(-)
+
+--- a/net/ipv4/icmp.c
++++ b/net/ipv4/icmp.c
+@@ -460,6 +460,23 @@ static int icmp_multipath_hash_skb(const
+ #endif
++/*
++ * The device used for looking up which routing table to use for sending an ICMP
++ * error is preferably the source whenever it is set, which should ensure the
++ * icmp error can be sent to the source host, else lookup using the routing
++ * table of the destination device, else use the main routing table (index 0).
++ */
++static struct net_device *icmp_get_route_lookup_dev(struct sk_buff *skb)
++{
++      struct net_device *route_lookup_dev = NULL;
++
++      if (skb->dev)
++              route_lookup_dev = skb->dev;
++      else if (skb_dst(skb))
++              route_lookup_dev = skb_dst(skb)->dev;
++      return route_lookup_dev;
++}
++
+ static struct rtable *icmp_route_lookup(struct net *net,
+                                       struct flowi4 *fl4,
+                                       struct sk_buff *skb_in,
+@@ -468,6 +485,7 @@ static struct rtable *icmp_route_lookup(
+                                       int type, int code,
+                                       struct icmp_bxm *param)
+ {
++      struct net_device *route_lookup_dev;
+       struct rtable *rt, *rt2;
+       struct flowi4 fl4_dec;
+       int err;
+@@ -481,7 +499,8 @@ static struct rtable *icmp_route_lookup(
+       fl4->flowi4_proto = IPPROTO_ICMP;
+       fl4->fl4_icmp_type = type;
+       fl4->fl4_icmp_code = code;
+-      fl4->flowi4_oif = l3mdev_master_ifindex(skb_dst(skb_in)->dev);
++      route_lookup_dev = icmp_get_route_lookup_dev(skb_in);
++      fl4->flowi4_oif = l3mdev_master_ifindex(route_lookup_dev);
+       security_skb_classify_flow(skb_in, flowi4_to_flowi(fl4));
+       rt = __ip_route_output_key_hash(net, fl4,
+@@ -506,7 +525,7 @@ static struct rtable *icmp_route_lookup(
+       if (err)
+               goto relookup_failed;
+-      if (inet_addr_type_dev_table(net, skb_dst(skb_in)->dev,
++      if (inet_addr_type_dev_table(net, route_lookup_dev,
+                                    fl4_dec.saddr) == RTN_LOCAL) {
+               rt2 = __ip_route_output_key(net, &fl4_dec);
+               if (IS_ERR(rt2))
diff --git a/queue-4.9/mm-kmemleak.c-make-cond_resched-rate-limiting-more-efficient.patch b/queue-4.9/mm-kmemleak.c-make-cond_resched-rate-limiting-more-efficient.patch
new file mode 100644 (file)
index 0000000..268274a
--- /dev/null
@@ -0,0 +1,37 @@
+From 13ab183d138f607d885e995d625e58d47678bf97 Mon Sep 17 00:00:00 2001
+From: Andrew Morton <akpm@linux-foundation.org>
+Date: Thu, 14 Dec 2017 15:32:31 -0800
+Subject: mm/kmemleak.c: make cond_resched() rate-limiting more efficient
+
+From: Andrew Morton <akpm@linux-foundation.org>
+
+commit 13ab183d138f607d885e995d625e58d47678bf97 upstream.
+
+Commit bde5f6bc68db ("kmemleak: add scheduling point to
+kmemleak_scan()") tries to rate-limit the frequency of cond_resched()
+calls, but does it in a way which might incur an expensive division
+operation in the inner loop.  Simplify this.
+
+Fixes: bde5f6bc68db5 ("kmemleak: add scheduling point to kmemleak_scan()")
+Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
+Cc: Yisheng Xie <xieyisheng1@huawei.com>
+Cc: Catalin Marinas <catalin.marinas@arm.com>
+Cc: Michal Hocko <mhocko@kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/kmemleak.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/mm/kmemleak.c
++++ b/mm/kmemleak.c
+@@ -1442,7 +1442,7 @@ static void kmemleak_scan(void)
+                       if (page_count(page) == 0)
+                               continue;
+                       scan_block(page, page + 1, NULL);
+-                      if (!(pfn % (MAX_SCAN_SIZE / sizeof(*page))))
++                      if (!(pfn & 63))
+                               cond_resched();
+               }
+       }
diff --git a/queue-4.9/mm-page_alloc-speed-up-the-iteration-of-max_order.patch b/queue-4.9/mm-page_alloc-speed-up-the-iteration-of-max_order.patch
new file mode 100644 (file)
index 0000000..212c7d4
--- /dev/null
@@ -0,0 +1,73 @@
+From 7ad69832f37e3cea8557db6df7c793905f1135e8 Mon Sep 17 00:00:00 2001
+From: Muchun Song <songmuchun@bytedance.com>
+Date: Mon, 14 Dec 2020 19:11:25 -0800
+Subject: mm/page_alloc: speed up the iteration of max_order
+
+From: Muchun Song <songmuchun@bytedance.com>
+
+commit 7ad69832f37e3cea8557db6df7c793905f1135e8 upstream.
+
+When we free a page whose order is very close to MAX_ORDER and greater
+than pageblock_order, it wastes some CPU cycles to increase max_order to
+MAX_ORDER one by one and check the pageblock migratetype of that page
+repeatedly especially when MAX_ORDER is much larger than pageblock_order.
+
+We also should not be checking migratetype of buddy when "order ==
+MAX_ORDER - 1" as the buddy pfn may be invalid, so adjust the condition.
+With the new check, we don't need the max_order check anymore, so we
+replace it.
+
+Also adjust max_order initialization so that it's lower by one than
+previously, which makes the code hopefully more clear.
+
+Link: https://lkml.kernel.org/r/20201204155109.55451-1-songmuchun@bytedance.com
+Fixes: d9dddbf55667 ("mm/page_alloc: prevent merging between isolated and other pageblocks")
+Signed-off-by: Muchun Song <songmuchun@bytedance.com>
+Acked-by: Vlastimil Babka <vbabka@suse.cz>
+Reviewed-by: Oscar Salvador <osalvador@suse.de>
+Reviewed-by: David Hildenbrand <david@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ mm/page_alloc.c |    8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/mm/page_alloc.c
++++ b/mm/page_alloc.c
+@@ -814,7 +814,7 @@ static inline void __free_one_page(struc
+       struct page *buddy;
+       unsigned int max_order;
+-      max_order = min_t(unsigned int, MAX_ORDER, pageblock_order + 1);
++      max_order = min_t(unsigned int, MAX_ORDER - 1, pageblock_order);
+       VM_BUG_ON(!zone_is_initialized(zone));
+       VM_BUG_ON_PAGE(page->flags & PAGE_FLAGS_CHECK_AT_PREP, page);
+@@ -829,7 +829,7 @@ static inline void __free_one_page(struc
+       VM_BUG_ON_PAGE(bad_range(zone, page), page);
+ continue_merging:
+-      while (order < max_order - 1) {
++      while (order < max_order) {
+               buddy_idx = __find_buddy_index(page_idx, order);
+               buddy = page + (buddy_idx - page_idx);
+               if (!page_is_buddy(page, buddy, order))
+@@ -850,7 +850,7 @@ continue_merging:
+               page_idx = combined_idx;
+               order++;
+       }
+-      if (max_order < MAX_ORDER) {
++      if (order < MAX_ORDER - 1) {
+               /* If we are here, it means order is >= pageblock_order.
+                * We want to prevent merge between freepages on isolate
+                * pageblock and normal pageblock. Without this, pageblock
+@@ -871,7 +871,7 @@ continue_merging:
+                                               is_migrate_isolate(buddy_mt)))
+                               goto done_merging;
+               }
+-              max_order++;
++              max_order = order + 1;
+               goto continue_merging;
+       }
diff --git a/queue-4.9/net-ll_temac-remove-left-over-debug-message.patch b/queue-4.9/net-ll_temac-remove-left-over-debug-message.patch
new file mode 100644 (file)
index 0000000..df2b3cf
--- /dev/null
@@ -0,0 +1,31 @@
+From ce03b94ba682a67e8233c9ee3066071656ded58f Mon Sep 17 00:00:00 2001
+From: Esben Haabendal <esben@geanix.com>
+Date: Mon, 21 Jun 2021 10:20:08 +0200
+Subject: net: ll_temac: Remove left-over debug message
+
+From: Esben Haabendal <esben@geanix.com>
+
+commit ce03b94ba682a67e8233c9ee3066071656ded58f upstream.
+
+Fixes: f63963411942 ("net: ll_temac: Avoid ndo_start_xmit returning NETDEV_TX_BUSY")
+Signed-off-by: Esben Haabendal <esben@geanix.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/xilinx/ll_temac_main.c |    4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/net/ethernet/xilinx/ll_temac_main.c
++++ b/drivers/net/ethernet/xilinx/ll_temac_main.c
+@@ -735,10 +735,8 @@ temac_start_xmit(struct sk_buff *skb, st
+       /* Kick off the transfer */
+       lp->dma_out(lp, TX_TAILDESC_PTR, tail_p); /* DMA start */
+-      if (temac_check_tx_bd_space(lp, MAX_SKB_FRAGS + 1)) {
+-              netdev_info(ndev, "%s -> netif_stop_queue\n", __func__);
++      if (temac_check_tx_bd_space(lp, MAX_SKB_FRAGS + 1))
+               netif_stop_queue(ndev);
+-      }
+       return NETDEV_TX_OK;
+ }
diff --git a/queue-4.9/net-sched-cls_flower-use-mask-for-addr_type.patch b/queue-4.9/net-sched-cls_flower-use-mask-for-addr_type.patch
new file mode 100644 (file)
index 0000000..736576b
--- /dev/null
@@ -0,0 +1,56 @@
+From 970bfcd09791282de7de6589bfe440eb11e2efd2 Mon Sep 17 00:00:00 2001
+From: Paul Blakey <paulb@mellanox.com>
+Date: Wed, 14 Dec 2016 19:00:57 +0200
+Subject: net/sched: cls_flower: Use mask for addr_type
+
+From: Paul Blakey <paulb@mellanox.com>
+
+commit 970bfcd09791282de7de6589bfe440eb11e2efd2 upstream.
+
+When addr_type is set, mask should also be set.
+
+Fixes: 66530bdf85eb ('sched,cls_flower: set key address type when present')
+Fixes: bc3103f1ed40 ('net/sched: cls_flower: Classify packet in ip tunnels')
+Signed-off-by: Paul Blakey <paulb@mellanox.com>
+Reviewed-by: Roi Dayan <roid@mellanox.com>
+Acked-by: Jiri Pirko <jiri@mellanox.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/sched/cls_flower.c |    4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/net/sched/cls_flower.c
++++ b/net/sched/cls_flower.c
+@@ -445,6 +445,7 @@ static int fl_set_key(struct net *net, s
+       if (tb[TCA_FLOWER_KEY_IPV4_SRC] || tb[TCA_FLOWER_KEY_IPV4_DST]) {
+               key->control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
++              mask->control.addr_type = ~0;
+               fl_set_key_val(tb, &key->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC,
+                              &mask->ipv4.src, TCA_FLOWER_KEY_IPV4_SRC_MASK,
+                              sizeof(key->ipv4.src));
+@@ -453,6 +454,7 @@ static int fl_set_key(struct net *net, s
+                              sizeof(key->ipv4.dst));
+       } else if (tb[TCA_FLOWER_KEY_IPV6_SRC] || tb[TCA_FLOWER_KEY_IPV6_DST]) {
+               key->control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS;
++              mask->control.addr_type = ~0;
+               fl_set_key_val(tb, &key->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC,
+                              &mask->ipv6.src, TCA_FLOWER_KEY_IPV6_SRC_MASK,
+                              sizeof(key->ipv6.src));
+@@ -480,6 +482,7 @@ static int fl_set_key(struct net *net, s
+       if (tb[TCA_FLOWER_KEY_ENC_IPV4_SRC] ||
+           tb[TCA_FLOWER_KEY_ENC_IPV4_DST]) {
+               key->enc_control.addr_type = FLOW_DISSECTOR_KEY_IPV4_ADDRS;
++              mask->enc_control.addr_type = ~0;
+               fl_set_key_val(tb, &key->enc_ipv4.src,
+                              TCA_FLOWER_KEY_ENC_IPV4_SRC,
+                              &mask->enc_ipv4.src,
+@@ -495,6 +498,7 @@ static int fl_set_key(struct net *net, s
+       if (tb[TCA_FLOWER_KEY_ENC_IPV6_SRC] ||
+           tb[TCA_FLOWER_KEY_ENC_IPV6_DST]) {
+               key->enc_control.addr_type = FLOW_DISSECTOR_KEY_IPV6_ADDRS;
++              mask->enc_control.addr_type = ~0;
+               fl_set_key_val(tb, &key->enc_ipv6.src,
+                              TCA_FLOWER_KEY_ENC_IPV6_SRC,
+                              &mask->enc_ipv6.src,
diff --git a/queue-4.9/nvme-pci-fix-an-error-handling-path-in-nvme_probe.patch b/queue-4.9/nvme-pci-fix-an-error-handling-path-in-nvme_probe.patch
new file mode 100644 (file)
index 0000000..618ce89
--- /dev/null
@@ -0,0 +1,54 @@
+From b00c9b7aa06786fc5469783965ff3e2a705a1dec Mon Sep 17 00:00:00 2001
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Date: Sun, 16 Jul 2017 10:39:03 +0200
+Subject: nvme-pci: Fix an error handling path in 'nvme_probe()'
+
+From: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+
+commit b00c9b7aa06786fc5469783965ff3e2a705a1dec upstream.
+
+Release resources in the correct order in order not to miss a
+'put_device()' if 'nvme_dev_map()' fails.
+
+Fixes: b00a726a9fd8 ("NVMe: Don't unmap controller registers on reset")
+Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
+Reviewed-by: Keith Busch <keith.busch@intel.com>
+Signed-off-by: Christoph Hellwig <hch@lst.de>
+Signed-off-by: Jens Axboe <axboe@kernel.dk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/nvme/host/pci.c |    7 ++++---
+ 1 file changed, 4 insertions(+), 3 deletions(-)
+
+--- a/drivers/nvme/host/pci.c
++++ b/drivers/nvme/host/pci.c
+@@ -1927,7 +1927,7 @@ static int nvme_probe(struct pci_dev *pd
+       result = nvme_dev_map(dev);
+       if (result)
+-              goto free;
++              goto put_pci;
+       INIT_WORK(&dev->reset_work, nvme_reset_work);
+       INIT_WORK(&dev->remove_work, nvme_remove_dead_ctrl_work);
+@@ -1938,7 +1938,7 @@ static int nvme_probe(struct pci_dev *pd
+       result = nvme_setup_prp_pools(dev);
+       if (result)
+-              goto put_pci;
++              goto unmap;
+       result = nvme_init_ctrl(&dev->ctrl, &pdev->dev, &nvme_pci_ctrl_ops,
+                       id->driver_data);
+@@ -1953,9 +1953,10 @@ static int nvme_probe(struct pci_dev *pd
+  release_pools:
+       nvme_release_prp_pools(dev);
++ unmap:
++      nvme_dev_unmap(dev);
+  put_pci:
+       put_device(dev->dev);
+-      nvme_dev_unmap(dev);
+  free:
+       kfree(dev->queues);
+       kfree(dev);
diff --git a/queue-4.9/pm-wakeirq-enable-dedicated-wakeirq-for-suspend.patch b/queue-4.9/pm-wakeirq-enable-dedicated-wakeirq-for-suspend.patch
new file mode 100644 (file)
index 0000000..8cf0d6d
--- /dev/null
@@ -0,0 +1,63 @@
+From c84345597558349474f55be2b7d4093256e42884 Mon Sep 17 00:00:00 2001
+From: Grygorii Strashko <grygorii.strashko@ti.com>
+Date: Fri, 10 Feb 2017 14:25:00 -0800
+Subject: PM / wakeirq: Enable dedicated wakeirq for suspend
+
+From: Grygorii Strashko <grygorii.strashko@ti.com>
+
+commit c84345597558349474f55be2b7d4093256e42884 upstream.
+
+We currently rely on runtime PM to enable dedicated wakeirq for suspend.
+This assumption fails in the following two cases:
+
+1. If the consumer driver does not have runtime PM implemented, the
+   dedicated wakeirq never gets enabled for suspend
+
+2. If the consumer driver has runtime PM implemented, but does not idle
+   in suspend
+
+Let's fix the issue by always enabling the dedicated wakeirq during
+suspend.
+
+Depends-on: bed570307ed7 (PM / wakeirq: Fix dedicated wakeirq for drivers not using autosuspend)
+Fixes: 4990d4fe327b (PM / Wakeirq: Add automated device wake IRQ handling)
+Reported-by: Keerthy <j-keerthy@ti.com>
+Tested-by: Keerthy <j-keerthy@ti.com>
+Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
+[ tony@atomide.com: updated based on bed570307ed7, added description ]
+Tested-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Tony Lindgren <tony@atomide.com>
+Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/base/power/wakeirq.c |   12 ++++++++++--
+ 1 file changed, 10 insertions(+), 2 deletions(-)
+
+--- a/drivers/base/power/wakeirq.c
++++ b/drivers/base/power/wakeirq.c
+@@ -319,8 +319,12 @@ void dev_pm_arm_wake_irq(struct wake_irq
+       if (!wirq)
+               return;
+-      if (device_may_wakeup(wirq->dev))
++      if (device_may_wakeup(wirq->dev)) {
++              if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED)
++                      enable_irq(wirq->irq);
++
+               enable_irq_wake(wirq->irq);
++      }
+ }
+ /**
+@@ -335,6 +339,10 @@ void dev_pm_disarm_wake_irq(struct wake_
+       if (!wirq)
+               return;
+-      if (device_may_wakeup(wirq->dev))
++      if (device_may_wakeup(wirq->dev)) {
+               disable_irq_wake(wirq->irq);
++
++              if (wirq->status & WAKE_IRQ_DEDICATED_ALLOCATED)
++                      disable_irq_nosync(wirq->irq);
++      }
+ }
diff --git a/queue-4.9/powerpc-boot-delete-unneeded-.globl-_zimage_start.patch b/queue-4.9/powerpc-boot-delete-unneeded-.globl-_zimage_start.patch
new file mode 100644 (file)
index 0000000..f9c2668
--- /dev/null
@@ -0,0 +1,38 @@
+From 968339fad422a58312f67718691b717dac45c399 Mon Sep 17 00:00:00 2001
+From: Fangrui Song <maskray@google.com>
+Date: Wed, 25 Mar 2020 09:42:57 -0700
+Subject: powerpc/boot: Delete unneeded .globl _zimage_start
+
+From: Fangrui Song <maskray@google.com>
+
+commit 968339fad422a58312f67718691b717dac45c399 upstream.
+
+.globl sets the symbol binding to STB_GLOBAL while .weak sets the
+binding to STB_WEAK. GNU as let .weak override .globl since
+binutils-gdb 5ca547dc2399a0a5d9f20626d4bf5547c3ccfddd (1996). Clang
+integrated assembler let the last win but it may error in the future.
+
+Since it is a convention that only one binding directive is used, just
+delete .globl.
+
+Fixes: ee9d21b3b358 ("powerpc/boot: Ensure _zimage_start is a weak symbol")
+Signed-off-by: Fangrui Song <maskray@google.com>
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Link: https://lore.kernel.org/r/20200325164257.170229-1-maskray@google.com
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/boot/crt0.S |    3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/arch/powerpc/boot/crt0.S
++++ b/arch/powerpc/boot/crt0.S
+@@ -49,9 +49,6 @@ p_end:               .long   _end
+ p_pstack:     .long   _platform_stack_top
+ #endif
+-      .globl  _zimage_start
+-      /* Clang appears to require the .weak directive to be after the symbol
+-       * is defined. See https://bugs.llvm.org/show_bug.cgi?id=38921  */
+       .weak   _zimage_start
+ _zimage_start:
+       .globl  _zimage_start_lib
diff --git a/queue-4.9/powerpc-module64-fix-comment-in-r_ppc64_entry-handling.patch b/queue-4.9/powerpc-module64-fix-comment-in-r_ppc64_entry-handling.patch
new file mode 100644 (file)
index 0000000..b7a86a7
--- /dev/null
@@ -0,0 +1,30 @@
+From 2fb0a2c989837c976b68233496bbaefb47cd3d6f Mon Sep 17 00:00:00 2001
+From: Michael Ellerman <mpe@ellerman.id.au>
+Date: Sat, 6 Jul 2019 00:18:53 +1000
+Subject: powerpc/module64: Fix comment in R_PPC64_ENTRY handling
+
+From: Michael Ellerman <mpe@ellerman.id.au>
+
+commit 2fb0a2c989837c976b68233496bbaefb47cd3d6f upstream.
+
+The comment here is wrong, the addi reads from r2 not r12. The code is
+correct, 0x38420000 = addi r2,r2,0.
+
+Fixes: a61674bdfc7c ("powerpc/module: Handle R_PPC64_ENTRY relocations")
+Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/powerpc/kernel/module_64.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/powerpc/kernel/module_64.c
++++ b/arch/powerpc/kernel/module_64.c
+@@ -691,7 +691,7 @@ int apply_relocate_add(Elf64_Shdr *sechd
+                       /*
+                        * If found, replace it with:
+                        *      addis r2, r12, (.TOC.-func)@ha
+-                       *      addi r2, r12, (.TOC.-func)@l
++                       *      addi  r2,  r2, (.TOC.-func)@l
+                        */
+                       ((uint32_t *)location)[0] = 0x3c4c0000 + PPC_HA(value);
+                       ((uint32_t *)location)[1] = 0x38420000 + PPC_LO(value);
diff --git a/queue-4.9/s390-disassembler-correct-disassembly-lines-alignment.patch b/queue-4.9/s390-disassembler-correct-disassembly-lines-alignment.patch
new file mode 100644 (file)
index 0000000..249a27e
--- /dev/null
@@ -0,0 +1,36 @@
+From 26f4e759ef9b8a2bab1823d692ed6d56d40b66e3 Mon Sep 17 00:00:00 2001
+From: Vasily Gorbik <gor@linux.vnet.ibm.com>
+Date: Thu, 23 Nov 2017 10:50:23 +0100
+Subject: s390/disassembler: correct disassembly lines alignment
+
+From: Vasily Gorbik <gor@linux.vnet.ibm.com>
+
+commit 26f4e759ef9b8a2bab1823d692ed6d56d40b66e3 upstream.
+
+176.718956 Krnl Code: 00000000004d38b0: a54c0018        llihh   %r4,24
+176.718956        00000000004d38b4: b9080014        agr     %r1,%r4
+           ^
+Using a tab to align disassembly lines which follow the first line with
+"Krnl Code: " doesn't always work, e.g. if there is a prefix (timestamp
+or syslog prefix) which is not 8 chars aligned. Go back to alignment
+with spaces.
+
+Fixes: b192571d1ae3 ("s390/disassembler: increase show_code buffer size")
+Signed-off-by: Vasily Gorbik <gor@linux.vnet.ibm.com>
+Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ arch/s390/kernel/dis.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/s390/kernel/dis.c
++++ b/arch/s390/kernel/dis.c
+@@ -2018,7 +2018,7 @@ void show_code(struct pt_regs *regs)
+               start += opsize;
+               pr_cont("%s", buffer);
+               ptr = buffer;
+-              ptr += sprintf(ptr, "\n\t  ");
++              ptr += sprintf(ptr, "\n          ");
+               hops++;
+       }
+       pr_cont("\n");
index 46a89a06158df24cd835c97b73f4bbce78c10824..6fa50ef904b0717352464750e04aa5ab1dff0ab2 100644 (file)
@@ -14,3 +14,18 @@ ath-modify-ath_key_delete-to-not-need-full-key-entry.patch
 ath9k-postpone-key-cache-entry-deletion-for-txq-frames-reference-it.patch
 media-stkwebcam-fix-memory-leak-in-stk_camera_probe.patch
 igmp-add-ip_mc_list-lock-in-ip_check_mc_rcu.patch
+usb-phy-isp1301-fix-build-warning-when-config_of-is-disabled.patch
+usb-serial-mos7720-improve-oom-handling-in-read_mos_reg.patch
+net-sched-cls_flower-use-mask-for-addr_type.patch
+pm-wakeirq-enable-dedicated-wakeirq-for-suspend.patch
+tc358743-fix-register-i2c_rd-wr-function-fix.patch
+nvme-pci-fix-an-error-handling-path-in-nvme_probe.patch
+gfs2-don-t-clear-sgid-when-inheriting-acls.patch
+ipv4-icmp-l3mdev-perform-icmp-error-route-lookup-on-source-device-routing-table-v2.patch
+s390-disassembler-correct-disassembly-lines-alignment.patch
+mm-kmemleak.c-make-cond_resched-rate-limiting-more-efficient.patch
+crypto-talitos-reduce-max-key-size-for-sec1.patch
+powerpc-module64-fix-comment-in-r_ppc64_entry-handling.patch
+powerpc-boot-delete-unneeded-.globl-_zimage_start.patch
+net-ll_temac-remove-left-over-debug-message.patch
+mm-page_alloc-speed-up-the-iteration-of-max_order.patch
diff --git a/queue-4.9/tc358743-fix-register-i2c_rd-wr-function-fix.patch b/queue-4.9/tc358743-fix-register-i2c_rd-wr-function-fix.patch
new file mode 100644 (file)
index 0000000..4426059
--- /dev/null
@@ -0,0 +1,36 @@
+From 4b0755e90ae03ba40174842af6fa810355960fbc Mon Sep 17 00:00:00 2001
+From: Philipp Zabel <p.zabel@pengutronix.de>
+Date: Thu, 4 May 2017 12:20:17 -0300
+Subject: [media] tc358743: fix register i2c_rd/wr function fix
+
+From: Philipp Zabel <p.zabel@pengutronix.de>
+
+commit 4b0755e90ae03ba40174842af6fa810355960fbc upstream.
+
+The below mentioned fix contains a small but severe bug,
+fix it to make the driver work again.
+
+Fixes: 3538aa6ecfb2 ("[media] tc358743: fix register i2c_rd/wr functions")
+
+Cc: Hans Verkuil <hans.verkuil@cisco.com>
+Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>
+Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
+Acked-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Hans Verkuil <hansverk@cisco.com>
+Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/media/i2c/tc358743.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/media/i2c/tc358743.c
++++ b/drivers/media/i2c/tc358743.c
+@@ -237,7 +237,7 @@ static void i2c_wr16(struct v4l2_subdev
+ static void i2c_wr16_and_or(struct v4l2_subdev *sd, u16 reg, u16 mask, u16 val)
+ {
+-      i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 2) & mask) | val, 2);
++      i2c_wrreg(sd, reg, (i2c_rdreg(sd, reg, 1) & mask) | val, 1);
+ }
+ static u32 i2c_rd32(struct v4l2_subdev *sd, u16 reg)
diff --git a/queue-4.9/usb-phy-isp1301-fix-build-warning-when-config_of-is-disabled.patch b/queue-4.9/usb-phy-isp1301-fix-build-warning-when-config_of-is-disabled.patch
new file mode 100644 (file)
index 0000000..869d6a7
--- /dev/null
@@ -0,0 +1,39 @@
+From a7f12a21f6b32bdd8d76d3af81eef9e72ce41ec0 Mon Sep 17 00:00:00 2001
+From: Javier Martinez Canillas <javier@osg.samsung.com>
+Date: Tue, 28 Mar 2017 15:07:38 -0400
+Subject: usb: phy: isp1301: Fix build warning when CONFIG_OF is disabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+From: Javier Martinez Canillas <javier@osg.samsung.com>
+
+commit a7f12a21f6b32bdd8d76d3af81eef9e72ce41ec0 upstream.
+
+Commit fd567653bdb9 ("usb: phy: isp1301: Add OF device ID table")
+added an OF device ID table, but used the of_match_ptr() macro
+that will lead to a build warning if CONFIG_OF symbol is disabled:
+
+drivers/usb/phy//phy-isp1301.c:36:34: warning: ‘isp1301_of_match’ defined but not used [-Wunused-const-variable=]
+ static const struct of_device_id isp1301_of_match[] = {
+                                  ^~~~~~~~~~~~~~~~
+
+Fixes: fd567653bdb9 ("usb: phy: isp1301: Add OF device ID table")
+Reported-by: Arnd Bergmann <arnd@arndb.de>
+Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/phy/phy-isp1301.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/usb/phy/phy-isp1301.c
++++ b/drivers/usb/phy/phy-isp1301.c
+@@ -136,7 +136,7 @@ static int isp1301_remove(struct i2c_cli
+ static struct i2c_driver isp1301_driver = {
+       .driver = {
+               .name = DRV_NAME,
+-              .of_match_table = of_match_ptr(isp1301_of_match),
++              .of_match_table = isp1301_of_match,
+       },
+       .probe = isp1301_probe,
+       .remove = isp1301_remove,
diff --git a/queue-4.9/usb-serial-mos7720-improve-oom-handling-in-read_mos_reg.patch b/queue-4.9/usb-serial-mos7720-improve-oom-handling-in-read_mos_reg.patch
new file mode 100644 (file)
index 0000000..f8b9717
--- /dev/null
@@ -0,0 +1,51 @@
+From 161a582bd1d8681095f158d11bc679a58f1d026b Mon Sep 17 00:00:00 2001
+From: Tom Rix <trix@redhat.com>
+Date: Mon, 11 Jan 2021 14:09:04 -0800
+Subject: USB: serial: mos7720: improve OOM-handling in read_mos_reg()
+
+From: Tom Rix <trix@redhat.com>
+
+commit 161a582bd1d8681095f158d11bc679a58f1d026b upstream.
+
+clang static analysis reports this problem
+
+mos7720.c:352:2: warning: Undefined or garbage value returned to caller
+        return d;
+        ^~~~~~~~
+
+In the parport_mos7715_read_data()'s call to read_mos_reg(), 'd' is
+only set after the alloc block.
+
+       buf = kmalloc(1, GFP_KERNEL);
+       if (!buf)
+               return -ENOMEM;
+
+Although the problem is reported in parport_most7715_read_data(),
+none of the callee's of read_mos_reg() check the return status.
+
+Make sure to clear the return-value buffer also on allocation failures.
+
+Fixes: 0d130367abf5 ("USB: serial: mos7720: fix control-message error handling")
+Signed-off-by: Tom Rix <trix@redhat.com>
+Link: https://lore.kernel.org/r/20210111220904.1035957-1-trix@redhat.com
+[ johan: only clear the buffer on errors, amend commit message ]
+Signed-off-by: Johan Hovold <johan@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/usb/serial/mos7720.c |    4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/usb/serial/mos7720.c
++++ b/drivers/usb/serial/mos7720.c
+@@ -229,8 +229,10 @@ static int read_mos_reg(struct usb_seria
+       int status;
+       buf = kmalloc(1, GFP_KERNEL);
+-      if (!buf)
++      if (!buf) {
++              *data = 0;
+               return -ENOMEM;
++      }
+       status = usb_control_msg(usbdev, pipe, request, requesttype, value,
+                                    index, buf, 1, MOS_WDR_TIMEOUT);