[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20150511.134008.7539040783838247.davem@davemloft.net>
Date: Mon, 11 May 2015 13:40:08 -0400 (EDT)
From: David Miller <davem@...emloft.net>
To: amirv@...lanox.com
Cc: netdev@...r.kernel.org, ogerlitz@...lanox.com, talal@...lanox.com,
achiad@...lanox.com, saeedm@...lanox.com
Subject: Re: [PATCH net-next V3 02/11] net/mlx5_core: Add EQ renaming
mechanism
From: Amir Vadai <amirv@...lanox.com>
Date: Sun, 10 May 2015 12:38:57 +0300
> +int mlx5_rename_eq(struct mlx5_core_dev *dev, int eq_ix, char *name)
> +{
> + struct mlx5_priv *priv = &dev->priv;
> + struct mlx5_eq_table *table = &priv->eq_table;
> + struct mlx5_eq *eq;
> + int err = -ENOENT;
> +
> + spin_lock(&table->lock);
> + list_for_each_entry(eq, &table->comp_eqs_list, list) {
> + if (eq->index == eq_ix) {
> + snprintf(priv->irq_info[eq_ix].name, MLX5_MAX_IRQ_NAME,
> + "%s-%d", name, eq_ix);
> + err = 0;
> + break;
> + }
> + }
> + spin_unlock(&table->lock);
> +
> + return err;
> +}
You have to be very careful with this.
If you change these names after the request_irq() call(s), the new name string
will not propagate to /proc/interrupts output etc.
Looking at your later patches, this seems to be invoked very late in
mlx5e_open_locked(), so I am concerned.
--
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