From: Stephen Hemminger <shemminger@vyatta.com>
To: jamal <hadi@cyberus.ca>, David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Subject: mirred, redirect action vs. dev refcount issue
Date: Wed, 21 Jul 2010 16:24:26 -0700 [thread overview]
Message-ID: <20100721162426.5aa4b646@nehalam> (raw)
Both the mirrored and redirect TC actions, hold a pointer to the
target device and increment the refcount. The problem is that administrator
may want to remove the target device (for example ifb0) and this will
cause the kernel to get in the "can't delete ifb0 with references" state.
Fixing this isn't trivial but I think that the best way would be to have
the action API have a device notifier and walk the actions and call a new
hook (device_event) similar to existing walk. The device_event in the
action ops can then redirect any mirror/redirect that are going to a dead
device off to bit bucket.
Alternatively, the mirror/redirect could just use ifindex which is
a soft reference, so if device is removed, they just drop.
Lazy me favors the later.
next reply other threads:[~2010-07-21 23:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-21 23:24 Stephen Hemminger [this message]
2010-07-21 23:39 ` mirred, redirect action vs. dev refcount issue David Miller
2010-07-21 23:52 ` Stephen Hemminger
2010-07-21 23:58 ` David Miller
2010-07-22 0:00 ` Stephen Hemminger
2010-07-22 10:11 ` jamal
2010-07-22 17:42 ` Stephen Hemminger
2010-07-22 18:02 ` jamal
2010-07-23 4:45 ` [PATCH] net sched: fix race in mirred device removal Stephen Hemminger
2010-07-25 4:04 ` David Miller
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=20100721162426.5aa4b646@nehalam \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=hadi@cyberus.ca \
--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;
as well as URLs for NNTP newsgroup(s).