kldunload DIAGNOSTIC idea...

From: Poul-Henning Kamp (phk_at_phk.freebsd.dk)
Date: 07/20/04

  • Next message: Brian Fundakowski Feldman: "Re: kldunload DIAGNOSTIC idea..."
    To: arch@freebsd.org
    Date: Tue, 20 Jul 2004 20:20:23 +0200
    
    

    I'm pulling hair out trying to make it guaranteed safe to unload device
    driver modules, and the major pain here is to make sure there is no
    thread stuck somewhere inside the code.

    That gave me the idea for a simple little DIAGNOSTIC check for kldunload:
    run through the proc/thread table and look for any thread with an
    instruction counter inside the range of pages we are going to unload.

    Any takers ?

    -- 
    Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
    phk@FreeBSD.ORG         | TCP/IP since RFC 956
    FreeBSD committer       | BSD since 4.3-tahoe
    Never attribute to malice what can adequately be explained by incompetence.
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
    

  • Next message: Brian Fundakowski Feldman: "Re: kldunload DIAGNOSTIC idea..."

    Relevant Pages

    • Re: kldunload DIAGNOSTIC idea...
      ... > I'm pulling hair out trying to make it guaranteed safe to unload device ... > driver modules, and the major pain here is to make sure there is no ... > instruction counter inside the range of pages we are going to unload. ...
      (freebsd-arch)
    • Re: kldunload DIAGNOSTIC idea...
      ... >> I'm pulling hair out trying to make it guaranteed safe to unload device ... >> driver modules, and the major pain here is to make sure there is no ... >> instruction counter inside the range of pages we are going to unload. ... >You mean any thread with a stack trace that includes an instruction ...
      (freebsd-arch)
    • Re: kldunload DIAGNOSTIC idea...
      ... >>I'm pulling hair out trying to make it guaranteed safe to unload device ... >>driver modules, and the major pain here is to make sure there is no ... >>instruction counter inside the range of pages we are going to unload. ... This is better than phk's suggestion since you can have module code ...
      (freebsd-arch)