On 04/23, Jakub Kicinski wrote:
> 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?
Good point, I need to copy that aux->id somewhere and exit rcu section.

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

Reply via email to