lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 9 Sep 2015 22:23:34 +0200
From:	Francois Romieu <romieu@...zoreil.com>
To:	Corinna Vinschen <vinschen@...hat.com>
Cc:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
	pomidorabelisima@...il.com,
	Konrad Rzeszutek Wilk <konrad@...nel.org>,
	linux-kernel@...r.kernel.org, nic_swsd@...ltek.com
Subject: Re: [PATCH net] r8169: Fix sleeping function called during
 get_stats64

Corinna Vinschen <vinschen@...hat.com> :
[...]
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 24dcbe6..630811a 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
[...]
> +	if (!paddr)
> +		return false;

I guess this is the secret recipe.

What about replacing this part with an adequate barrier in rtl_init_one ?

[...]
> @@ -8447,9 +8411,14 @@ static int rtl_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
>  
>  	tp->rtl_fw = RTL_FIRMWARE_UNKNOWN;
>  
> +	tp->CntArray = dma_alloc_coherent (&pdev->dev, sizeof(*tp->CntArray),
> +					   &tp->CntPhysAddr, GFP_KERNEL);
> +	if (!tp->CntArray)
> +		goto err_out_cnt_4;
> +

rc is still zero here so rtl_init_one will return success.

>  	rc = register_netdev(dev);
>  	if (rc < 0)
> -		goto err_out_msi_4;
> +		goto err_out_msi_5;
>  
>  	pci_set_drvdata(pdev, dev);

-- 
Ueimor
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ