lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070323111029.4089ccfb@gondolin.boeblingen.de.ibm.com>
Date:	Fri, 23 Mar 2007 11:10:29 +0100
From:	Cornelia Huck <cornelia.huck@...ibm.com>
To:	Larry Finger <larry.finger@...inger.net>
Cc:	Andrew Morton <akpm@...ux-foundation.org>,
	Matt Mackall <mpm@...enic.com>, linux-kernel@...r.kernel.org,
	linux-wireless@...r.kernel.org,
	Monakhov Dmitriy <dmonakhov@...nvz.org>
Subject: Re: 2.6.21-rc4-mm1

On Thu, 22 Mar 2007 13:55:51 -0500,
Larry Finger <larry.finger@...inger.net> wrote:

> Cornelia Huck wrote:
> > On Thu, 22 Mar 2007 07:23:06 -0500,
> > 
> > This would indicate that dev_uevent had been called. But how could
> > kobject_uevent then return an error without moaning about an uevent()
> > error code? Maybe the following debug patch could shed some light on
> > this (all moaning is prefixed with kobject_uevent_env, so it should be
> > easy to spot)...
> 
> I applied the debug patch, but I don't see any error codes being returned. This time I also got the
> General Protection Faults. An excerpt of the log is attached.

Hm, I think I have an idea about what happened.

The firmware class tried to suppress the first KOBJ_ADD uevent by
returning -ENODEV in firmware_uevent if FW_STATUS_READY was not set.
This only worked as long as the return code of kobject_uevent was not
checked in device_add. hack-to-make-wireless-work.patch made that first
uevent return successfully, but this possible triggered some udev rule
too early, leading to firmware load failures.

The following (completely untested) patch uses uevent_suppress to stop
the uevent from being generated during device_add. Does this work for
you?

---
 drivers/base/firmware_class.c |    2 ++
 1 file changed, 2 insertions(+)

--- linux-2.6.orig/drivers/base/firmware_class.c
+++ linux-2.6/drivers/base/firmware_class.c
@@ -333,6 +333,7 @@ static int fw_register_device(struct dev
 	f_dev->parent = device;
 	f_dev->class = &firmware_class;
 	dev_set_drvdata(f_dev, fw_priv);
+	f_dev->uevent_suppress = 1;
 	retval = device_register(f_dev);
 	if (retval) {
 		printk(KERN_ERR "%s: device_register failed\n",
@@ -385,6 +386,7 @@ static int fw_setup_device(struct firmwa
                 set_bit(FW_STATUS_READY, &fw_priv->status);
         else
                 set_bit(FW_STATUS_READY_NOHOTPLUG, &fw_priv->status);
+	f_dev->uevent_suppress = 0;
 	*dev_p = f_dev;
 	goto out;
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ