cvs commit: patches/hotplug linux-2.6.6-no-default-hotplug-1.patch

jim at linuxfromscratch.org jim at linuxfromscratch.org
Wed Jun 2 00:17:22 PDT 2004


jim         04/06/02 01:17:22

  Added:       hotplug  linux-2.6.6-no-default-hotplug-1.patch
  Log:
  Added: linux-2.6.6-no-default-hotplug-1.patch
  
  Revision  Changes    Path
  1.1                  patches/hotplug/linux-2.6.6-no-default-hotplug-1.patch
  
  Index: linux-2.6.6-no-default-hotplug-1.patch
  ===================================================================
  Submitted By: Alexander E. Patrakov
  Date: 2004-06-02
  Origin: Based on thoughts by Nathan Coulson and Kevin P. Fleming
  Initial Package Version: 2.6.6
  Upstream Status: The idea is being discussed in linux-hotplug-devel list
  Description: It has been found that calling /sbin/hotplug by default
  when a hotplug event arrives is unsafe, since userspace may be not ready
  to handle the event. Various bugs appear because of that, e.g.;
  
  http://bugs.linuxfromscratch.org/show_bug.cgi?id=842
  
  This patch changes the default kernel behavior to doing nothing.
  This can and must be overridden when the userspace is ready to handle hotplug
  events, by the following command:
  
  echo "/sbin/hotplug" >/proc/sys/kernel/hotplug
  
  Before applying this patch, verify that you have this command in your
  hotplug initscript!
  
  --- linux-2.6.6.old/kernel/kmod.c	2004-05-13 10:52:58.000000000 +0600
  +++ linux-2.6.6/kernel/kmod.c	2004-06-02 07:22:27.813676216 +0600
  @@ -132,7 +132,7 @@
   	events.  the command is expected to load drivers when
   	necessary, and may perform additional system setup.
   */
  -char hotplug_path[256] = "/sbin/hotplug";
  +char hotplug_path[256] = "";
   
   EXPORT_SYMBOL(hotplug_path);
   
  
  
  



More information about the patches mailing list