Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Francesco Ruggeri <fruggeri@aristanetworks.com>
Cc: netdev@vger.kernel.org, "Eric W. Biederman" <ebiederm@xmission.com>
Subject: Re: [PATCH 1/1] ipv4: ipmr_expire_timer causes crash when removing net namespace
Date: Tue, 21 Aug 2012 07:29:51 +0200	[thread overview]
Message-ID: <1345526991.5158.373.camel@edumazet-glaptop> (raw)
In-Reply-To: <CA+HUmGgAx-APi4DRr=M2nUMfiO8yjcxovvqkTuX7=ZpUDbo5Tg@mail.gmail.com>

On Mon, 2012-08-20 at 17:15 -0700, Francesco Ruggeri wrote:
> I
> +static void ipmr_free_table(struct mr_table *mrt)
> +{
> +	del_timer(&mrt->ipmr_expire_timer);
> +	mroute_clean_tables(mrt);
> +	kfree(mrt);
> +}

Seems racy to me.

del_timer() doesnt make sure timer is completely disabled.

Probably need spin_lock_bh(&mfc_unres_lock) /
spin_unlock_bh(&mfc_unres_lock), and maybe del_timer_sync()

  reply	other threads:[~2012-08-21  5:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21  0:15 [PATCH 1/1] ipv4: ipmr_expire_timer causes crash when removing net namespace Francesco Ruggeri
2012-08-21  5:29 ` Eric Dumazet [this message]
2012-08-22 22:56   ` Francesco Ruggeri

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=1345526991.5158.373.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=fruggeri@aristanetworks.com \
    --cc=netdev@vger.kernel.org \
    /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