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  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:	Sun, 6 Sep 2015 12:19:54 +0200
From:	Corinna Vinschen <vinschen@...hat.com>
To:	netdev@...r.kernel.org
Cc:	David Miller <davem@...emloft.net>, pomidorabelisima@...il.com,
	Francois Romieu <romieu@...zoreil.com>
Subject: Re: [PATCH net 1/1] r8169: fix sleepable allocation during netdevice
 stats retrieval.

On Sep  4 22:59, Francois Romieu wrote:
> net/core/net-sysfs.c::netstat_show fetches statistics under dev_base_lock.
> 
> Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=104031
> Fixes: 6e85d5ad36a2 ("r8169: Add values missing in @get_stats64 from HW counters")
> Signed-off-by: Francois Romieu <romieu@...zoreil.com>
> Cc: Corinna Vinschen <vinschen@...hat.com>
> ---
> 
>  Applies against davem's net as of f1ccbfce2fc787981d1182d09c1f6b67766783a8.
> 
>  drivers/net/ethernet/realtek/r8169.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 24dcbe6..56829ea 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -2200,7 +2200,7 @@ static struct rtl8169_counters *rtl8169_map_counters(struct net_device *dev,
>  	struct rtl8169_counters *counters;
>  	u32 cmd;
>  
> -	counters = dma_alloc_coherent(d, sizeof(*counters), paddr, GFP_KERNEL);
> +	counters = dma_alloc_coherent(d, sizeof(*counters), paddr, GFP_ATOMIC);
>  	if (counters) {
>  		RTL_W32(CounterAddrHigh, (u64)*paddr >> 32);
>  		cmd = (u64)*paddr & DMA_BIT_MASK(32);
> -- 
> 2.4.3

I'll have a look tomorrow what I'm back to work, but for the time
being, two questions.

- The code worked for me in local testing without problem, so I'm rather
  puzzled.  How can I reproduce the problem?

- I'm pretty new to this stuff, so I don't understand this:

  The dma_alloc_coherent(...,GFP_KERNEL) call is not new in the code,
  it's there since at least 2010.  It appears to work fine in the
  context of @get_ethtool_stats.  Why does this not work in the context
  of @ndo_get_stats64?


Thanks,
Corinna

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists