diff options
| author | Sebastian Andrzej Siewior <[email protected]> | 2025-05-12 09:27:22 +0000 |
|---|---|---|
| committer | Paolo Abeni <[email protected]> | 2025-05-15 13:23:30 +0000 |
| commit | 32471b2f481dea8624f27669d36ffd131d24b732 (patch) | |
| tree | 8d6a6e109c42a25e35af5419fe92d7a6a59ec455 /net/core/page_pool.c | |
| parent | Merge branch 'octeontx2-improve-mailbox-tracing' (diff) | |
| download | kernel-32471b2f481dea8624f27669d36ffd131d24b732.tar.gz kernel-32471b2f481dea8624f27669d36ffd131d24b732.zip | |
net: page_pool: Don't recycle into cache on PREEMPT_RT
With preemptible softirq and no per-CPU locking in local_bh_disable() on
PREEMPT_RT the consumer can be preempted while a skb is returned.
Avoid the race by disabling the recycle into the cache on PREEMPT_RT.
Cc: Jesper Dangaard Brouer <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Paolo Abeni <[email protected]>
Diffstat (limited to 'net/core/page_pool.c')
| -rw-r--r-- | net/core/page_pool.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/core/page_pool.c b/net/core/page_pool.c index 2b7684865941..974f3eef2efa 100644 --- a/net/core/page_pool.c +++ b/net/core/page_pool.c @@ -839,6 +839,10 @@ static bool page_pool_napi_local(const struct page_pool *pool) const struct napi_struct *napi; u32 cpuid; + /* On PREEMPT_RT the softirq can be preempted by the consumer */ + if (IS_ENABLED(CONFIG_PREEMPT_RT)) + return false; + if (unlikely(!in_softirq())) return false; |
