Re: [PATCH bpf-next 1/2] bpf: support BPF_PROG_QUERY for BPF_FLOW_DISSECTOR attach_type

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

 



On Tue, 23 Apr 2019 16:21:59 -0700, Stanislav Fomichev wrote:
> +	rcu_read_lock();
> +	attached = rcu_dereference(net->flow_dissector_prog);
> +	if (attached) {
> +		cnt = 1;
> +		if (prog_ids &&
> +		    copy_to_user(prog_ids, &attached->aux->id, sizeof(u32))) {

Not sure you can do copy_to_user inside an RCU section, doesn't it
sleep?

> +			rcu_read_unlock();
> +			return -EFAULT;
> +		}
> +	}
> +	rcu_read_unlock();




[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