ath25: switch default kernel to 5.15
[openwrt/staging/wigyori.git] / target / linux / generic / backport-5.10 / 603-v5.12-net-fix-race-between-napi-kthread-mode-and-busy-poll.patch
index 6617ee172e49d80dafc85dce74eaad0b46434781..b83078d51c7b49dd87e30abd91806accb88fec16 100644 (file)
@@ -27,7 +27,7 @@ Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -359,6 +359,7 @@ enum {
+@@ -368,6 +368,7 @@ enum {
        NAPI_STATE_NO_BUSY_POLL,/* Do not add in napi_hash, no busy polling */
        NAPI_STATE_IN_BUSY_POLL,/* sk_busy_loop() owns this NAPI */
        NAPI_STATE_THREADED,            /* The poll is performed inside its own thread*/
@@ -35,7 +35,7 @@ Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
  };
  
  enum {
-@@ -370,6 +371,7 @@ enum {
+@@ -379,6 +380,7 @@ enum {
        NAPIF_STATE_NO_BUSY_POLL = BIT(NAPI_STATE_NO_BUSY_POLL),
        NAPIF_STATE_IN_BUSY_POLL = BIT(NAPI_STATE_IN_BUSY_POLL),
        NAPIF_STATE_THREADED     = BIT(NAPI_STATE_THREADED),
@@ -45,7 +45,7 @@ Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
  enum gro_result {
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -4294,6 +4294,8 @@ static inline void ____napi_schedule(str
+@@ -4307,6 +4307,8 @@ static inline void ____napi_schedule(str
                 */
                thread = READ_ONCE(napi->thread);
                if (thread) {
@@ -54,7 +54,7 @@ Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
                        wake_up_process(thread);
                        return;
                }
-@@ -6554,7 +6556,8 @@ bool napi_complete_done(struct napi_stru
+@@ -6568,7 +6570,8 @@ bool napi_complete_done(struct napi_stru
  
                WARN_ON_ONCE(!(val & NAPIF_STATE_SCHED));
  
@@ -64,7 +64,7 @@ Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
  
                /* If STATE_MISSED was set, leave STATE_SCHED set,
                 * because we will call napi->poll() one more time.
-@@ -6990,16 +6993,25 @@ static int napi_poll(struct napi_struct
+@@ -7004,16 +7007,25 @@ static int napi_poll(struct napi_struct
  
  static int napi_thread_wait(struct napi_struct *napi)
  {