On Mittwoch, 14. Dezember 2016 21:03:05 CET Sven Eckelmann wrote:
On Donnerstag, 6. Oktober 2016 08:41:40 CET Linus Lüssing wrote:
void *ctx = batadv_tvlv_ogm_pack_ctx(orig_node);
const struct ethhdr *ethhdr = eth_hdr(skb);
unsigned int tvlv_offset = sizeof(*ogm2);
Haven't checked the complete code yet but isn't an increase of the reference counter for orig_node missing here? Things like batadv_gw_tvlv_ogm_handler would then have to take care of dropping the reference.
Ok, forget that. batadv_tvlv_containers_process2 (which is the only user of ctx) is directly calling the function and not delaying anything. I was under the impression that their might be an delay.
But I am really not sure why you are using batadv_tvlv_ogm_pack_ctx anyway. You should be able to use "void *ctx" in batadv_tvlv_ogm_pack_ctx parameter and then give it an struct batadv_orig_node *. Or is is just for the WARN_ON?
Same for batadv_tvlv_ogm_unpack_ctx
Kind regards, Sven