1. 02 5月, 2011 1 次提交
  2. 18 4月, 2011 3 次提交
  3. 05 3月, 2011 17 次提交
  4. 31 1月, 2011 1 次提交
  5. 16 1月, 2011 1 次提交
    • S
      batman-adv: Use "__attribute__" shortcut macros · aa0adb1a
      Sven Eckelmann 提交于
      Linux 2.6.21 defines different macros for __attribute__ which are also
      used inside batman-adv. The next version of checkpatch.pl warns about
      the usage of __attribute__((packed))).
      
      Linux 2.6.33 defines an extra macro __always_unused which is used to
      assist source code analyzers and can be used to removed the last
      existing __attribute__ inside the source code.
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      aa0adb1a
  6. 17 12月, 2010 1 次提交
  7. 30 11月, 2010 6 次提交
  8. 21 10月, 2010 1 次提交
  9. 21 9月, 2010 3 次提交
    • S
      Staging: batman-adv: Use refcnt to track usage count of batman_if · 47f621dd
      Sven Eckelmann 提交于
      get_batman_if_by_netdev and get_active_batman_if may leak data from the
      rcu protected list of interfaces. The rcu protected list of all gateway
      nodes leaks the actual data outside the read-side critical area. This is
      not valid as we may free the data using a call_rcu created callback
      after we unlock using rcu_read_unlock. A workaround is to provide a
      reference count to be sure that the memory isn't freed to early.
      
      It is currently only to implement the already existing functionality and
      doesn't provide the full tracking of all usage cases.
      
      Additionally, we must hardif_hold inside the
      rcu_read_lock()..rcu_read_unlock() before we attach to the structure
      which "leaks" it. When another function now removed it from its usage
      context (primary_if, usage on stack, ...) then we must hardif_put it. If
      it is decremented to zero then we can issue the call_rcu to the freeing
      function. So "put" is not allowed inside an rcu_read_lock.
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      47f621dd
    • S
      Staging: batman-adv: Use synchronize_rcu instead of call_rcu · 16f9530e
      Sven Eckelmann 提交于
      It is recommended [1] to use synchronize_rcu to simplify the code -
      especially when otherwise extra locking is needed to protect other code
      from picking stale elements. It also protects us for emitting to many
      callbacks which may results in OOM conditions.
      
      The only reason not to use it, would be in performance critical sections
      or when we are not allowed to block.
      
      [1] Documentation/RCU/checklist.txt
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      16f9530e
    • S
      Staging: batman-adv: checkpatch cleanup of comments · 1612ae99
      Sven Eckelmann 提交于
      checkpatch now detects the start of a comment and warns about usage of
      multiple spaces at the beginning of a line. We have to replace the '   '
      in multiple lines comments by ' * ' to fix it.
      
      Checkpatch also wants a comment after a definition of a spinlock_t which
      describes what it protects. It is currently not possible to add it
      before the actual struct which includes the spinlock.
      Signed-off-by: NSven Eckelmann <sven.eckelmann@gmx.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      1612ae99
  10. 15 9月, 2010 1 次提交
  11. 05 9月, 2010 5 次提交