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: <BLU0-SMTP163BBDC6542FBE427D35350AC090@phx.gbl>
Date:	Tue, 29 Oct 2013 08:20:08 -0700
From:	Nathan Hintz <nlhintz@...mail.com>
To:	Rafał Miłecki <zajec5@...il.com>
CC:	Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH] bgmac: don't update slot on skb alloc/dma mapping error

On Tue, 29 Oct 2013 09:28:56 +0100
Rafał Miłecki <zajec5@...il.com> wrote:

> 2013/10/29 Nathan Hintz <nlhintz@...mail.com>:
> > On Tue, 29 Oct 2013 07:52:58 +0100
> > Rafał Miłecki <zajec5@...il.com> wrote:
> >
> >> 2013/10/29 Nathan Hintz <nlhintz@...mail.com>:
> >> > Don't update the slot in "bgmac_dma_rx_skb_for_slot" unless both the
> >> > skb alloc and dma mapping are successful; and free the newly allocated
> >> > skb if a dma mapping error occurs.  
> >> > returning when an error occurs.
> >>
> >> In case of bgmac_dma_rx_skb_for_slot failure we're giving up anyway
> >> (and freeing everything), but with your patch code is simpler to
> >> understand, so I'm OK with that.
> >>
> >> Acked-by: Rafał Miłecki <zajec5@...il.com>
> >>
> >
> > I might be misunderstanding; but it in the case of failure, it appeared to me
> > that the currently received packet was dropped and the old skb would continue
> > to be assigned to the slot and would be used to receive future packets (this
> > would continue until bgmac_dma_rx_skb_for_slot was successful).
> 
> I was commenting on current usage (.), not my WIP patch
> for bgmac_dma_rx_read :)
> 
> Your patch will be helpful for my bgmac_dma_rx_read rework.
> 
You're right, I was commenting to you WIP.  The commit message should probably
be changed to remove the statement "This will prevent an skb leak upon returning
when an error occurs", as this doesn't occur with the usage in bgmac_dma_alloc.
Unfortunately, I won't be able to send a revised patch until tonight.

Nathan


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