Revert "net: page_pool: avoid false positive warning if NAPI was never added"
This reverts commit 247b420fea which is
commit c1e00bc4be06cacee6307cedb9b55bbaddb5044d upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I5ed1598f3985ad8b7b6de88577a980f1f87b2d0f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -148,18 +148,6 @@ void xdp_do_check_flushed(struct napi_struct *napi);
|
||||
static inline void xdp_do_check_flushed(struct napi_struct *napi) { }
|
||||
#endif
|
||||
|
||||
/* Best effort check that NAPI is not idle (can't be scheduled to run) */
|
||||
static inline void napi_assert_will_not_race(const struct napi_struct *napi)
|
||||
{
|
||||
/* uninitialized instance, can't race */
|
||||
if (!napi->poll_list.next)
|
||||
return;
|
||||
|
||||
/* SCHED bit is set on disabled instances */
|
||||
WARN_ON(!test_bit(NAPI_STATE_SCHED, &napi->state));
|
||||
WARN_ON(READ_ONCE(napi->list_owner) != -1);
|
||||
}
|
||||
|
||||
void kick_defer_list_purge(struct softnet_data *sd, unsigned int cpu);
|
||||
|
||||
#define XMIT_RECURSION_LIMIT 8
|
||||
|
||||
@@ -25,7 +25,6 @@
|
||||
|
||||
#include <trace/events/page_pool.h>
|
||||
|
||||
#include "dev.h"
|
||||
#include "mp_dmabuf_devmem.h"
|
||||
#include "netmem_priv.h"
|
||||
#include "page_pool_priv.h"
|
||||
@@ -1109,7 +1108,11 @@ void page_pool_disable_direct_recycling(struct page_pool *pool)
|
||||
if (!pool->p.napi)
|
||||
return;
|
||||
|
||||
napi_assert_will_not_race(pool->p.napi);
|
||||
/* To avoid races with recycling and additional barriers make sure
|
||||
* pool and NAPI are unlinked when NAPI is disabled.
|
||||
*/
|
||||
WARN_ON(!test_bit(NAPI_STATE_SCHED, &pool->p.napi->state));
|
||||
WARN_ON(READ_ONCE(pool->p.napi->list_owner) != -1);
|
||||
|
||||
WRITE_ONCE(pool->p.napi, NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user