Search Linux Wireless

Re: [PATCH 1/4] create cfg80211

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2007-02-09 at 17:27 +0100, johannes@xxxxxxxxxxxxxxxx wrote:

This

> +void wiphy_free(struct wiphy *wiphy)
> +{
> +	if (wiphy->wiphy_index != -1)
> +		wiphy_sysfs_del(wiphy);
> +	else
> +		cfg80211_drv_free(wiphy_to_drv(wiphy));
> +}

and this

> +static void wiphy_class_dev_release(struct class_device *cdev)
> +{
> +	struct cfg80211_registered_driver *drv = cdev_to_drv(cdev);
> +
> +	cfg80211_drv_free(drv);
> +}

needs to be changed. wiphy_free() should wait for
wiphy_class_dev_release (to make sure sysfs is gone) before freeing the
structure (if it has ever been added to sysfs).

I'll respin both patchsets tomorrow. Until then, should you want to test
it and not just review the code, please just comment out the
cfg80211_drv_free(drv) in wiphy_class_dev_release, that'll give you a
memory leak though, but I have to leave and can't write the code
handling it with a completion etc. in under a minute ;)

johannes

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux