]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/fcntl.c
[IPV6]: Check interface bindings on IPv6 raw socket reception
[linux-2.6-omap-h63xx.git] / fs / fcntl.c
index 3e7ab16ed154733726d4eba9ddeae0ffdd970e9a..6fbc9d8fcc3621abb4af0684a79828d6f293d6b6 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/module.h>
 #include <linux/security.h>
 #include <linux/ptrace.h>
+#include <linux/signal.h>
 
 #include <asm/poll.h>
 #include <asm/siginfo.h>
@@ -287,7 +288,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
                break;
        case F_SETLK:
        case F_SETLKW:
-               err = fcntl_setlk(filp, cmd, (struct flock __user *) arg);
+               err = fcntl_setlk(fd, filp, cmd, (struct flock __user *) arg);
                break;
        case F_GETOWN:
                /*
@@ -308,7 +309,7 @@ static long do_fcntl(int fd, unsigned int cmd, unsigned long arg,
                break;
        case F_SETSIG:
                /* arg == 0 restores default behaviour. */
-               if (arg < 0 || arg > _NSIG) {
+               if (!valid_signal(arg)) {
                        break;
                }
                err = 0;
@@ -375,7 +376,8 @@ asmlinkage long sys_fcntl64(unsigned int fd, unsigned int cmd, unsigned long arg
                        break;
                case F_SETLK64:
                case F_SETLKW64:
-                       err = fcntl_setlk64(filp, cmd, (struct flock64 __user *) arg);
+                       err = fcntl_setlk64(fd, filp, cmd,
+                                       (struct flock64 __user *) arg);
                        break;
                default:
                        err = do_fcntl(fd, cmd, arg, filp);