netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bernhard Walle <bwalle@suse.de>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: netdev@vger.kernel.org
Subject: Re: r8169: Crash after reloading driver if network hangs
Date: Mon, 29 Jan 2007 11:25:03 +0100	[thread overview]
Message-ID: <20070129102503.GA30182@strauss.suse.de> (raw)
In-Reply-To: <20070129075606.GA10598@electric-eye.fr.zoreil.com>

Hello,

* Francois Romieu <romieu@fr.zoreil.com> [2007-01-29 08:56]:
> Bernhard Walle <bwalle@suse.de> :
> 
> > @@ -1371,10 +1371,9 @@ static inline void rtl8169_request_timer
> >                 return;
> >  
> >         init_timer(timer);
> > -       timer->expires = jiffies + RTL8169_PHY_TIMEOUT;
> >         timer->data = (unsigned long)(dev);
> >         timer->function = rtl8169_phy_timer;
> > -       add_timer(timer);
> > +       mod_timer(timer, jiffies + RTL8169_PHY_TIMEOUT);
> >  }
> > 
> > But I think _this_ change is unnecessary, ...
> 
> add_timer() is not supposed to modify an existing timer whereas mod_timer()
> encompasses both 

that's clear.

> and the race exists in both direction as netif_running()
> is true as soon as dev_open() starts but way before dev->open() completes.

But rtl8169_request_timer() is only called from change_mtu() and
dev->open(). And, if you call init_timer(), you always have a new
timer, and the reference to an existing tp->timer will be lost.

> [...]
> > ... but that looks good (better than my patch) and should resolve the issue,
> > too. I can't test because it's triggered only if the network hangs and you
> > know, the last one isn't reproducable.
> 
> There will be something to test in the merge of realtek's stuff #2.

Great.


Regards,
Bernhard
-- 
SUSE LINUX Products GmbH                E-Mail:  bwalle@suse.de
Maxfeldstr. 5                           Phone:   +49 (911) 74053-0
90409 Nürnberg, Germany
OpenPGP DDAF6454: F61F 34CC 09CA FB82 C9F6  BA4B 8865 3696 DDAF 6454

      reply	other threads:[~2007-01-29 10:25 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-28 18:02 r8169: Crash after reloading driver if network hangs Bernhard Walle
2007-01-28 19:04 ` Francois Romieu
2007-01-28 19:56   ` Bernhard Walle
2007-01-29  7:56     ` Francois Romieu
2007-01-29 10:25       ` Bernhard Walle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070129102503.GA30182@strauss.suse.de \
    --to=bwalle@suse.de \
    --cc=netdev@vger.kernel.org \
    --cc=romieu@fr.zoreil.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).