Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion kernel/bpf/cpumap.c
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ __cpu_map_entry_alloc(struct bpf_map *map, struct bpf_cpumap_val *value,

for_each_possible_cpu(i) {
bq = per_cpu_ptr(rcpu->bulkq, i);
INIT_LIST_HEAD(&bq->flush_node);
bq->obj = rcpu;
}

Expand Down Expand Up @@ -742,7 +743,8 @@ static void bq_flush_to_queue(struct xdp_bulk_queue *bq)
bq->count = 0;
spin_unlock(&q->producer_lock);

__list_del_clearprev(&bq->flush_node);
if (bq->flush_node.prev)
__list_del_clearprev(&bq->flush_node);

/* Feedback loop via tracepoints */
trace_xdp_cpumap_enqueue(rcpu->map_id, processed, drops, to_cpu);
Expand Down
3 changes: 2 additions & 1 deletion kernel/bpf/devmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,8 @@ void __dev_flush(struct list_head *flush_list)
bq_xmit_all(bq, XDP_XMIT_FLUSH);
bq->dev_rx = NULL;
bq->xdp_prog = NULL;
__list_del_clearprev(&bq->flush_node);
if (bq->flush_node.prev)
__list_del_clearprev(&bq->flush_node);
}
}

Expand Down
3 changes: 2 additions & 1 deletion net/xdp/xsk.c
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ void __xsk_map_flush(struct list_head *flush_list)

list_for_each_entry_safe(xs, tmp, flush_list, flush_node) {
xsk_flush(xs);
__list_del_clearprev(&xs->flush_node);
if (xs->flush_node.prev)
__list_del_clearprev(&xs->flush_node);
}
}

Expand Down
Loading