]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix problem with inotify in .28
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 15 Jan 2009 17:24:52 +0000 (09:24 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 15 Jan 2009 17:24:52 +0000 (09:24 -0800)
queue-2.6.28/0039--CVE-2009-0029-System-call-wrappers-part-29.patch
queue-2.6.28/inotify-fix-type-errors-in-interfaces.patch [new file with mode: 0644]
queue-2.6.28/series

index aff335e5611aa103092a8050ece0507ae9bbf96f..9f1449d05acbe0cbba3d01fa3b669d92bac869f7 100644 (file)
@@ -30,7 +30,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
        return ret;
  }
  
--asmlinkage long sys_inotify_rm_watch(int fd, u32 wd)
+-asmlinkage long sys_inotify_rm_watch(int fd, __s32 wd)
 +SYSCALL_DEFINE2(inotify_rm_watch, int, fd, __s32, wd)
  {
        struct file *filp;
diff --git a/queue-2.6.28/inotify-fix-type-errors-in-interfaces.patch b/queue-2.6.28/inotify-fix-type-errors-in-interfaces.patch
new file mode 100644 (file)
index 0000000..d4d6596
--- /dev/null
@@ -0,0 +1,62 @@
+From 4ae8978cf92a96257cd8998a49e781be83571d64 Mon Sep 17 00:00:00 2001
+From: Michael Kerrisk <mtk.manpages@googlemail.com>
+Date: Mon, 5 Jan 2009 07:19:16 -0500
+Subject: inotify: fix type errors in interfaces
+
+From: Michael Kerrisk <mtk.manpages@googlemail.com>
+
+commit 4ae8978cf92a96257cd8998a49e781be83571d64 upstream.
+
+The problems lie in the types used for some inotify interfaces, both at the kernel level and at the glibc level. This mail addresses the kernel problem. I will follow up with some suggestions for glibc changes.
+
+For the sys_inotify_rm_watch() interface, the type of the 'wd' argument is
+currently 'u32', it should be '__s32' .  That is Robert's suggestion, and
+is consistent with the other declarations of watch descriptors in the
+kernel source, in particular, the inotify_event structure in
+include/linux/inotify.h:
+
+struct inotify_event {
+        __s32           wd;             /* watch descriptor */
+        __u32           mask;           /* watch mask */
+        __u32           cookie;         /* cookie to synchronize two events */
+        __u32           len;            /* length (including nulls) of name */
+        char            name[0];        /* stub for possible name */
+};
+
+The patch makes the changes needed for inotify_rm_watch().
+
+Signed-off-by: Michael Kerrisk <mtk.manpages@googlemail.com>
+Cc: Robert Love <rlove@google.com>
+Cc: Vegard Nossum <vegard.nossum@gmail.com>
+Cc: Ulrich Drepper <drepper@redhat.com>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
+Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
+
+---
+ fs/inotify_user.c        |    2 +-
+ include/linux/syscalls.h |    2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+--- a/fs/inotify_user.c
++++ b/fs/inotify_user.c
+@@ -704,7 +704,7 @@ fput_and_out:
+       return ret;
+ }
+-asmlinkage long sys_inotify_rm_watch(int fd, u32 wd)
++asmlinkage long sys_inotify_rm_watch(int fd, __s32 wd)
+ {
+       struct file *filp;
+       struct inotify_device *dev;
+--- a/include/linux/syscalls.h
++++ b/include/linux/syscalls.h
+@@ -549,7 +549,7 @@ asmlinkage long sys_inotify_init(void);
+ asmlinkage long sys_inotify_init1(int flags);
+ asmlinkage long sys_inotify_add_watch(int fd, const char __user *path,
+                                       u32 mask);
+-asmlinkage long sys_inotify_rm_watch(int fd, u32 wd);
++asmlinkage long sys_inotify_rm_watch(int fd, __s32 wd);
+ asmlinkage long sys_spu_run(int fd, __u32 __user *unpc,
+                                __u32 __user *ustatus);
index 879fbc576b2b140aafe03ed6fdd35220eadaac6a..2b841af24e6ddc99b3761e48db33b194349a5d15 100644 (file)
@@ -28,6 +28,7 @@ ioat-fix-self-test-for-multi-channel-case.patch
 usb-isp1760-use-a-specific-plx-bridge-instead-of-any-bdridge.patch
 usb-isp1760-fix-probe-in-pci-glue-code.patch
 usb-unusual_devs.h-additions-for-pentax-k10d.patch
+inotify-fix-type-errors-in-interfaces.patch
 0001--CVE-2009-0029-Move-compat-system-call-declarations.patch
 0002--CVE-2009-0029-Convert-all-system-calls-to-return-a.patch
 0003--CVE-2009-0029-Rename-old_readdir-to-sys_old_readdi.patch