[Pm-utils] [patch] disable suspend when kernel image changed

Dan Nicholson dbn.lists at gmail.com
Sat Apr 10 07:53:41 PDT 2010

On Fri, Apr 9, 2010 at 3:37 PM, Richard Zidlicky <rz at linux-m68k.org> wrote:
> On Fri, Apr 09, 2010 at 06:24:59AM -0700, Dan Nicholson wrote:
>> I'm not sure I think this is really a big issue for pm-utils. 99% of
>> people will be using their distro's kernel that has the full version
>> in the filename, so they'll never have their current kernel image
>> overwritten.
> if it is so simple to for pm-utils to fix it why not do it? Crashing
> a system just because it may affect only less than 1% of Linux users
> is inexcusable.

The main reason being that it's not easy to tell if the image has been
updated. Your patch assumes that people are using syslog and will put
the kernel messages in /var/log/boot.log. There's no reason that's the
case, and there are lots of strange reasons why the test would fail
even if that was the case. Failing that test means people fail to
suspend for some undocumented reason.

>> ....           Overwriting the image of your currently running kernel
>> and then intentionally hibernating seems to be a pretty risky
>> maneuver, and I don't think pm-utils should be trying to safeguard the
>> very few people who try to do it. There's a simpler solution to this
> afaics it is not documented anywhere and fixing it is easier than documenting
> it.

I disagree. Fixing it without causing regressions is much harder than
documenting it.

> There is nothing that is obviously risky about overwriting an image in /boot.
> Also it is not necessarily the same user who hits the hibernate button who
> did regenerate the kernel image.

The only people who ever would get into this situation are people
installing their own kernel and intentionally overwriting the running
kernel. Why would they logout and walk away without rebooting into the
new kernel on a multiuser system?

No distro I've ever heard of is overwriting the current kernel, which
means that this feature could only serve to cause regressions for at
least 99% of people.


More information about the Pm-utils mailing list