[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20110718202420.0bcf00f9@asterix.rh>
Date: Mon, 18 Jul 2011 20:24:20 -0300
From: Flavio Leitner <fbl@...hat.com>
To: Flavio Leitner <fbl@...hat.com>
Cc: "Michael Chan" <mchan@...adcom.com>, davem@...emloft.net,
netdev@...r.kernel.org
Subject: Re: [PATCH net-next] bnx2: Close device if tx_timeout reset fails
On Sat, 16 Jul 2011 00:16:06 -0300
Flavio Leitner <fbl@...hat.com> wrote:
> On Fri, 15 Jul 2011 09:53:58 -0700
> "Michael Chan" <mchan@...adcom.com> wrote:
> ...
> > To fix it, we call dev_close() if bnx2_init_nic() fails.
> > One minor wrinkle to deal with is the cancel_work_sync()
> > call in bnx2_close() to cancel bnx2_reset_task(). The
> > call will wait forever because it is trying to cancel
> > itself and the workqueue will be stuck.
> >
> > Since bnx2_reset_task() holds the rtnl_lock() and checks
> > for netif_running() before proceeding, there is no need
> > to cancel bnx2_reset_task() in bnx2_close() even if
> > bnx2_close() and bnx2_reset_task() are running concurrently.
> > The rtnl_lock() serializes the 2 calls.
> >
> > We need to move the cancel_work_sync() call to
> > bnx2_remove_one() to make sure it is canceled before freeing
> > the netdev struct.
>
> It looks good. I'm traveling now, so I'll test this on Monday.
>
I have patched the kernel to inject the error and it works as
expected.
thanks,
fbl
--
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