]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jul 2021 10:45:07 +0000 (12:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Jul 2021 10:45:07 +0000 (12:45 +0200)
added patches:
documentation-fix-intiramfs-script-name.patch
perf-inject-close-inject.output-on-exit.patch
skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch

queue-5.10/documentation-fix-intiramfs-script-name.patch [new file with mode: 0644]
queue-5.10/perf-inject-close-inject.output-on-exit.patch [new file with mode: 0644]
queue-5.10/series
queue-5.10/skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch [new file with mode: 0644]

diff --git a/queue-5.10/documentation-fix-intiramfs-script-name.patch b/queue-5.10/documentation-fix-intiramfs-script-name.patch
new file mode 100644 (file)
index 0000000..8b92c19
--- /dev/null
@@ -0,0 +1,61 @@
+From 5e60f363b38fd40e4d8838b5d6f4d4ecee92c777 Mon Sep 17 00:00:00 2001
+From: Robert Richter <rrichter@amd.com>
+Date: Thu, 15 Jul 2021 11:26:02 +0200
+Subject: Documentation: Fix intiramfs script name
+
+From: Robert Richter <rrichter@amd.com>
+
+commit 5e60f363b38fd40e4d8838b5d6f4d4ecee92c777 upstream.
+
+Documentation was not changed when renaming the script in commit
+80e715a06c2d ("initramfs: rename gen_initramfs_list.sh to
+gen_initramfs.sh"). Fixing this.
+
+Basically does:
+
+ $ sed -i -e s/gen_initramfs_list.sh/gen_initramfs.sh/g $(git grep -l gen_initramfs_list.sh)
+
+Fixes: 80e715a06c2d ("initramfs: rename gen_initramfs_list.sh to gen_initramfs.sh")
+Signed-off-by: Robert Richter <rrichter@amd.com>
+Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ Documentation/driver-api/early-userspace/early_userspace_support.rst |    8 ++++----
+ Documentation/filesystems/ramfs-rootfs-initramfs.rst                 |    2 +-
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+--- a/Documentation/driver-api/early-userspace/early_userspace_support.rst
++++ b/Documentation/driver-api/early-userspace/early_userspace_support.rst
+@@ -69,17 +69,17 @@ early userspace image can be built by an
+ As a technical note, when directories and files are specified, the
+ entire CONFIG_INITRAMFS_SOURCE is passed to
+-usr/gen_initramfs_list.sh.  This means that CONFIG_INITRAMFS_SOURCE
++usr/gen_initramfs.sh.  This means that CONFIG_INITRAMFS_SOURCE
+ can really be interpreted as any legal argument to
+-gen_initramfs_list.sh.  If a directory is specified as an argument then
++gen_initramfs.sh.  If a directory is specified as an argument then
+ the contents are scanned, uid/gid translation is performed, and
+ usr/gen_init_cpio file directives are output.  If a directory is
+-specified as an argument to usr/gen_initramfs_list.sh then the
++specified as an argument to usr/gen_initramfs.sh then the
+ contents of the file are simply copied to the output.  All of the output
+ directives from directory scanning and file contents copying are
+ processed by usr/gen_init_cpio.
+-See also 'usr/gen_initramfs_list.sh -h'.
++See also 'usr/gen_initramfs.sh -h'.
+ Where's this all leading?
+ =========================
+--- a/Documentation/filesystems/ramfs-rootfs-initramfs.rst
++++ b/Documentation/filesystems/ramfs-rootfs-initramfs.rst
+@@ -170,7 +170,7 @@ Documentation/driver-api/early-userspace
+ The kernel does not depend on external cpio tools.  If you specify a
+ directory instead of a configuration file, the kernel's build infrastructure
+ creates a configuration file from that directory (usr/Makefile calls
+-usr/gen_initramfs_list.sh), and proceeds to package up that directory
++usr/gen_initramfs.sh), and proceeds to package up that directory
+ using the config file (by feeding it to usr/gen_init_cpio, which is created
+ from usr/gen_init_cpio.c).  The kernel's build-time cpio creation code is
+ entirely self-contained, and the kernel's boot-time extractor is also
diff --git a/queue-5.10/perf-inject-close-inject.output-on-exit.patch b/queue-5.10/perf-inject-close-inject.output-on-exit.patch
new file mode 100644 (file)
index 0000000..338b5ae
--- /dev/null
@@ -0,0 +1,57 @@
+From 02e6246f5364d5260a6ea6f92ab6f409058b162f Mon Sep 17 00:00:00 2001
+From: Riccardo Mancini <rickyman7@gmail.com>
+Date: Thu, 15 Jul 2021 18:07:15 +0200
+Subject: perf inject: Close inject.output on exit
+
+From: Riccardo Mancini <rickyman7@gmail.com>
+
+commit 02e6246f5364d5260a6ea6f92ab6f409058b162f upstream.
+
+ASan reports a memory leak when running:
+
+  # perf test "83: Zstd perf.data compression/decompression"
+
+which happens inside 'perf inject'.
+
+The bug is caused by inject.output never being closed.
+
+This patch adds the missing perf_data__close().
+
+Signed-off-by: Riccardo Mancini <rickyman7@gmail.com>
+Fixes: 6ef81c55a2b6584c ("perf session: Return error code for perf_session__new() function on failure")
+Cc: Ian Rogers <irogers@google.com>
+Cc: Jiri Olsa <jolsa@redhat.com>
+Cc: Mamatha Inamdar <mamatha4@linux.vnet.ibm.com>
+Cc: Mark Rutland <mark.rutland@arm.com>
+Cc: Namhyung Kim <namhyung@kernel.org>
+Cc: Peter Zijlstra <peterz@infradead.org>
+Link: http://lore.kernel.org/lkml/c06f682afa964687367cf6e92a64ceb49aec76a5.1626343282.git.rickyman7@gmail.com
+Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ tools/perf/builtin-inject.c |    8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+--- a/tools/perf/builtin-inject.c
++++ b/tools/perf/builtin-inject.c
+@@ -906,8 +906,10 @@ int cmd_inject(int argc, const char **ar
+       data.path = inject.input_name;
+       inject.session = perf_session__new(&data, inject.output.is_pipe, &inject.tool);
+-      if (IS_ERR(inject.session))
+-              return PTR_ERR(inject.session);
++      if (IS_ERR(inject.session)) {
++              ret = PTR_ERR(inject.session);
++              goto out_close_output;
++      }
+       if (zstd_init(&(inject.session->zstd_data), 0) < 0)
+               pr_warning("Decompression initialization failed.\n");
+@@ -949,5 +951,7 @@ int cmd_inject(int argc, const char **ar
+ out_delete:
+       zstd_fini(&(inject.session->zstd_data));
+       perf_session__delete(inject.session);
++out_close_output:
++      perf_data__close(&inject.output);
+       return ret;
+ }
index 484071e3b75350657b788b09ce64c522160be638..1e4892118a1ab1d60e47ca62c3622c286818e1c2 100644 (file)
@@ -159,3 +159,6 @@ net-dsa-mv88e6xxx-enable-serdes-rx-stats-for-topaz.patch
 net-dsa-mv88e6xxx-enable-serdes-pcs-register-dump-via-ethtool-d-on-topaz.patch
 pci-mark-amd-navi14-gpu-ats-as-broken.patch
 bonding-fix-build-issue.patch
+skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch
+documentation-fix-intiramfs-script-name.patch
+perf-inject-close-inject.output-on-exit.patch
diff --git a/queue-5.10/skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch b/queue-5.10/skbuff-release-nfct-refcount-on-napi-stolen-or-re-used-skbs.patch
new file mode 100644 (file)
index 0000000..38784ac
--- /dev/null
@@ -0,0 +1,66 @@
+From 8550ff8d8c75416e984d9c4b082845e57e560984 Mon Sep 17 00:00:00 2001
+From: Paul Blakey <paulb@nvidia.com>
+Date: Mon, 5 Jul 2021 13:54:51 +0300
+Subject: skbuff: Release nfct refcount on napi stolen or re-used skbs
+
+From: Paul Blakey <paulb@nvidia.com>
+
+commit 8550ff8d8c75416e984d9c4b082845e57e560984 upstream.
+
+When multiple SKBs are merged to a new skb under napi GRO,
+or SKB is re-used by napi, if nfct was set for them in the
+driver, it will not be released while freeing their stolen
+head state or on re-use.
+
+Release nfct on napi's stolen or re-used SKBs, and
+in gro_list_prepare, check conntrack metadata diff.
+
+Fixes: 5c6b94604744 ("net/mlx5e: CT: Handle misses after executing CT action")
+Reviewed-by: Roi Dayan <roid@nvidia.com>
+Signed-off-by: Paul Blakey <paulb@nvidia.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ net/core/dev.c    |   13 +++++++++++++
+ net/core/skbuff.c |    1 +
+ 2 files changed, 14 insertions(+)
+
+--- a/net/core/dev.c
++++ b/net/core/dev.c
+@@ -5870,6 +5870,18 @@ static struct list_head *gro_list_prepar
+                       diffs = memcmp(skb_mac_header(p),
+                                      skb_mac_header(skb),
+                                      maclen);
++
++              diffs |= skb_get_nfct(p) ^ skb_get_nfct(skb);
++
++              if (!diffs) {
++                      struct tc_skb_ext *skb_ext = skb_ext_find(skb, TC_SKB_EXT);
++                      struct tc_skb_ext *p_ext = skb_ext_find(p, TC_SKB_EXT);
++
++                      diffs |= (!!p_ext) ^ (!!skb_ext);
++                      if (!diffs && unlikely(skb_ext))
++                              diffs |= p_ext->chain ^ skb_ext->chain;
++              }
++
+               NAPI_GRO_CB(p)->same_flow = !diffs;
+       }
+@@ -6151,6 +6163,7 @@ static void napi_reuse_skb(struct napi_s
+       skb_shinfo(skb)->gso_type = 0;
+       skb->truesize = SKB_TRUESIZE(skb_end_offset(skb));
+       skb_ext_reset(skb);
++      nf_reset_ct(skb);
+       napi->skb = skb;
+ }
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -659,6 +659,7 @@ fastpath:
+ void skb_release_head_state(struct sk_buff *skb)
+ {
++      nf_reset_ct(skb);
+       skb_dst_drop(skb);
+       if (skb->destructor) {
+               WARN_ON(in_irq());