On Wed, Mar 31, 2021 at 9:41 AM Vlad Buslov <vla...@nvidia.com> wrote: > > With recent changes that separated action module load from action > initialization tcf_action_init() function error handling code was modified > to manually release the loaded modules if loading/initialization of any > further action in same batch failed. For the case when all modules > successfully loaded and some of the actions were initialized before one of > them failed in init handler. In this case for all previous actions the > module will be released twice by the error handler: First time by the loop > that manually calls module_put() for all ops, and second time by the action > destroy code that puts the module after destroying the action.
This is really strange. Isn't tc_action_load_ops() paired with module_put() under 'err_mod'? And the one in tcf_action_destroy() paired with tcf_action_init_1()? Is it the one below which causes the imbalance? 1038 /* module count goes up only when brand new policy is created 1039 * if it exists and is only bound to in a_o->init() then 1040 * ACT_P_CREATED is not returned (a zero is). 1041 */ 1042 if (err != ACT_P_CREATED) 1043 module_put(a_o->owner); 1044 Thanks.