]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
decnet: use __dev_get_by_index instead of dev_get_by_index to find interface
authorYing Xue <ying.xue@windriver.com>
Wed, 15 Jan 2014 02:23:40 +0000 (10:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jan 2014 02:50:46 +0000 (18:50 -0800)
commitd4c5fba2f6c272ed687fe6351e5b20bc60cf24f0
tree52c2a24ee3b90543b4a5e4d28b6fd513570f185e
parentd9ac62be5740272f495154469cc9f77feb8d541a
decnet: use __dev_get_by_index instead of dev_get_by_index to find interface

The following call chain we can identify that dn_cache_getroute() is
protected under rtnl_lock. So if we use __dev_get_by_index() instead
of dev_get_by_index() to find interface handlers in it, this would help
us avoid to change interface reference counter.

rtnetlink_rcv()
  rtnl_lock()
    netlink_rcv_skb()
      dn_cache_getroute()
  rtnl_unlock()

Signed-off-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/decnet/dn_route.c