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: Tue, 14 Feb 2012 21:57:16 -0800 From: Arve Hjønnevåg <arve@...roid.com> To: "Rafael J. Wysocki" <rjw@...k.pl> Cc: Linux PM list <linux-pm@...r.kernel.org>, LKML <linux-kernel@...r.kernel.org>, Magnus Damm <magnus.damm@...il.com>, markgross@...gnar.org, Matthew Garrett <mjg@...hat.com>, Greg KH <gregkh@...uxfoundation.org>, John Stultz <john.stultz@...aro.org>, Brian Swetland <swetland@...gle.com>, Neil Brown <neilb@...e.de>, Alan Stern <stern@...land.harvard.edu> Subject: Re: [RFC][PATCH 0/8] PM: Implement autosleep and "wake locks" 2012/2/14 Rafael J. Wysocki <rjw@...k.pl>: > On Tuesday, February 14, 2012, Arve Hjønnevåg wrote: >> On Mon, Feb 6, 2012 at 5:00 PM, Rafael J. Wysocki <rjw@...k.pl> wrote: >> ... >> but the wake-source timeout feature has some bugs or incompatible apis. An >> init api would also be useful for embedding wake-sources in other data >> structures without adding another memory allocation. Your patch to >> move the spinlock init to wakeup_source_add still require the struct >> to be zero initialized and the name set manually. > > That should be easy to fix. What about the appended patch? > That works, but I still have to call more than one function before I can use the wakeup-source (wakeup_source_init and wakeup_source_add) and more than one function before I can free it (__pm_relax, wakeup_source_remove and wakeup_source_drop). Is there any reason to keep these separate? Also, not copying the name when the caller provides the memory for the wakeup-source would be a closer match to the wakelock api. Most of our wakelocks pass a string constant as the name, and making a copy of that string is not useful. wake_lock_init is also safe to call from atomic context, but I don't know if anyone relies on this. -- Arve Hjønnevåg -- 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