From: Antonio Quartulli Date: Thu, 1 May 2014 23:35:13 +0000 (+0200) Subject: batman-adv: increase orig refcount when storing ref in gw_node X-Git-Tag: omap-for-v3.16/fixes-against-rc1~146^2~21^2~1 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=377fe0f968b30a1a714fab53a908061914f30e26;p=pandora-kernel.git batman-adv: increase orig refcount when storing ref in gw_node A pointer to the orig_node representing a bat-gateway is stored in the gw_node->orig_node member, but the refcount for such orig_node is never increased. This leads to memory faults when gw_node->orig_node is accessed and the originator has already been freed. Fix this by increasing the refcount on gw_node creation and decreasing it on gw_node free. Signed-off-by: Antonio Quartulli Signed-off-by: Marek Lindner --- Reading git-diff-tree failed