|
@@ -81,6 +81,7 @@
|
|
#include <linux/hash.h>
|
|
#include <linux/hash.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/sched.h>
|
|
#include <linux/sched.h>
|
|
|
|
+#include <linux/sched/mm.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/string.h>
|
|
#include <linux/string.h>
|
|
#include <linux/mm.h>
|
|
#include <linux/mm.h>
|
|
@@ -4235,7 +4236,7 @@ static int __netif_receive_skb(struct sk_buff *skb)
|
|
int ret;
|
|
int ret;
|
|
|
|
|
|
if (sk_memalloc_socks() && skb_pfmemalloc(skb)) {
|
|
if (sk_memalloc_socks() && skb_pfmemalloc(skb)) {
|
|
- unsigned long pflags = current->flags;
|
|
|
|
|
|
+ unsigned int noreclaim_flag;
|
|
|
|
|
|
/*
|
|
/*
|
|
* PFMEMALLOC skbs are special, they should
|
|
* PFMEMALLOC skbs are special, they should
|
|
@@ -4246,9 +4247,9 @@ static int __netif_receive_skb(struct sk_buff *skb)
|
|
* Use PF_MEMALLOC as this saves us from propagating the allocation
|
|
* Use PF_MEMALLOC as this saves us from propagating the allocation
|
|
* context down to all allocation sites.
|
|
* context down to all allocation sites.
|
|
*/
|
|
*/
|
|
- current->flags |= PF_MEMALLOC;
|
|
|
|
|
|
+ noreclaim_flag = memalloc_noreclaim_save();
|
|
ret = __netif_receive_skb_core(skb, true);
|
|
ret = __netif_receive_skb_core(skb, true);
|
|
- current_restore_flags(pflags, PF_MEMALLOC);
|
|
|
|
|
|
+ memalloc_noreclaim_restore(noreclaim_flag);
|
|
} else
|
|
} else
|
|
ret = __netif_receive_skb_core(skb, false);
|
|
ret = __netif_receive_skb_core(skb, false);
|
|
|
|
|