Messages in this thread | | | From | "Rafael J. Wysocki" <> | Subject | Re: [PATCH] cpuidle: coupled: fix sleeping while atomic in cpu notifier | Date | Thu, 26 Jul 2012 22:16:43 +0200 |
| |
On Thursday, July 26, 2012, Rafael J. Wysocki wrote: > On Thursday, July 26, 2012, Colin Cross wrote: > > On Thu, Jul 26, 2012 at 12:55 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote: > > > On Wednesday, July 25, 2012, Colin Cross wrote: > > >> The cpu hotplug notifier gets called in both atomic and non-atomic > > >> contexts, it is not always safe to lock a mutex. Filter out all events > > >> except the six necessary ones, which are all sleepable, before taking > > >> the mutex. > > > > > > I wonder what mutual exclusion mechanis we rely on when the mutex is not taken? > > > > We don't need any mutual exclusion because the notifier returns immediately. > > Don't we need to disable preemption even?
Sorry, scratch that. It returns NOTIFY_OK if we're not going to take the mutex.
Thanks, Rafael
| |