linux-next: manual merge of the net-next tree with the net tree

From: Stephen Rothwell
Date: Thu Aug 12 2021 - 21:24:46 EST


Hi all,

Today's linux-next merge of the net-next tree got a conflict in:

drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c

between commit:

5957cc557dc5 ("net/mlx5: Set all field of mlx5_irq before inserting it to the xarray")

from the net tree and commit:

2d0b41a37679 ("net/mlx5: Refcount mlx5_irq with integer")

from the net-next tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging. You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

--
Cheers,
Stephen Rothwell

diff --cc drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
index 3465b363fc2f,60bfcad1873c..000000000000
--- a/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c
@@@ -214,8 -234,7 +234,8 @@@ static struct mlx5_irq *irq_request(str
err = -ENOMEM;
goto err_cpumask;
}
+ irq->pool = pool;
- kref_init(&irq->kref);
+ irq->refcount = 1;
irq->index = i;
err = xa_err(xa_store(&pool->irqs, irq->index, irq, GFP_KERNEL));
if (err) {
@@@ -459,10 -475,13 +478,14 @@@ static void irq_pool_free(struct mlx5_i
struct mlx5_irq *irq;
unsigned long index;

+ /* There are cases in which we are destrying the irq_table before
+ * freeing all the IRQs, fast teardown for example. Hence, free the irqs
+ * which might not have been freed.
+ */
xa_for_each(&pool->irqs, index, irq)
- irq_release(&irq->kref);
+ irq_release(irq);
xa_destroy(&pool->irqs);
+ mutex_destroy(&pool->lock);
kvfree(pool);
}

Attachment: pgpKyQFFqGzzk.pgp
Description: OpenPGP digital signature