Re: [PATCH] call drv->shutdown at rmmod

From: Patrick Mochel (mochel_at_osdl.org)
Date: 08/14/03

  • Next message: Narayan Desai: "2.4.22-rc2 boot hang"
    Date:	Thu, 14 Aug 2003 09:02:20 -0700 (PDT)
    To: "Eric W. Biederman" <ebiederm@xmission.com>
    
    

    [ I'm curious as to why you didn't cc me in the first place.. ]

    > At the kexec BOF at OSDL there was some discussion on calling the
    > device shutdown method at module remove time, in addition to calling
    > it during reboot. The driver was the observation that the primary
    > source of problems in booting linux from linux are drivers with bad
    > or missing drv->shutdown() routines. The hope is this will increase
    > the testing so people can get it right and kexec can become more
    > useful. In addition to making normal reboots more reliable.
    >
    > The following patch is an implementation of that idea it calls drv->shutdown()
    > before calling drv->remove(). If drv->shutdown() is implemented.

    I like the idea behind the patch, but we shouldn't be calling it
    unconditionally. We're bound to run into some suprises that could really
    kill us this late in the 2.6 game.

    I do think it should go in, as long as there is a flag telling the core
    whether or not to call shutdown for that particular device. I think it
    could also be extended to include a power state, so the core could suspend
    the device before removing the module.

    The default would always be 'Do Nothing', but with a per-device sysfs
    file, a developer/user/gui app could be used to set the policy from user
    space.

            -pat

    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/


  • Next message: Narayan Desai: "2.4.22-rc2 boot hang"

    Relevant Pages

    • Re: [Jackit-devel] Re: [patch] voluntary-preempt-2.6.8-rc2-M5
      ... > to pollbefore entering the polling loop, by which time there has been ... internally calls malloc*after* calling snd_pcm_start. ... There's probably nothing to prevent us moving the freeand malloc() ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • RE: DirectDraw Source code
      ... The DD core is not calling the function HALUpdateOverlay function. ... This error occurs while trying to use this funnction with UYVU color format. ... The CanCreateSurface function is returning a failure (unlikely, ...
      (microsoft.public.windowsce.platbuilder)
    • kernel panic after sema_init(&sem,-1) why?
      ... if I initialise the semaphore to -1 ... then try to acquire it by calling down. ... privileged information for the sole use of the person or entity to ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [PATCH] Add TPM hardware enablement driver
      ... Thanks for the helpful comments I am working on a patch to fix your ... When calling mod_timer and an occasional del_singleshot_timer_sync is it ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [patch 2.6.13-rc4] fix get_user_pages bug
      ... > Since we will have dropped the page table lock when calling ... I don't think we can fix that race (which is probably pretty much ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)