diff options
Diffstat (limited to 'patches/net-another-local-irq-disable-alloc-atomic-headache.patch')
-rw-r--r-- | patches/net-another-local-irq-disable-alloc-atomic-headache.patch | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/patches/net-another-local-irq-disable-alloc-atomic-headache.patch b/patches/net-another-local-irq-disable-alloc-atomic-headache.patch index a8609207de3d..13693942050a 100644 --- a/patches/net-another-local-irq-disable-alloc-atomic-headache.patch +++ b/patches/net-another-local-irq-disable-alloc-atomic-headache.patch @@ -19,7 +19,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> #include <net/protocol.h> #include <net/dst.h> -@@ -360,6 +361,7 @@ struct napi_alloc_cache { +@@ -359,6 +360,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); @@ -27,20 +27,20 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> static void *__netdev_alloc_frag(unsigned int fragsz, gfp_t gfp_mask) { -@@ -367,10 +369,10 @@ static void *__netdev_alloc_frag(unsigne +@@ -366,10 +368,10 @@ static void *__netdev_alloc_frag(unsigne unsigned long flags; void *data; - local_irq_save(flags); + local_lock_irqsave(netdev_alloc_lock, flags); nc = this_cpu_ptr(&netdev_alloc_cache); - data = __alloc_page_frag(nc, fragsz, gfp_mask); + data = page_frag_alloc(nc, fragsz, gfp_mask); - local_irq_restore(flags); + local_unlock_irqrestore(netdev_alloc_lock, flags); return data; } -@@ -438,13 +440,13 @@ struct sk_buff *__netdev_alloc_skb(struc +@@ -437,13 +439,13 @@ struct sk_buff *__netdev_alloc_skb(struc if (sk_memalloc_socks()) gfp_mask |= __GFP_MEMALLOC; @@ -48,7 +48,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> + local_lock_irqsave(netdev_alloc_lock, flags); nc = this_cpu_ptr(&netdev_alloc_cache); - data = __alloc_page_frag(nc, len, gfp_mask); + data = page_frag_alloc(nc, len, gfp_mask); pfmemalloc = nc->pfmemalloc; - local_irq_restore(flags); |