[prev in list] [next in list] [prev in thread] [next in thread] 

List:       e1000-devel
Subject:    Re: [E1000-devel] [RFC PATCH] ixgbe: acquire RCU read lock when calling netdev_for_each_all_upper_de
From:       John Fastabend <john.r.fastabend () intel ! com>
Date:       2013-12-19 6:38:13
Message-ID: 52B29455.6010109 () intel ! com
[Download RAW message or body]

On 12/18/2013 10:00 PM, Jiang Liu wrote:
> According to documentation for netdev_for_each_all_upper_dev_rcu(),
> caller should take RCU read lock, otherwise it will trigger following
> warnings. The simplest fix is to protect with rcu_read_lock()/
> rcu_read_unlock(). And this solutions passes basic tests.
>
> Otherwise we may need to introduce  netdev_for_each_all_upper_dev()
> as netdev_lower_get_next_private(), which assumes the caller has
> gained the lock to protect the list.
>
> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
> ---

Jiang,

The following patch addresses the same issue,

http://patchwork.ozlabs.org/patch/302711/
  [net,1/5] net: allow netdev_all_upper_get_next_dev_rcu with rtnl lock held

It is under review and solves the problem by having the call check for
the rtnl lock as well. Take a look. I think it is a slightly better fix
in that it doesn't clutter the driver with unnecessary rcu_read_lock()
and rcu_read_unlock() calls.

Thanks,
John

------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
E1000-devel mailing list
E1000-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel&#174; Ethernet, visit http://communities.intel.com/community/wired
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic