lkml.org 
[lkml]   [2008]   [Apr]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG: using smp_processor_id() during suspend with 2.6.25-rc8
On Fri 2008-04-11 13:09:39, Ingo Molnar wrote:
>
> * Pavel Machek <pavel@ucw.cz> wrote:
>
> > (I just want to fix the underlying problem in suspend, too. I guess
> > I'll just do something like
>
> > if (drv->suspend) {
> > + BUG_ON(!in_interrupt());
> > ret = drv->suspend(sysdev, state);
>
> > pr_debug(" %s\n", kobject_name(&sysdev->kobj));
> >
> > + BUG_ON(!in_interrupt());
> > __sysdev_resume(sysdev);
>
> small note: please always use WARN_ON_ONCE() in such cases. That way
> people's boxes dont blow up and the problem will be debuggable if the
> box survives despite the error condition. (and thus it can be relayed to
> kerneloops.org - all major distros have the package included already and
> Fedora enables the client by default)

Agreed, BUG_ON() was bad idea and I got the condition wrong.

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html


\
 
 \ /
  Last update: 2008-04-12 11:53    [W:0.050 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site