[ofa-general] ***SPAM*** Re: [PATCH v2] ipoib: fix hang while bringing down uninitialized interface
Yossi Etigin
yossi.openib at gmail.com
Wed Oct 15 01:17:49 PDT 2008
Looks OK to me.
Roland Dreier wrote:
> > Fix bug #1172: If a pkey for an interface is not found during
> > initialization, then poll_timer is left uninitialized. When the
> > device is brought down, ipoib tries to del_timer_sync() it. This
> > call hangs in an infinite loop in lock_timer_base(), because
> > timer_base is NULL. We should check whether the timer was really
> > initialized.
>
> Sorry for being so slow to get to this.
>
> But does it work to just make sure the timer is always initialized?
> Seems cleaner that way, and it makes the code an insignificant bit
> smaller as a bonus. ie does the patch below fix things too?
>
> drivers/infiniband/ulp/ipoib/ipoib_ib.c | 7 +++----
> 1 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> index 0e748ae..28eb6f0 100644
> --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c
> @@ -685,10 +685,6 @@ int ipoib_ib_dev_open(struct net_device *dev)
> queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task,
> round_jiffies_relative(HZ));
>
> - init_timer(&priv->poll_timer);
> - priv->poll_timer.function = ipoib_ib_tx_timer_func;
> - priv->poll_timer.data = (unsigned long)dev;
> -
> set_bit(IPOIB_FLAG_INITIALIZED, &priv->flags);
>
> return 0;
> @@ -906,6 +902,9 @@ int ipoib_ib_dev_init(struct net_device *dev, struct ib_device *ca, int port)
> return -ENODEV;
> }
>
> + setup_timer(&priv->poll_timer, ipoib_ib_tx_timer_func,
> + (unsigned long) dev);
> +
> if (dev->flags & IFF_UP) {
> if (ipoib_ib_dev_open(dev)) {
> ipoib_transport_dev_cleanup(dev);
>
More information about the general
mailing list