PHYSDEVDRIVER=<NULL>
Subsystems (2)
PATCH 1/1 PHYSDEVDRIVER=<NULL>
For some reasons, PHYSDEVDRIVER can be <NULL> for block events. So just check for that.
base/class.c | 4 ++-- base/core.c | 4 ++-- block/genhd.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
Signed-off-by Olaf Hering <[email protected]>
drivers/base/class.c renamed from linux-2.6.11-rc4.orig/drivers/base/class.c +2 -2
@@ -314,13 +314,13 @@ static int class_hotplug(struct kset *kskfree (path);/* add bus name of physical device */ -if (dev->bus) +if (dev->bus && dev->bus->name)add_hotplug_env_var (envp, num_envp, &i, buffer, buffer_size, &length,"PHYSDEVBUS=%s" , dev->bus->name);/* add driver name of physical device */ -if (dev->driver) +if (dev->driver && dev->driver->name)add_hotplug_env_var (envp, num_envp, &i, buffer, buffer_size, &length,"PHYSDEVDRIVER=%s" , dev->driver->name);
drivers/base/core.c renamed from linux-2.6.11-rc4.orig/drivers/base/core.c +2 -2
@@ -121,13 +121,13 @@ static int dev_hotplug(struct kset *ksetint retval =0 ;/* add bus name of physical device */ -if (dev->bus) +if (dev->bus && dev->bus->name)add_hotplug_env_var (envp, num_envp, &i, buffer, buffer_size, &length,"PHYSDEVBUS=%s" , dev->bus->name);/* add driver name of physical device */ -if (dev->driver) +if (dev->driver && dev->driver->name)add_hotplug_env_var (envp, num_envp, &i, buffer, buffer_size, &length,"PHYSDEVDRIVER=%s" , dev->driver->name);
drivers/block/genhd.c renamed from linux-2.6.11-rc4.orig/drivers/block/genhd.c +2 -2
@@ -453,13 +453,13 @@ static int block_hotplug(struct kset *kskfree (path);/* add bus name of physical device */ -if (dev->bus) +if (dev->bus && dev->bus->name)add_hotplug_env_var (envp, num_envp, &i, buffer, buffer_size, &length,"PHYSDEVBUS=%s" , dev->bus->name);/* add driver name of physical device */ -if (dev->driver) +if (dev->driver && dev->driver->name)add_hotplug_env_var (envp, num_envp, &i, buffer, buffer_size, &length,"PHYSDEVDRIVER=%s" , dev->driver->name);
Quoted 3 lines · Olaf Hering
For some reasons, PHYSDEVDRIVER can be <NULL> for block events. So just check for that.
That's odd. Any idea what driver causes this? A bus should always have a name associated with it. I'd rather fix the broken bus driver.
thanks,
greg k-h
Quoted 7 lines · Greg KH
Quoted 3 lines · Olaf Hering
For some reasons, PHYSDEVDRIVER can be <NULL> for block events. So just check for that.
That's odd. Any idea what driver causes this? A bus should always have a name associated with it. I'd rather fix the broken bus driver.
I dont know what driver caused this, its one of these weird intel laptops.
But I fixed it in userland by quoting the enviroment variables.