summaryrefslogtreecommitdiffstats
path: root/debian/patches-rt/0232-net-Another-local_irq_disable-kmalloc-headache.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:21:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-08 03:21:37 +0000
commit06343b27411344fc542f4f3a643f8441aa35252d (patch)
tree66aa45187c93c350bbdf7e6ae4467a70bf3a8f4c /debian/patches-rt/0232-net-Another-local_irq_disable-kmalloc-headache.patch
parentMerging upstream version 4.19.260. (diff)
downloadlinux-06343b27411344fc542f4f3a643f8441aa35252d.tar.xz
linux-06343b27411344fc542f4f3a643f8441aa35252d.zip
Adding debian version 4.19.260-1.debian/4.19.260-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches-rt/0232-net-Another-local_irq_disable-kmalloc-headache.patch')
-rw-r--r--debian/patches-rt/0232-net-Another-local_irq_disable-kmalloc-headache.patch65
1 files changed, 0 insertions, 65 deletions
diff --git a/debian/patches-rt/0232-net-Another-local_irq_disable-kmalloc-headache.patch b/debian/patches-rt/0232-net-Another-local_irq_disable-kmalloc-headache.patch
deleted file mode 100644
index 374593ebd..000000000
--- a/debian/patches-rt/0232-net-Another-local_irq_disable-kmalloc-headache.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From b83d94e087c52b96575acd87c8ecaff00a418d02 Mon Sep 17 00:00:00 2001
-From: Thomas Gleixner <tglx@linutronix.de>
-Date: Wed, 26 Sep 2012 16:21:08 +0200
-Subject: [PATCH 232/347] net: Another local_irq_disable/kmalloc headache
-Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.19/older/patches-4.19.246-rt110.tar.xz
-
-Replace it by a local lock. Though that's pretty inefficient :(
-
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
----
- net/core/skbuff.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/net/core/skbuff.c b/net/core/skbuff.c
-index c623c129d0ab..0696d3cb809d 100644
---- a/net/core/skbuff.c
-+++ b/net/core/skbuff.c
-@@ -63,6 +63,7 @@
- #include <linux/errqueue.h>
- #include <linux/prefetch.h>
- #include <linux/if_vlan.h>
-+#include <linux/locallock.h>
-
- #include <net/protocol.h>
- #include <net/dst.h>
-@@ -330,6 +331,7 @@ struct napi_alloc_cache {
-
- static DEFINE_PER_CPU(struct page_frag_cache, netdev_alloc_cache);
- static DEFINE_PER_CPU(struct napi_alloc_cache, napi_alloc_cache);
-+static DEFINE_LOCAL_IRQ_LOCK(netdev_alloc_lock);
-
- static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
- {
-@@ -337,10 +339,10 @@ static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask)
- unsigned long flags;
- void *data;
-
-- local_irq_save(flags);
-+ local_lock_irqsave(netdev_alloc_lock, flags);
- nc = this_cpu_ptr(&netdev_alloc_cache);
- data = page_frag_alloc(nc, fragsz, gfp_mask);
-- local_irq_restore(flags);
-+ local_unlock_irqrestore(netdev_alloc_lock, flags);
- return data;
- }
-
-@@ -416,13 +418,13 @@ struct sk_buff *__netdev_alloc_skb(struct net_device *dev, unsigned int len,
- if (sk_memalloc_socks())
- gfp_mask |= __GFP_MEMALLOC;
-
-- local_irq_save(flags);
-+ local_lock_irqsave(netdev_alloc_lock, flags);
-
- nc = this_cpu_ptr(&netdev_alloc_cache);
- data = page_frag_alloc(nc, len, gfp_mask);
- pfmemalloc = nc->pfmemalloc;
-
-- local_irq_restore(flags);
-+ local_unlock_irqrestore(netdev_alloc_lock, flags);
-
- if (unlikely(!data))
- return NULL;
---
-2.36.1
-