From adaaa0c6ab89e82684389b80002bce893179cf2c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Linus=20L=C3=BCssing?= Date: Fri, 7 May 2010 21:47:06 +0200 Subject: [PATCH] Staging: batman-adv: only modify hna-table on active module MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If we haven't set the module to MODULE_ACTIVE state before (in general, no interface has yet been added to batman-adv) then the hna table is not initialised yet. If the kernel changes the mac address of the bat0 interface at this moment then an hna_local_add() called by interface_set_mac_addr() then resulted in a null pointer derefernce. With this patch we are now explicitly checking before if the state is MODULE_ACTIVE right now so that we can assume having an initialised hna table. Signed-off-by: Linus Lüssing Signed-off-by: Marek Lindner Signed-off-by: Andrew Lunn Signed-off-by: Greg Kroah-Hartman --- Reading git-format-patch failed