Re: [PATCH bpf-next v6 6/8] selftests/bpf: detach a struct_ops link from the subsystem managing it.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/24/24 3:30 PM, Kui-Feng Lee wrote:
@@ -832,11 +865,20 @@ static int bpf_dummy_reg(void *kdata, struct bpf_link *link)
  	if (ops->test_2)
  		ops->test_2(4, ops->data);
+ spin_lock(&detach_lock);
+	if (!link_to_detach)
+		link_to_detach = link;

bpf_testmod_ops is used in a few different tests now. Can you check if "./test_progs -j <num_of_parallel_workers>" will work considering link_to_detach here is the very first registered link.

+	spin_unlock(&detach_lock);
+
  	return 0;
  }





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux