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:	Tue, 25 Mar 2014 06:10:32 -0700
From:	Eric Dumazet <eric.dumazet@...il.com>
To:	"Eric W. Biederman" <ebiederm@...ssion.com>
Cc:	David Miller <davem@...emloft.net>, netdev@...r.kernel.org,
	xiyou.wangcong@...il.com, mpm@...enic.com, satyam.sharma@...il.com
Subject: Re: [PATCH 05/54] bfin_mac: Call dev_consume_skb_any instead of
 dev_kfree_skb.

On Mon, 2014-03-24 at 23:04 -0700, Eric W. Biederman wrote:
> From: "Eric W. Biederman" <ebiederm@...ssion.com>
> 
> Replace dev_kfree_skb with dev_consume_skb_any in _tx_reclaim_skb that
> can be called in hard irq and other contexts.
> 
> dev_consume_skb is used as _tx_reclaim_skb is called after a packet
> has been successfully transmitted.
> 
> Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> ---
>  drivers/net/ethernet/adi/bfin_mac.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/adi/bfin_mac.c b/drivers/net/ethernet/adi/bfin_mac.c
> index 83a8cdbcd936..95779b6b7394 100644
> --- a/drivers/net/ethernet/adi/bfin_mac.c
> +++ b/drivers/net/ethernet/adi/bfin_mac.c
> @@ -1087,7 +1087,7 @@ static inline void _tx_reclaim_skb(void)
>  		tx_list_head->desc_a.config &= ~DMAEN;
>  		tx_list_head->status.status_word = 0;
>  		if (tx_list_head->skb) {
> -			dev_kfree_skb(tx_list_head->skb);
> +			dev_consume_skb_any(tx_list_head->skb);
>  			tx_list_head->skb = NULL;
>  		}
>  		tx_list_head = tx_list_head->next;

Acked-by: Eric Dumazet <edumazet@...gle.com>

Note this driver has a race in tx_reclaim_skb_timeout(), calling
tx_reclaim_skb() without any lock (under timer interrupt, thats all)



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