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: <e1e06281-16e9-edb8-dcda-7bdcf60507a7@solarflare.com>
Date:   Tue, 18 Feb 2020 15:34:46 +0000
From:   Edward Cree <ecree@...arflare.com>
To:     "Jason A. Donenfeld" <Jason@...c4.com>
CC:     <netdev@...r.kernel.org>
Subject: Re: [PATCH 6/8] net: sfc: use skb_list_walk_safe helper for gso
 segments

On 08/01/2020 21:59, Jason A. Donenfeld wrote:
> This is a straight-forward conversion case for the new function, and
> while we're at it, we can remove a null write to skb->next by replacing
> it with skb_mark_not_on_list.
>
> Signed-off-by: Jason A. Donenfeld <Jason@...c4.com>
> ---
>  drivers/net/ethernet/sfc/tx.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/ethernet/sfc/tx.c b/drivers/net/ethernet/sfc/tx.c
> index 00c1c4402451..547692b33b4d 100644
> --- a/drivers/net/ethernet/sfc/tx.c
> +++ b/drivers/net/ethernet/sfc/tx.c
> @@ -473,12 +473,9 @@ static int efx_tx_tso_fallback(struct efx_tx_queue *tx_queue,
>  	dev_consume_skb_any(skb);
>  	skb = segments;
>  
> -	while (skb) {
> -		next = skb->next;
> -		skb->next = NULL;
> -
> +	skb_list_walk_safe(skb, skb, next) {
Could this be replaced with
    skb_list_walk_safe(segments, skb, next) {
and elide the assignment just above?
Or is there some reason I'm missing not to do that?
-ed
> +		skb_mark_not_on_list(skb);
>  		efx_enqueue_skb(tx_queue, skb);
> -		skb = next;
>  	}
>  
>  	return 0;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ