[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180219.113732.1002575230879716489.davem@davemloft.net>
Date: Mon, 19 Feb 2018 11:37:32 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: tlfalcon@...ux.vnet.ibm.com
Cc: netdev@...r.kernel.org, nfont@...ux.vnet.ibm.com,
jallen@...ux.vnet.ibm.com
Subject: Re: [PATCH net] ibmvnic: Clean RX pools only during a hard reset
From: Thomas Falcon <tlfalcon@...ux.vnet.ibm.com>
Date: Sun, 18 Feb 2018 10:08:40 -0600
> Sorry, this fixes a bug in commit d0869c0071e4. The cause of the
> bug is that "stale" RX buffers containing packet data are returned
> to the driver after device close and open. While most buffers will be
> returned with an error and handled by the polling routine, some buffers
> will be returned as containing valid data. Unfortunately, the socket
> buffers allocated were already freed when the device was closed, so
> attempts to process them result in a panic.
>
> RX pools still need to be cleaned in some cases, such as during
> a fatal reset. In all other cases, the socket buffers will either
> be freed in the polling routine or processed by the kernel.
>
> Fixes: d0869c0071e4 ("ibmvnic: Clean RX pool buffers during device close")
> Signed-off-by: Thomas Falcon <tlfalcon@...ux.vnet.ibm.com>
It really shouldn't matter who, or how many times, clear_rx_pools() is
called.
Anyone who calls it and frees the SKBs will mark the SKB slots as NULL,
so any subsequent call cannot possibly double free the buffers.
At best you need to explain the problem better in the commit message.
Powered by blists - more mailing lists