netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mirred, redirect action vs. dev refcount issue
@ 2010-07-21 23:24 Stephen Hemminger
  2010-07-21 23:39 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Stephen Hemminger @ 2010-07-21 23:24 UTC (permalink / raw)
  To: jamal, David Miller; +Cc: netdev

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.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-07-25  4:04 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-21 23:24 mirred, redirect action vs. dev refcount issue Stephen Hemminger
2010-07-21 23:39 ` 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

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).