When a buffer pool cannot be allocated in open(),
ibmveth_alloc_queue_buffer_pools() clears the pool's active flag.
Nothing sets it again except an MTU change or a pool sysfs write, so
every later open() runs without that pool, possibly without one large
enough for the MTU. With multi-queue RX, later in this series, every
queue copies queue 0's pool flags on open(), so a failure on queue 0
would disable that pool on all queues.

The clear came with commit 860f242eb534 ("[PATCH] ibmveth change
buffer pools dynamically"), whose unwind freed only active pools. The
unwind now frees every pool, and ibmveth_free_buffer_pool() handles
one that was never allocated, so the clear no longer serves the
unwind. Drop it, so open() still fails with -ENOMEM and the next
open() retries the pool. This only changes what happens after an
allocation failure, so it goes to net-next.

Found by code review; not reported from the field.

Fixes: 860f242eb534 ("[PATCH] ibmveth change buffer pools dynamically")
Signed-off-by: Mingming Cao <[email protected]>
---
 drivers/net/ethernet/ibm/ibmveth.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/ethernet/ibm/ibmveth.c 
b/drivers/net/ethernet/ibm/ibmveth.c
index e121faf50f04..388cfa43f514 100644
--- a/drivers/net/ethernet/ibm/ibmveth.c
+++ b/drivers/net/ethernet/ibm/ibmveth.c
@@ -866,7 +866,6 @@ static int ibmveth_alloc_queue_buffer_pools(struct 
ibmveth_adapter *adapter,
                                   queue, i,
                                   bpool->buff_size,
                                   bpool->size);
-                       bpool->active = 0;
                        /* Undo the pools this queue already allocated; the
                         * failed one freed its own partial allocation.
                         */
-- 
2.50.1 (Apple Git-155)


Reply via email to