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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1324289995.3323.110.camel@edumazet-laptop>
Date:	Mon, 19 Dec 2011 11:19:55 +0100
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	igorm@....rs
Cc:	netdev@...r.kernel.org, davem@...emloft.net, nic_swsd@...ltek.com,
	romieu@...zoreil.com, therbert@...gle.com
Subject: Re: [PATCH net-next] r8169: Support for byte queue limits

Le lundi 19 décembre 2011 à 11:09 +0100, igorm@....rs a écrit :
> From: Igor Maravic <igorm@....rs>
> 
> Changes to r8169 to use byte queue limits.
> 
> Signed-off-by: Igor Maravic <igorm@....rs>
> ---
>  drivers/net/ethernet/realtek/r8169.c |   13 +++++++++++--
>  1 files changed, 11 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/realtek/r8169.c b/drivers/net/ethernet/realtek/r8169.c
> index 36b2a4b..1a6a12a 100644
> --- a/drivers/net/ethernet/realtek/r8169.c
> +++ b/drivers/net/ethernet/realtek/r8169.c
> @@ -5326,6 +5326,7 @@ static void rtl8169_tx_clear(struct rtl8169_private *tp)
>  {
>  	rtl8169_tx_clear_range(tp, tp->dirty_tx, NUM_TX_DESC);
>  	tp->cur_tx = tp->dirty_tx = 0;
> +	netdev_reset_queue(tp->dev);
>  }
>  
>  static void rtl8169_schedule_work(struct net_device *dev, work_func_t task)
> @@ -5546,6 +5547,8 @@ static netdev_tx_t rtl8169_start_xmit(struct sk_buff *skb,
>  
>  	tp->cur_tx += frags + 1;
>  
> +	netdev_sent_queue(dev, skb->len);
> +

Hmm, thats a bit too late here. An interrupt could theorically free skb
right before your deref.


>  	wmb();
>  
>  	RTL_W8(TxPoll, NPQ);
> @@ -5624,6 +5627,8 @@ static void rtl8169_tx_interrupt(struct net_device *dev,

I believe its better to access skb _before_ the

txd->opts2 = cpu_to_le32(opts[1]);
wmb();



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ