From: Sven Eckelmann Date: Sat, 21 Aug 2010 12:18:09 +0000 (+0200) Subject: Staging: batman-adv: Don't use net_dev after dev_put X-Git-Tag: v2.6.36-rc3~38^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=51a00eaf6e008b60943af6ab68c17ac3622208dc;p=pandora-kernel.git Staging: batman-adv: Don't use net_dev after dev_put dev_put allows a device to be freed when all its references are dropped. After that we are not allowed to access that information anymore. Access to the data structure of a net_device must be surrounded a dev_hold and ended using dev_put. batman-adv adds a device to its own management structure in hardif_add_interface and will release it in hardif_remove_interface. Thus it must hold a reference all the time between those functions to prevent any access to the already released net_device structure. Reported-by: Tim Glaremin Signed-off-by: Sven Eckelmann Cc: stable Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed