[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    fix uevent action-string regression
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2008-03-30 23:03:30
Message-ID: 200803302303.m2UN3UCr014798 () hera ! kernel ! org
[Download RAW message or body]

Gitweb:     http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=a9edadbf790d72adf6ebed476cb5caf7743e7e4a
Commit:     a9edadbf790d72adf6ebed476cb5caf7743e7e4a
Parent:     eb08b6b973cb91311431c6eea3cc232b97152a84
Author:     Mark Lord <lkml@rtr.ca>
AuthorDate: Fri Mar 28 19:05:25 2008 -0400
Committer:  Linus Torvalds <torvalds@linux-foundation.org>
CommitDate: Sun Mar 30 14:55:49 2008 -0700

    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>
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
---
 lib/kobject_uevent.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/kobject_uevent.c b/lib/kobject_uevent.c
index 5a402e2..5b6d7f6 100644
--- a/lib/kobject_uevent.c
+++ b/lib/kobject_uevent.c
@@ -55,7 +55,7 @@ int kobject_action_type(const char *buf, size_t count,
 	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)
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic