Skip to content
  1. Aug 14, 2017
    • Jakub Sitnicki's avatar
      rtnelink: Move link dump consistency check out of the loop · d0225784
      Jakub Sitnicki authored
      
      
      Calls to rtnl_dump_ifinfo() are protected by RTNL lock. So are the
      {list,unlist}_netdevice() calls where we bump the net->dev_base_seq
      number.
      
      For this reason net->dev_base_seq can't change under out feet while
      we're looping over links in rtnl_dump_ifinfo(). So move the check for
      net->dev_base_seq change (since the last time we were called) out of the
      loop.
      
      This way we avoid giving a wrong impression that there are concurrent
      updates to the link list going on while we're iterating over them.
      
      Signed-off-by: default avatarJakub Sitnicki <jkbs@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      d0225784
  2. Aug 12, 2017