On 07/14, Namhyung Kim wrote:
>
> > And could someone explain me why apply_subsystem_event_filter("0") clears
> > ->filter_string first, then the whole ->filter? It seems that the only
> > thing filter_free_subsystem_preds() should do is filter_disable(), no?
> > IOW, why the patch below (on top of this series) is wrong?
>
> I also think that the original code is bit strange.  I agree with your
> change and name of the function should be changed to something like
> 'filter_disable_subsystem_filters' IMHO (it does nothing with preds).
> With this change, the apply_subsystem_event_filter can simply do below:
>
>       if (!strcmp(strstrip(filter_string), "0")) {
>               filter_disable_subsystem_filters(system, tr);
>               /* Ensure all filters are no longer used */
>               synchronize_sched();
>               filter_free_subsystem_filters(system, tr);
>               __free_filter(system->filter);
>               system->filter = NULL;
>               goto out_unlock;
>       }

Yes, thanks, this was my point.

And I thought that I saw the same pattern somewhere else, but can't recall
where... Will try to recheck.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to