On 28-3-2017 16:25, Johannes Berg wrote: > >>>> - if (rdev->ops->resume) { >>>> - rtnl_lock(); >>>> - if (rdev->wiphy.registered) >>>> - ret = rdev_resume(rdev); >>>> - rtnl_unlock(); >>>> - } >>>> + rtnl_lock(); >>>> + if (rdev->wiphy.registered && rdev->ops->resume) >>>> + ret = rdev_resume(rdev); >>>> + rtnl_unlock(); >>> >>> Hmm? Commit message seems ... old perhaps? >> >> Hmmm, why? Before the patch rdev->ops was accessed before checking >> rdev->wiphy.registered. When rdev->wiphy.registers is false we no >> longer access rdev->ops after the patch. So a driver doing a >> wiphy_unregister() can safely kfree() the callback struct after it. > > Oh, right. Looks like I misinterpreted things. So apparently my choice of words was poor. Do you want me to rephrase? Regards, Arend