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] [day] [month] [year] [list]
Date:   Tue, 18 Feb 2020 16:54:03 +0100
From:   "Jason A. Donenfeld" <Jason@...c4.com>
To:     Edward Cree <ecree@...arflare.com>
Cc:     Netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH 6/8] net: sfc: use skb_list_walk_safe helper for gso segments

On Tue, Feb 18, 2020 at 4:35 PM Edward Cree <ecree@...arflare.com> wrote:
>
> 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?

Yes that's probably correct.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ