From: Santiago Leon Date: Wed, 26 Oct 2005 16:47:23 +0000 (-0600) Subject: [PATCH] ibmveth fix failed addbuf X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82702d37a559cf94fe238cd3f8ef63cf7fa699a9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] ibmveth fix failed addbuf This patch fixes a bug that happens when the hypervisor can't add a buffer. The old code wrote IBM_VETH_INVALID_MAP into the free_map array, so next time the index was used, a ibmveth_assert() caught it and called BUG(). The patch writes the right value into the free_map array so that the index can be reused. Signed-off-by: Santiago Leon Signed-off-by: Jeff Garzik --- diff --git a/drivers/net/ibmveth.c b/drivers/net/ibmveth.c index 987bcba01889..f5819527ec9d 100644 --- a/drivers/net/ibmveth.c +++ b/drivers/net/ibmveth.c @@ -237,7 +237,7 @@ static void ibmveth_replenish_buffer_pool(struct ibmveth_adapter *adapter, struc lpar_rc = h_add_logical_lan_buffer(adapter->vdev->unit_address, desc.desc); if(lpar_rc != H_Success) { - pool->free_map[free_index] = IBM_VETH_INVALID_MAP; + pool->free_map[free_index] = index; pool->skbuff[index] = NULL; pool->consumer_index--; dma_unmap_single(&adapter->vdev->dev,