Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Sep 2010 06:45:07 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        cvs-src-old@freebsd.org
Subject:   cvs commit: src/sys/kern kern_linker.c subr_kdb.c subr_stack.c
Message-ID:  <201009220645.o8M6jWUL047896@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
avg         2010-09-22 06:45:07 UTC

  FreeBSD src repository

  Modified files:
    sys/kern             kern_linker.c subr_kdb.c subr_stack.c 
  Log:
  SVN rev 212994 on 2010-09-22 06:45:07Z by avg
  
  kdb_backtrace: use stack_print_ddb instead of stack_print
  
  This is a followup to r212964.
  stack_print call chain obtains linker sx lock and thus potentially may
  lead to a deadlock depending on a kind of a panic.
  stack_print_ddb doesn't acquire any locks and it doesn't use any
  facilities of ddb backend.
  Using stack_print_ddb outside of DDB ifdef required taking a number of
  helper functions from under it as well.
  
  It is a good idea to rename linker_ddb_* and stack_*_ddb functions to
  have 'unlocked' component in their name instead of 'ddb', because those
  functions do not use any DDB services, but instead they provide unlocked
  access to linker symbol information.  The latter was previously needed
  only for DDB, hence the 'ddb' name component.
  
  Alternative is to ditch unlocked versions altogether after implementing
  proper panic handling:
  1. stop other cpus upon a panic
  2. make all non-spinlock lock operations (mutex, sx, rwlock) be a no-op
     when panicstr != NULL
  
  Suggested by:   mdf
  Discussed with: attilio
  MFC after:      2 weeks
  
  Revision  Changes    Path
  1.180     +2 -2      src/sys/kern/kern_linker.c
  1.31      +1 -1      src/sys/kern/subr_kdb.c
  1.11      +1 -5      src/sys/kern/subr_stack.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009220645.o8M6jWUL047896>