batman-adv: Correct rcu refcounting for gw_node
Sent from my HTC PURE™, a Windows® phone from AT&T
-----Original Message-----
From: Marek Lindner <[email protected]>
Sent: Wednesday, February 02, 2011 2:49 PM
To: The list for a Better Approach To Mobile Ad-hoc Networking <[email protected]>
Subject: Re: [B.A.T.M.A.N.] [PATCH] Re: batman-adv: Correct rcu refcounting for gw_node
Quoted 7 lines · On Wednesday 02 February 2011 18:37:18 Linus Lüssing wrote:
So after some more discussions with Marek and Sven, it looks like we have to use the rcu protected macros
rcu_dereference()andrcu_assign_pointer()for thebat_priv->curr_gwandcurr_gw->orig_node.Changes here also include moving the
kref_get()fromunicast_send_skb()intogw_get_selected(). Theorig_nodecould have been freed already at the time thekref_get()was called inunicast_send_skb().
I'd suggest you make a standalone patch because the patches address different problems.
Thanks,
Marek