On Tue, Jun 27, 2023 at 8:21 AM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > On Tue, Jun 27, 2023 at 07:39:17AM +0300, Tzvetomir Stoyanov wrote: > > On Mon, Jun 26, 2023 at 4:35 PM Dan Carpenter <dan.carpenter@xxxxxxxxxx> wrote: > > > > > > If enable_eprobe() function fails, then we call disable_eprobe() on the > > > "ep" that failed. That doesn't feel right. Shouldn't we > > > call disable_eprobe() on the previous "ep" instead? Or even better on > > > all the previous eps (but I don't know how to do that)... > > > > Hi Dan, > > There is no need to disable the eprobes which are already successfully > > registered to the given trace probe, as they will be disabled using > > the normal logic. The failed epropbe is not registered there, that's > > why it must be disabled explicitly. Thanks for digging into that > > code! > > Okay, but if the loop fails on the first iteration then it won't disable > the first ep. Is that an issue? > I looked at the code again, you are right - there is a problem. Indeed, that clean-up logic looks totally wrong, all eporbes must be disabled. I'll submit a patch. Thanks Dan. > regards, > dan carpenter > -- Tzvetomir (Ceco) Stoyanov VMware Open Source Technology Center