1. 13 3月, 2015 18 次提交
  2. 12 3月, 2015 20 次提交
  3. 11 3月, 2015 2 次提交
    • J
      tipc: ensure that idle links are deleted when a bearer is disabled · 169bf912
      Jon Paul Maloy 提交于
      commit afaa3f65
      (tipc: purge links when bearer is disabled) was an attempt to resolve
      a problem that turned out to have a more profound reason.
      
      When we disable a bearer, we delete all its pertaining links if
      there is no other bearer to perform failover to, or if the module
      is shutting down. In case there are dual bearers, we wait with
      deleting links until the failover procedure is finished.
      
      However, this misses the case when a link on the removed bearer
      was already down, so that there will be no failover procedure to
      finish the link delete. This causes confusion if a new bearer is
      added to replace the removed one, and also entails a small memory
      leak.
      
      This commit takes the current state of the link into account when
      deciding when to delete it, and also reverses the above-mentioned
      commit.
      Reviewed-by: NErik Hugne <erik.hugne@ericsson.com>
      Signed-off-by: NJon Maloy <jon.maloy@ericsson.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      169bf912
    • A
      fib_trie: Address possible NULL pointer dereference in resize · ddb4b9a1
      Alexander Duyck 提交于
      If the inflate call failed it would return NULL.  As a result tp would be
      set to NULL and cause use to trigger a NULL pointer dereference in
      should_halve if the inflate failed on the first attempt.
      
      In order to prevent this we should decrement max_work before we actually
      attempt to inflate as this will force us to exit before attempting to halve
      a node we should have inflated.  In order to keep things symmetric between
      inflate and halve I went ahead and also moved the decrement of max_work for
      the halve case as well so we take care of that before we actually attempt
      to halve the tnode.
      
      Fixes: 88bae714 ("fib_trie: Add key vector to root, return parent key_vector in resize")
      Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NAlexander Duyck <alexander.h.duyck@redhat.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ddb4b9a1