lkml.org 
[lkml]   [2008]   [Mar]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 2.6.25-rc7] fix uevent action-string regression
Mark Lord wrote:
>
> On boot, syslog is flooded with "uevent: unsupported action-string;" messages.
..
> Mar 28 14:43:29 shrimp kernel: tty ptyqd: uevent: unsupported
> action-string; this will be ignored in a future kernel version
> Mar 28 14:43:29 shrimp kernel: tty ptyqe: uevent: unsupported
> action-string; this will be ignored in a future kernel version
> Mar 28 14:43:29 shrimp kernel: tty ptyqf: uevent: unsupported
> action-string; this will be ignored in a future kernel version
> Mar 28 14:43:29 shrimp kernel: tty ptyr0: uevent: unsupported
> action-string; this will be ignored in a future kernel version
..

These messages are a regression compared with 2.6.24,
which did not flood the syslog with them.

The actual underlying problem was introduced in 2.6.23,
when somebody made the string parsing no longer accept nul-terminated
strings as a valid input to store_uevent().

Eg. "add\0" was valid prior to 2.6.23, where the code regressed
to require "add" without the '\0'.

This patch fixes the 2.6.23 / 2.6.24 regressions, by having the code
once again tolerate the trailing '\0', if present.

According to GregKH, this mainly affects older Ubuntu systems,
such as the one I have here that requires this fix.

Signed-off-by: Mark Lord <mlord@pobox.com>

--- old/lib/kobject_uevent.c 2008-03-28 14:03:46.000000000 -0400
+++ linux/lib/kobject_uevent.c 2008-03-28 18:53:11.000000000 -0400
@@ -55,7 +55,7 @@
enum kobject_action action;
int ret = -EINVAL;

- if (count && buf[count-1] == '\n')
+ if (count && (buf[count-1] == '\n' || buf[count-1] == '\0'))
count--;

if (!count)

\
 
 \ /
  Last update: 2008-03-29 00:09    [W:0.038 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site