git: kernel - Fix bug in lwkt_token_swap()

Matthew Dillon dillon at crater.dragonflybsd.org
Fri Oct 7 00:26:26 PDT 2011


commit 315422416abed4ef71e97ac2d2a35d23e4a4827a
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Oct 7 00:22:09 2011 -0700

    kernel - Fix bug in lwkt_token_swap()
    
    * Fix a bug where lwkt_token_swap() would incorrectly assign the ref
      pointer when the top two tokens on the stack are the same token.
    
      When swapping the top two tokens where tok1 == tok2, the token
      can wind up being repointed to the top ref instead of the deeper
      ref.  When the top ref is released this caused the token to also
      release even though there was another deeper ref to the same
      token.
    
    * Effected the vm_object traversal code and could cause an object token
      to be effectively lost without triggering a panic, resulting in
      corruption.

Summary of changes:
 sys/kern/lwkt_token.c |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/315422416abed4ef71e97ac2d2a35d23e4a4827a


-- 
DragonFly BSD source repository





More information about the Commits mailing list