On 18 January 2015 at 19:26, Hauke Mehrtens <hauke@xxxxxxxxxx> wrote: > On 01/16/2015 10:47 PM, Rafał Miłecki wrote: >> Signed-off-by: Rafał Miłecki <zajec5@xxxxxxxxx> >> --- >> This code was introduced by Saul in >> ee91592711ed90a1abfbb1b2ceadded11d685164 >> bcma: don't leak memory for PCIE, MIPS, GBIT cores >> >> I don't really see reason for making it in so complicated way. >> I tested my patch for crashes, but didn't really try kmemleak. >> Is my simple solution OK? Or am I missing something? Anyone? > > Are you sure no device driver accesses the chipcommon, pcie or mips core > in the unregister part? If some device driver does something in his > remove function with e.g. chipcommon it will cause problems when the > chipcommon core was already freed. It didn't crash anything for me, but your point is correct. I'll change the logic to first unregister and then free cores. -- Rafał -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html