[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20080506235937.GK2217@solarflare.com>
Date: Wed, 7 May 2008 00:59:39 +0100
From: Ben Hutchings <bhutchings@...arflare.com>
To: Stephen Hemminger <shemminger@...ux-foundation.org>
Cc: Jeff Garzik <jgarzik@...ox.com>,
David Miller <davem@...emloft.net>, netdev@...r.kernel.org
Subject: Re: [PATCH 3/4] sky2: Hold RTNL while calling dev_close()
Stephen Hemminger wrote:
> On Tue, 6 May 2008 19:39:58 +0100
> Ben Hutchings <bhutchings@...arflare.com> wrote:
>
> > dev_close() must be called holding the RTNL. Compile-tested only.
> >
> > Signed-off-by: Ben Hutchings <bhutchings@...arflare.com>
> > ---
> > drivers/net/sky2.c | 2 ++
> > 1 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c
> > index f226bca..9b046dd 100644
> > --- a/drivers/net/sky2.c
> > +++ b/drivers/net/sky2.c
> > @@ -2952,7 +2952,9 @@ static void sky2_restart(struct work_struct *work)
> > if (err) {
> > printk(KERN_INFO PFX "%s: could not restart %d\n",
> > dev->name, err);
> > + rtnl_lock();
> > dev_close(dev);
> > + rtnl_unlock();
> > }
> > }
> > }
> >
>
> No this is bogus. The rtnl mutex is already held.
> Look a little wider
<snip>
Sorry about that. I made a list of functions to check and then edited
them in a second pass. The function that needs locking in sky2.c is
sky2_resume() not sky2_restart().
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
--
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