[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120413100954.6fdc0f5c@nehalam.linuxnetplumber.net>
Date: Fri, 13 Apr 2012 10:09:54 -0700
From: Stephen Hemminger <shemminger@...tta.com>
To: Lino Sanfilippo <LinoSanfilippo@....de>
Cc: mlindner@...vell.com, davem@...emloft.net, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: sky2: in free_buffers() do proper checks before call of
rx_clean()
On Tue, 3 Apr 2012 02:13:27 +0200
Lino Sanfilippo <LinoSanfilippo@....de> wrote:
> In sky2_open() free_buffers() is called in case that alloc_buffers() failed.
> Here we do the check for sky2->rx_le too late, since we already called
> rx_clean() which accessed rx_le. Furthermore we lack a check for sky2->rx_ring
> which is also accessed by rx_clean().
>
> With this patch both sky2->rx_le and sky2->rx_ring are checked before
> alloc_buffers() is called.
>
> Signed-off-by: Lino Sanfilippo <LinoSanfilippo@....de>
Looking at sky2_alloc_buffers, it really needs to change to have
proper unwind instead. If some portion of the memory required isn't available
everything needs to be undone.
--
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