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:	Mon, 10 Mar 2014 20:44:27 -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 01/11] bonding: Call dev_kfree_skby_any instead of
 kfree_skb.

On Mon, 2014-03-10 at 20:18 -0700, Eric W. Biederman wrote:
> Replace kfree_skb with dev_kfree_skb_any in functions that can
> be called in hard irq and other contexts.
> 
> Replace consume_skb with dev_consume_skb_any in functions that can
> be called in hard irq and other contexts.
> 
> Signed-off-by: "Eric W. Biederman" <ebiederm@...ssion.com>
> ---
>  drivers/net/bonding/bond_3ad.c  |    2 +-
>  drivers/net/bonding/bond_alb.c  |    2 +-
>  drivers/net/bonding/bond_main.c |   14 +++++++-------
>  3 files changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c
> index a2ef3f72de88..dee2a84a2929 100644
> --- a/drivers/net/bonding/bond_3ad.c
> +++ b/drivers/net/bonding/bond_3ad.c
> @@ -2479,7 +2479,7 @@ out:
>  	return NETDEV_TX_OK;
>  err_free:
>  	/* no suitable interface, frame not sent */
> -	kfree_skb(skb);
> +	dev_kfree_skb_any(skb);
>  	goto out;
>  }
>  
> diff --git a/drivers/net/bonding/bond_alb.c b/drivers/net/bonding/bond_alb.c
> index aaeeacf767f2..9cf836b67b15 100644
> --- a/drivers/net/bonding/bond_alb.c
> +++ b/drivers/net/bonding/bond_alb.c
> @@ -1464,7 +1464,7 @@ int bond_alb_xmit(struct sk_buff *skb, struct net_device *bond_dev)
>  	}
>  
>  	/* no suitable interface, frame not sent */
> -	kfree_skb(skb);
> +	dev_kfree_skb_any(skb);
>  out:
>  	return NETDEV_TX_OK;
>  }
> diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
> index 730d72c706c9..63f8df8af4d4 100644
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -1115,7 +1115,7 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
>  	if (recv_probe) {
>  		ret = recv_probe(skb, bond, slave);
>  		if (ret == RX_HANDLER_CONSUMED) {
> -			consume_skb(skb);
> +			dev_consume_skb_any(skb);

Why is this needed ? AFAIK we run in softirq here.

>  			return ret;
>  		}
>  	}
> @@ -1132,7 +1132,7 @@ static rx_handler_result_t bond_handle_frame(struct sk_buff **pskb)
>  
>  		if (unlikely(skb_cow_head(skb,
>  					  skb->data - skb_mac_header(skb)))) {
> -			kfree_skb(skb);
> +			dev_kfree_skb_any(skb);

same here.

>  			return RX_HANDLER_CONSUMED;
>  		}
>  		ether_addr_copy(eth_hdr(skb)->h_dest, bond->dev->dev_addr);
> @@ -3548,7 +3548,7 @@ static void bond_xmit_slave_id(struct bonding *bond, struct sk_buff *skb, int sl
>  		}



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