mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
net: airoha: Fix schedule while atomic in airoha_ppe_deinit()
airoha_ppe_deinit() runs airoha_npu_ppe_deinit() in atomic context.
airoha_npu_ppe_deinit routine allocates ppe_data buffer with GFP_KERNEL
flag. Rely on rcu_replace_pointer in airoha_ppe_deinit routine in order
to fix schedule while atomic issue in airoha_npu_ppe_deinit() since we
do not need atomic context there.
Fixes: 00a7678310 ("net: airoha: Introduce flowtable offload support")
Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
Link: https://patch.msgid.link/20260105-airoha-fw-ethtool-v2-1-3b32b158cc31@kernel.org
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
parent
653267321f
commit
6abcf751bc
|
|
@ -1547,13 +1547,16 @@ void airoha_ppe_deinit(struct airoha_eth *eth)
|
||||||
{
|
{
|
||||||
struct airoha_npu *npu;
|
struct airoha_npu *npu;
|
||||||
|
|
||||||
rcu_read_lock();
|
mutex_lock(&flow_offload_mutex);
|
||||||
npu = rcu_dereference(eth->npu);
|
|
||||||
|
npu = rcu_replace_pointer(eth->npu, NULL,
|
||||||
|
lockdep_is_held(&flow_offload_mutex));
|
||||||
if (npu) {
|
if (npu) {
|
||||||
npu->ops.ppe_deinit(npu);
|
npu->ops.ppe_deinit(npu);
|
||||||
airoha_npu_put(npu);
|
airoha_npu_put(npu);
|
||||||
}
|
}
|
||||||
rcu_read_unlock();
|
|
||||||
|
mutex_unlock(&flow_offload_mutex);
|
||||||
|
|
||||||
rhashtable_destroy(ð->ppe->l2_flows);
|
rhashtable_destroy(ð->ppe->l2_flows);
|
||||||
rhashtable_destroy(ð->flow_table);
|
rhashtable_destroy(ð->flow_table);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user