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
| ||
|
Date: Sun, 6 Jan 2008 12:06:38 -0500 (EST) From: Alan Stern <stern@...land.harvard.edu> To: "Rafael J. Wysocki" <rjw@...k.pl> cc: Greg KH <gregkh@...e.de>, Andrew Morton <akpm@...ux-foundation.org>, Len Brown <lenb@...nel.org>, Ingo Molnar <mingo@...e.hu>, ACPI Devel Maling List <linux-acpi@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>, pm list <linux-pm@...ts.linux-foundation.org> Subject: Re: [PATCH] PM: Acquire device locks on suspend On Sun, 6 Jan 2008, Rafael J. Wysocki wrote: > > If you can figure out a way to disable the warning in device_del() for > > just the one device being unregistered by > > device_pm_destroy_suspended(), > > Something like this, perhaps: > > @@ -905,6 +915,18 @@ void device_del(struct device * dev) > struct device * parent = dev->parent; > struct class_interface *class_intf; > > + if (down_trylock(&dev->sem)) { > + if (pm_sleep_lock()) { > + dev_warn(dev, "Illegal %s during suspend\n", > + __FUNCTION__); > + dump_stack(); > + } else { > + pm_sleep_unlock(); > + } > + } else { > + up(&dev->sem); > + } > + > if (parent) > klist_del(&dev->knode_parent); > if (MAJOR(dev->devt)) Bizarre, but it should work. Be sure to include plenty of explanatory comments -- otherwise nobody will be able to figure it out! :-) Alan Stern -- 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