[ANNOUNCE] 5.15.201-rt93

Joseph Salisbury posted 1 patch 3 weeks, 3 days ago
localversion-rt  |  2 +-
net/ipv6/route.c | 13 ++++++++++++-
2 files changed, 13 insertions(+), 2 deletions(-)
[ANNOUNCE] 5.15.201-rt93
Posted by Joseph Salisbury 3 weeks, 3 days ago
Hello RT-list!

I'm pleased to announce the 5.15.201-rt93 stable release.

This release contains a single new patch, which is an RT specific commit:

1adaea51c61b ("ipv6: fix a BUG in rt6_get_pcpu_route() under PREEMPT_RT")

New patch name:
0183-ipv6-fix-a-BUG-in-rt6_get_pcpu_route-under-PREEMPT_R.patch

You can get this release via the git tree at:

  git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git

  branch: v5.15-rt
  Head SHA1: 3bd063531b598d0de0083b820901df5319a71769

Or to build 5.15.201-rt93 directly, the following patches should be applied:

  https://www.kernel.org/pub/linux/kernel/projects/rt/5.15

  https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.15.tar.xz

  https://www.kernel.org/pub/linux/kernel/v5.x/patch-5.15.201.xz

  https://www.kernel.org/pub/linux/kernel/projects/rt/5.15/patch-5.15.201-rt93.patch.xz


Enjoy!
Joseph Salisbury

Changes from v5.15.201-rt92:
---

Jiayuan Chen (1):
      ipv6: fix a BUG in rt6_get_pcpu_route() under PREEMPT_RT

Joseph Salisbury (1):
      Linux 5.15.201-rt93
---
localversion-rt  |  2 +-
 net/ipv6/route.c | 13 ++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/localversion-rt b/localversion-rt
index 4905d52a48284..e98a1fe050bde 100644
--- a/localversion-rt
+++ b/localversion-rt
@@ -1 +1 @@
--rt92
+-rt93
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index f30a5b7d93f4d..3536192438cea 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -1424,7 +1424,18 @@ static struct rt6_info *rt6_make_pcpu_route(struct net *net,
 
 	p = this_cpu_ptr(res->nh->rt6i_pcpu);
 	prev = cmpxchg(p, NULL, pcpu_rt);
-	BUG_ON(prev);
+	if (unlikely(prev)) {
+		/*
+		 * Another task on this CPU already installed a pcpu_rt.
+		 * This can happen on PREEMPT_RT where preemption is possible.
+		 * Free our allocation and return the existing one.
+		 */
+		WARN_ON_ONCE(!IS_ENABLED(CONFIG_PREEMPT_RT));
+
+		dst_dev_put(&pcpu_rt->dst);
+		dst_release(&pcpu_rt->dst);
+		return prev;
+	}
 
 	if (res->f6i->fib6_destroying) {
 		struct fib6_info *from;