Search Linux Wireless

Re: RFC: Reproducible oops with lockdep on count_matching_names()

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

 



On Thu, Nov 01, 2007 at 03:17:16PM -0400, Luis R. Rodriguez wrote:

> So I started reviewing the probes on each driver and came up with this
> patch because Documenation/pci.txt has:
> 
> "The device driver needs to call pci_request_region() to verify
> no other device is already using the same address resource.
> Conversely, drivers should call pci_release_region() AFTER
> calling pci_disable_device(). The idea is to prevent two devices 
> colliding on the same address range"

No idea off the top of my head if this relates to the problem or not...

> --- a/drivers/net/wireless/ath5k/base.c
> +++ b/drivers/net/wireless/ath5k/base.c
> @@ -602,10 +602,10 @@ err_free:
>  	ieee80211_free_hw(hw);
>  err_map:
>  	pci_iounmap(pdev, mem);
> -err_reg:
> -	pci_release_region(pdev, 0);
>  err_dis:
>  	pci_disable_device(pdev);
> +err_reg:
> +	pci_release_region(pdev, 0);
>  err:
>  	return ret;
>  }

If you do this, don't you need to change any "goto err_reg" to "goto
err_dis" as well?

> --- a/drivers/net/wireless/ipw2200.c
> +++ b/drivers/net/wireless/ipw2200.c
> @@ -11756,10 +11756,10 @@ static int ipw_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>  	priv->workqueue = NULL;
>        out_iounmap:
>  	iounmap(priv->hw_base);
> -      out_pci_release_regions:
> -	pci_release_regions(pdev);
>        out_pci_disable_device:
>  	pci_disable_device(pdev);
> +      out_pci_release_regions:
> +	pci_release_regions(pdev);
>  	pci_set_drvdata(pdev, NULL);
>        out_free_ieee80211:
>  	free_ieee80211(priv->net_dev);

Same as last comment, but for out_pci_release_regions and
out_pci_disable_device.

John
-- 
John W. Linville
linville@xxxxxxxxxxxxx
-
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

[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