]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.10-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jun 2023 06:52:05 +0000 (08:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 19 Jun 2023 06:52:05 +0000 (08:52 +0200)
added patches:
neighbour-delete-neigh_lookup_nodev-as-not-used.patch
neighbour-remove-unused-inline-function-neigh_key_eq16.patch
net-remove-decnet-leftovers-from-flow.h.patch
net-remove-unused-inline-function-dst_hold_and_use.patch

queue-5.10/neighbour-delete-neigh_lookup_nodev-as-not-used.patch [new file with mode: 0644]
queue-5.10/neighbour-remove-unused-inline-function-neigh_key_eq16.patch [new file with mode: 0644]
queue-5.10/net-remove-decnet-leftovers-from-flow.h.patch [new file with mode: 0644]
queue-5.10/net-remove-unused-inline-function-dst_hold_and_use.patch [new file with mode: 0644]
queue-5.10/series

diff --git a/queue-5.10/neighbour-delete-neigh_lookup_nodev-as-not-used.patch b/queue-5.10/neighbour-delete-neigh_lookup_nodev-as-not-used.patch
new file mode 100644 (file)
index 0000000..e0c5af7
--- /dev/null
@@ -0,0 +1,75 @@
+From 76b9bf965c98c9b53ef7420b3b11438dbd764f92 Mon Sep 17 00:00:00 2001
+From: Leon Romanovsky <leonro@nvidia.com>
+Date: Wed, 8 Mar 2023 11:23:13 +0200
+Subject: neighbour: delete neigh_lookup_nodev as not used
+
+From: Leon Romanovsky <leonro@nvidia.com>
+
+commit 76b9bf965c98c9b53ef7420b3b11438dbd764f92 upstream.
+
+neigh_lookup_nodev isn't used in the kernel after removal
+of DECnet. So let's remove it.
+
+Fixes: 1202cdd66531 ("Remove DECnet support from kernel")
+Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
+Reviewed-by: Eric Dumazet <edumazet@google.com>
+Reviewed-by: Nikolay Aleksandrov <razor@blackwall.org>
+Link: https://lore.kernel.org/r/eb5656200d7964b2d177a36b77efa3c597d6d72d.1678267343.git.leonro@nvidia.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/net/neighbour.h |    2 --
+ net/core/neighbour.c    |   31 -------------------------------
+ 2 files changed, 33 deletions(-)
+
+--- a/include/net/neighbour.h
++++ b/include/net/neighbour.h
+@@ -309,8 +309,6 @@ void neigh_table_init(int index, struct
+ int neigh_table_clear(int index, struct neigh_table *tbl);
+ struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
+                              struct net_device *dev);
+-struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net,
+-                                   const void *pkey);
+ struct neighbour *__neigh_create(struct neigh_table *tbl, const void *pkey,
+                                struct net_device *dev, bool want_ref);
+ static inline struct neighbour *neigh_create(struct neigh_table *tbl,
+--- a/net/core/neighbour.c
++++ b/net/core/neighbour.c
+@@ -571,37 +571,6 @@ struct neighbour *neigh_lookup(struct ne
+ }
+ EXPORT_SYMBOL(neigh_lookup);
+-struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, struct net *net,
+-                                   const void *pkey)
+-{
+-      struct neighbour *n;
+-      unsigned int key_len = tbl->key_len;
+-      u32 hash_val;
+-      struct neigh_hash_table *nht;
+-
+-      NEIGH_CACHE_STAT_INC(tbl, lookups);
+-
+-      rcu_read_lock_bh();
+-      nht = rcu_dereference_bh(tbl->nht);
+-      hash_val = tbl->hash(pkey, NULL, nht->hash_rnd) >> (32 - nht->hash_shift);
+-
+-      for (n = rcu_dereference_bh(nht->hash_buckets[hash_val]);
+-           n != NULL;
+-           n = rcu_dereference_bh(n->next)) {
+-              if (!memcmp(n->primary_key, pkey, key_len) &&
+-                  net_eq(dev_net(n->dev), net)) {
+-                      if (!refcount_inc_not_zero(&n->refcnt))
+-                              n = NULL;
+-                      NEIGH_CACHE_STAT_INC(tbl, hits);
+-                      break;
+-              }
+-      }
+-
+-      rcu_read_unlock_bh();
+-      return n;
+-}
+-EXPORT_SYMBOL(neigh_lookup_nodev);
+-
+ static struct neighbour *
+ ___neigh_create(struct neigh_table *tbl, const void *pkey,
+               struct net_device *dev, u8 flags,
diff --git a/queue-5.10/neighbour-remove-unused-inline-function-neigh_key_eq16.patch b/queue-5.10/neighbour-remove-unused-inline-function-neigh_key_eq16.patch
new file mode 100644 (file)
index 0000000..6e46cbb
--- /dev/null
@@ -0,0 +1,34 @@
+From c8f01a4a54473f88f8cc0d9046ec9eb5a99815d5 Mon Sep 17 00:00:00 2001
+From: Gaosheng Cui <cuigaosheng1@huawei.com>
+Date: Thu, 22 Sep 2022 16:38:55 +0800
+Subject: neighbour: Remove unused inline function neigh_key_eq16()
+
+From: Gaosheng Cui <cuigaosheng1@huawei.com>
+
+commit c8f01a4a54473f88f8cc0d9046ec9eb5a99815d5 upstream.
+
+All uses of neigh_key_eq16() have
+been removed since commit 1202cdd66531 ("Remove DECnet support
+from kernel"), so remove it.
+
+Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/net/neighbour.h |    5 -----
+ 1 file changed, 5 deletions(-)
+
+--- a/include/net/neighbour.h
++++ b/include/net/neighbour.h
+@@ -260,11 +260,6 @@ static inline void *neighbour_priv(const
+ extern const struct nla_policy nda_policy[];
+-static inline bool neigh_key_eq16(const struct neighbour *n, const void *pkey)
+-{
+-      return *(const u16 *)n->primary_key == *(const u16 *)pkey;
+-}
+-
+ static inline bool neigh_key_eq32(const struct neighbour *n, const void *pkey)
+ {
+       return *(const u32 *)n->primary_key == *(const u32 *)pkey;
diff --git a/queue-5.10/net-remove-decnet-leftovers-from-flow.h.patch b/queue-5.10/net-remove-decnet-leftovers-from-flow.h.patch
new file mode 100644 (file)
index 0000000..aef548a
--- /dev/null
@@ -0,0 +1,76 @@
+From 9bc61c04ff6cce6a3756b86e6b34914f7b39d734 Mon Sep 17 00:00:00 2001
+From: Guillaume Nault <gnault@redhat.com>
+Date: Fri, 30 Sep 2022 16:37:30 +0200
+Subject: net: Remove DECnet leftovers from flow.h.
+
+From: Guillaume Nault <gnault@redhat.com>
+
+commit 9bc61c04ff6cce6a3756b86e6b34914f7b39d734 upstream.
+
+DECnet was removed by commit 1202cdd66531 ("Remove DECnet support from
+kernel"). Let's also revome its flow structure.
+
+Compile-tested only (allmodconfig).
+
+Signed-off-by: Guillaume Nault <gnault@redhat.com>
+Acked-by: Stephen Hemminger <stephen@networkplumber.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/net/flow.h |   26 --------------------------
+ 1 file changed, 26 deletions(-)
+
+--- a/include/net/flow.h
++++ b/include/net/flow.h
+@@ -54,11 +54,6 @@ union flowi_uli {
+               __u8    code;
+       } icmpt;
+-      struct {
+-              __le16  dport;
+-              __le16  sport;
+-      } dnports;
+-
+       __be32          spi;
+       __be32          gre_key;
+@@ -156,27 +151,11 @@ struct flowi6 {
+       __u32                   mp_hash;
+ } __attribute__((__aligned__(BITS_PER_LONG/8)));
+-struct flowidn {
+-      struct flowi_common     __fl_common;
+-#define flowidn_oif           __fl_common.flowic_oif
+-#define flowidn_iif           __fl_common.flowic_iif
+-#define flowidn_mark          __fl_common.flowic_mark
+-#define flowidn_scope         __fl_common.flowic_scope
+-#define flowidn_proto         __fl_common.flowic_proto
+-#define flowidn_flags         __fl_common.flowic_flags
+-      __le16                  daddr;
+-      __le16                  saddr;
+-      union flowi_uli         uli;
+-#define fld_sport             uli.ports.sport
+-#define fld_dport             uli.ports.dport
+-} __attribute__((__aligned__(BITS_PER_LONG/8)));
+-
+ struct flowi {
+       union {
+               struct flowi_common     __fl_common;
+               struct flowi4           ip4;
+               struct flowi6           ip6;
+-              struct flowidn          dn;
+       } u;
+ #define flowi_oif     u.__fl_common.flowic_oif
+ #define flowi_iif     u.__fl_common.flowic_iif
+@@ -210,11 +189,6 @@ static inline struct flowi_common *flowi
+       return &(flowi6_to_flowi(fl6)->u.__fl_common);
+ }
+-static inline struct flowi *flowidn_to_flowi(struct flowidn *fldn)
+-{
+-      return container_of(fldn, struct flowi, u.dn);
+-}
+-
+ __u32 __get_hash_from_flowi6(const struct flowi6 *fl6, struct flow_keys *keys);
+ #endif
diff --git a/queue-5.10/net-remove-unused-inline-function-dst_hold_and_use.patch b/queue-5.10/net-remove-unused-inline-function-dst_hold_and_use.patch
new file mode 100644 (file)
index 0000000..ccb840f
--- /dev/null
@@ -0,0 +1,35 @@
+From 0b81882ddf8ac2743f657afb001beec7fc3929af Mon Sep 17 00:00:00 2001
+From: Gaosheng Cui <cuigaosheng1@huawei.com>
+Date: Thu, 22 Sep 2022 16:38:57 +0800
+Subject: net: Remove unused inline function dst_hold_and_use()
+
+From: Gaosheng Cui <cuigaosheng1@huawei.com>
+
+commit 0b81882ddf8ac2743f657afb001beec7fc3929af upstream.
+
+All uses of dst_hold_and_use() have
+been removed since commit 1202cdd66531 ("Remove DECnet support
+from kernel"), so remove it.
+
+Signed-off-by: Gaosheng Cui <cuigaosheng1@huawei.com>
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ include/net/dst.h |    6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/include/net/dst.h
++++ b/include/net/dst.h
+@@ -235,12 +235,6 @@ static inline void dst_use_noref(struct
+       }
+ }
+-static inline void dst_hold_and_use(struct dst_entry *dst, unsigned long time)
+-{
+-      dst_hold(dst);
+-      dst_use_noref(dst, time);
+-}
+-
+ static inline struct dst_entry *dst_clone(struct dst_entry *dst)
+ {
+       if (dst)
index 57448887bade31842d857e5f32280bef06abae33..5c69f07d10a28e577e56571b3b465f4b964b7f69 100644 (file)
@@ -74,3 +74,7 @@ selftests-ptp-fix-timestamp-printf-format-for-ptp_sy.patch
 afs-fix-vlserver-probe-rtt-handling.patch
 cgroup-always-put-cset-in-cgroup_css_set_put_fork.patch
 rcu-kvfree-avoid-freeing-new-kfree_rcu-memory-after-old-grace-period.patch
+neighbour-remove-unused-inline-function-neigh_key_eq16.patch
+net-remove-unused-inline-function-dst_hold_and_use.patch
+net-remove-decnet-leftovers-from-flow.h.patch
+neighbour-delete-neigh_lookup_nodev-as-not-used.patch