An error occurred fetching the project authors.
  1. 01 Oct, 2020 1 commit
  2. 09 Sep, 2020 1 commit
  3. 08 May, 2019 1 commit
    • Sven Eckelmann's avatar
      batman-adv: Reduce claim hash refcnt only for removed entry · be807f9b
      Sven Eckelmann authored
      [ Upstream commit 4ba104f4 ]
      
      The batadv_hash_remove is a function which searches the hashtable for an
      entry using a needle, a hashtable bucket selection function and a compare
      function. It will lock the bucket list and delete an entry when the compare
      function matches it with the needle. It returns the pointer to the
      hlist_node which matches or NULL when no entry matches the needle.
      
      The batadv_bla_del_claim is not itself protected in anyway to avoid that
      any other function is modifying the hashtable between the search for the
      entry and the call to batadv_hash_remove. It can therefore happen that the
      entry either doesn't exist anymore or an entry was deleted which is not the
      same object as the needle. In such an situation, the reference counter (for
      the reference stored in the hashtable) must not be reduced for the needle.
      Instead the reference counter of the actually removed entry has to be
      reduced.
      
      Otherwise the reference counter will underflow and the object might be
      freed before all its references were dropped. The kref helpers reported
      this problem as:
      
        refcount_t: underflow; use-after-free.
      
      Fixes: 23721387 ("batman-adv: add basic bridge loop avoidance code")
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
      be807f9b
  4. 07 Sep, 2018 1 commit
  5. 23 Jun, 2018 1 commit
  6. 26 Feb, 2018 1 commit
  7. 25 Feb, 2018 2 commits
    • Sven Eckelmann's avatar
      batman-adv: Fix netlink dumping of BLA backbones · fce672db
      Sven Eckelmann authored
      The function batadv_bla_backbone_dump_bucket must be able to handle
      non-complete dumps of a single bucket. It tries to do that by saving the
      latest dumped index in *idx_skip to inform the caller about the current
      state.
      
      But the caller only assumes that buckets were not completely dumped when
      the return code is non-zero. This function must therefore also return a
      non-zero index when the dumping of an entry failed. Otherwise the caller
      will just skip all remaining buckets.
      
      And the function must also reset *idx_skip back to zero when it finished a
      bucket. Otherwise it will skip the same number of entries in the next
      bucket as the previous one had.
      
      Fixes: ea4152e1 ("batman-adv: add backbone table netlink support")
      Reported-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      fce672db
    • Sven Eckelmann's avatar
      batman-adv: Fix netlink dumping of BLA claims · b0264ecd
      Sven Eckelmann authored
      The function batadv_bla_claim_dump_bucket must be able to handle
      non-complete dumps of a single bucket. It tries to do that by saving the
      latest dumped index in *idx_skip to inform the caller about the current
      state.
      
      But the caller only assumes that buckets were not completely dumped when
      the return code is non-zero. This function must therefore also return a
      non-zero index when the dumping of an entry failed. Otherwise the caller
      will just skip all remaining buckets.
      
      And the function must also reset *idx_skip back to zero when it finished a
      bucket. Otherwise it will skip the same number of entries in the next
      bucket as the previous one had.
      
      Fixes: 04f3f5bf ("batman-adv: add B.A.T.M.A.N. Dump BLA claims via netlink")
      Reported-by: default avatarLinus Lüssing <linus.luessing@c0d3.blue>
      Signed-off-by: default avatarSven Eckelmann <sven@narfation.org>
      Signed-off-by: default avatarSimon Wunderlich <sw@simonwunderlich.de>
      b0264ecd
  8. 21 Dec, 2017 1 commit
  9. 15 Dec, 2017 3 commits
  10. 23 May, 2017 1 commit
  11. 22 Mar, 2017 3 commits
  12. 16 Mar, 2017 1 commit
  13. 26 Jan, 2017 1 commit
  14. 18 Jan, 2017 1 commit
    • Tobias Klauser's avatar
      net: Remove usage of net_device last_rx member · 4a7c9726
      Tobias Klauser authored
      The network stack no longer uses the last_rx member of struct net_device
      since the bonding driver switched to use its own private last_rx in
      commit 9f242738 ("bonding: use last_arp_rx in slave_last_rx()").
      
      However, some drivers still (ab)use the field for their own purposes and
      some driver just update it without actually using it.
      
      Previously, there was an accompanying comment for the last_rx member
      added in commit 4dc89133 ("net: add a comment on netdev->last_rx")
      which asked drivers not to update is, unless really needed. However,
      this commend was removed in commit f8ff080d ("bonding: remove
      useless updating of slave->dev->last_rx"), so some drivers added later
      on still did update last_rx.
      
      Remove all usage of last_rx and switch three drivers (sky2, atp and
      smc91c92_cs) which actually read and write it to use their own private
      copy in netdev_priv.
      
      Compile-tested with allyesconfig and allmodconfig on x86 and arm.
      
      Cc: Eric Dumazet <eric.dumazet@gmail.com>
      Cc: Jay Vosburgh <j.vosburgh@gmail.com>
      Cc: Veaceslav Falico <vfalico@gmail.com>
      Cc: Andy Gospodarek <andy@greyhouse.net>
      Cc: Mirko Lindner <mlindner@marvell.com>
      Cc: Stephen Hemminger <stephen@networkplumber.org>
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Reviewed-by: default avatarJay Vosburgh <jay.vosburgh@canonical.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4a7c9726
  15. 09 Aug, 2016 6 commits
  16. 05 Jul, 2016 2 commits
  17. 30 Jun, 2016 1 commit
  18. 10 May, 2016 2 commits
  19. 03 May, 2016 5 commits
  20. 23 Feb, 2016 4 commits
  21. 10 Feb, 2016 1 commit