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]
Message-ID: <1308484571.3539.73.camel@edumazet-laptop>
Date:	Sun, 19 Jun 2011 13:56:11 +0200
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	Richard Cochran <richardcochran@...il.com>
Cc:	netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
	Grant Likely <grant.likely@...retlab.ca>
Subject: Re: [PATCH 05/11] fec_mpc52xx: enable transmit and receive time
 stamping.

Le dimanche 19 juin 2011 à 13:20 +0200, Richard Cochran a écrit :
> This patch enables software (and phy device) time stamping. Software
> time stamping using the SO_TIMESTAMPING API was tested and found to be
> working on the LITE5200B board.
> 
> Cc: Grant Likely <grant.likely@...retlab.ca>
> Signed-off-by: Richard Cochran <richard.cochran@...cron.at>
> ---
>  drivers/net/fec_mpc52xx.c |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/fec_mpc52xx.c b/drivers/net/fec_mpc52xx.c
> index 9f81b1a..102bdbc 100644
> --- a/drivers/net/fec_mpc52xx.c
> +++ b/drivers/net/fec_mpc52xx.c
> @@ -337,6 +337,7 @@ static int mpc52xx_fec_start_xmit(struct sk_buff *skb, struct net_device *dev)
>  
>  	bcom_submit_next_buffer(priv->tx_dmatsk, skb);
>  	spin_unlock_irqrestore(&priv->lock, flags);

same problem here : You should call skb_tx_timestamp() before the lock
release, or an interrupt might already freed this skb.

> +	skb_tx_timestamp(skb);
>  
>  	if (bcom_queue_full(priv->tx_dmatsk)) {
>  		netif_stop_queue(dev);
> @@ -434,7 +435,8 @@ static irqreturn_t mpc52xx_fec_rx_interrupt(int irq, void *dev_id)
>  		length = status & BCOM_FEC_RX_BD_LEN_MASK;
>  		skb_put(rskb, length - 4);	/* length without CRC32 */
>  		rskb->protocol = eth_type_trans(rskb, dev);
> -		netif_rx(rskb);
> +		if (!skb_defer_rx_timestamp(skb))
> +			netif_rx(rskb);
>  
>  		spin_lock(&priv->lock);
>  	}


--
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