Thread (15 messages) 15 messages, 3 authors, 2020-06-26

Re: [PATCH v4 bpf-next 6/9] bpf: cpumap: implement XDP_REDIRECT for eBPF programs attached to map entries

From: Jesper Dangaard Brouer <hidden>
Date: 2020-06-26 07:49:55
Also in: bpf

On Thu, 25 Jun 2020 23:28:59 +0200
Daniel Borkmann [off-list ref] wrote:
quoted
@@ -276,7 +286,10 @@ static int cpu_map_bpf_prog_run_xdp(struct bpf_cpu_map_entry *rcpu,
  		}
  	}
  
-	rcu_read_unlock();
+	if (stats->redirect)
+		xdp_do_flush_map();
+
+	rcu_read_unlock_bh(); /* resched point, may call do_softirq() */
  	xdp_clear_return_frame_no_direct();  
Hm, this looks incorrect. Why do you call the xdp_clear_return_frame_no_direct() /after/
the possibility where there is a rescheduling point for softirq?
Good you caught this! - This needs to be fixed.

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help