On Wed, Jun 10, 2020 at 7:27 AM Ido Schimmel <ido...@idosch.org> wrote: > > @@ -548,7 +591,7 @@ static int genl_lock_done(struct netlink_callback *cb) > > rc = ops->done(cb); > > genl_unlock(); > > } > > - genl_family_rcv_msg_attrs_free(info->family, info->attrs, true); > > + genl_family_rcv_msg_attrs_free(info->family, info->attrs, false); > > Cong, > > This seems to result in a memory leak because 'info->attrs' is never > freed in the non-parallel case. > > Both the parallel and non-parallel code paths call genl_start() which > allocates the array, but the latter calls genl_lock_done() as its done() > callback which never frees it.
Good catch! Looks like I should just revert the above chunk. The last parameter of genl_family_rcv_msg_attrs_free() is just confusing, genl_lock_done() is clearly not parallel at all.. I will take a deeper look and send out a patch tomorrow. Thanks!