git: kernel - Fix bug in lwkt_token_swap()

Matthew Dillon dillon at
Fri Oct 7 00:26:26 PDT 2011

commit 315422416abed4ef71e97ac2d2a35d23e4a4827a
Author: Matthew Dillon <dillon at>
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
    * Effected the vm_object traversal code and could cause an object token
      to be effectively lost without triggering a panic, resulting in

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

DragonFly BSD source repository

More information about the Commits mailing list